Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss
Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

netmasks

17 views
Skip to first unread message

Sergey Anohin

unread,
Oct 4, 2023, 4:45:02 AM10/4/23
to
Hello!

Подскажите плз:

For compatibility with BSD-based operating systems, the file /etc/netmasks
is a symbolic link to /etc/inet/netmasks.

https://docs.oracle.com/cd/E19455-01/806-0916/ipconfig-33/index.html

На сколько я понял в FreeBSD нет ни того ни другого? То есть уже нет
совместимости?

С наилучшими пожеланиями, Sergey Anohin.

Alex Korchmar

unread,
Oct 4, 2023, 12:19:48 PM10/4/23
to
Sergey Anohin <Sergey...@p1.f10.n5034.z2.fidonet.org> wrote:

SA> For compatibility with BSD-based operating systems, the file /etc/netmasks
вероятно речь идет о 386/bsd ?

SA> Hа сколько я понял в FreeBSD нет ни того ни другого? То есть уже нет
и не было никогда

> Alex
P.S. хрен знает что вообще это за выкидыш динозавра.

Eugene Grosbein

unread,
Oct 5, 2023, 1:15:02 AM10/5/23
to
04 окт. 2023, среда, в 11:40 NOVT, Sergey Anohin написал(а):

SA> Подскажите плз:
SA> For compatibility with BSD-based operating systems, the file /etc/netmasks
SA>
SA> is a symbolic link to /etc/inet/netmasks.
SA> https://docs.oracle.com/cd/E19455-01/806-0916/ipconfig-33/index.html
SA> Hа сколько я понял в FreeBSD нет ни того ни другого? То есть уже нет
SA> совместимости?

Ты в курсе, что именно читаешь? :-)

System Administration Guide, Volume 3

This book is for anyone responsible for administering one or more systems
running the Solaris 8 release. It covers a broad range of Solaris
network administration topics such as managing TCP/IP networks,
modems, remote file systems, mail and DHCP.

Так что это про SunOS 4 и ранее, которые были BSD-based.

Eugene
--
Поэты - страшные люди. У них все святое.

Sergey Anohin

unread,
Oct 6, 2023, 11:25:02 AM10/6/23
to
Hello, Eugene!

EG> This book is for anyone responsible for administering one or more systems
EG> running the Solaris 8 release. It covers a broad range of Solaris
EG> network administration topics such as managing TCP/IP networks,
EG> modems, remote file systems, mail and DHCP.
EG> Так что это про SunOS 4 и ранее, которые были BSD-based.

Да, я просто хотел уточнить нет ли чего-то похожего в FreeBSD. Ковыряю одну
утилитку, ее портировали из Sun, с товарищами ее пробуем допилить, подебажить,
можно будет и порт оформить.

Програмулька использует код типа:

void
set_inet_addr(const char *name, struct route_info *route_info_p)
{
int status;
struct addrinfo *res;
struct sockaddr *sa = &route_info_p->ifr.ifr_addr;

status = getaddrinfo(name, NULL, NULL, &res);
if (status < 0)
err(1, "getaddrinfo status = %d %s\n", status, strerror(errno) );
sa->sa_family = AF_INET;
sa->sa_len = sizeof(res->ai_addr);
bcopy(res->ai_addr, sa, sizeof(*sa));
freeaddrinfo(res);
status = ioctl(route_info_p->sock, SIOCAIFADDR, &route_info_p->ifr);
if (status < 0)
err(1, "SIOCAIFADDR status = %d %s\n", status, strerror(errno) );
}

Програмулька заточена на файл /etc/netmasks, который где-то видимо прописан в
хедерах Sun, если собрать в gcc12 или в clang10,
прога работает и запускается с ворнингом:

tap0: set address: WARNING: network mask should be specified; using historical
default
при этом маска устанавливается как 255.0.0.0

А если собрано clang14 то не запускается:
ethernet devname is tap0
ax25tap: SIOCAIFADDR status = -1 Invalid argument
: Invalid argument

-std=c99 не помог

Sergey Anohin

unread,
Oct 6, 2023, 11:35:02 AM10/6/23
to
Hello, Alex!

AK> Sergey Anohin <Sergey...@p1.f10.n5034.z2.fidonet.org> wrote:
SA>> For compatibility with BSD-based operating systems, the file
SA>> /etc/netmasks
AK> вероятно речь идет о 386/bsd ?

Про Sun

SA>> Hа сколько я понял в FreeBSD нет ни того ни другого? То есть уже нет
AK> и не было никогда

Понял, спасибо!
0 new messages