From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,6285c98226559957,start X-Google-Attributes: gidfee84,public X-Google-Thread: 1164f8,6285c98226559957,start X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1994-01-13 15:23:26 PST Xref: gmd.de comp.unix.osf.osf1:1926 comp.sys.dec:12866 Path: gmd.de!xlink.net!howland.reston.ans.net!vixen.cso.uiuc.edu!newsrelay.iastate.edu!news.iastate.edu!john From: john@iastate.edu (John Hascall) Newsgroups: comp.unix.osf.osf1,comp.sys.dec Subject: Network ioctl confusion Date: 13 Jan 1994 21:50:00 GMT Organization: Iowa State University, Ames, IA Message-ID: <2h4fm8$bbr@news.iastate.edu> NNTP-Posting-Host: pooh.cc.iastate.edu (DEC OSF/1 1.3, FYI) ------------------- From the netintro man page ---------------------------- The following ioctl calls may be used to manipulate network interfaces. ... Calls which are now deprecated are: ... SIOCSIFFLAGS Set interface flags field. If the interface is marked down, any processes currently routing packets through the interface are notified; some interfaces may be reset so that incoming packets are no longer received. When marked up again, the interface is reinitialized. ... There are three requests that make use of a new structure: SIOCAIFADDR This request provides a means to add additional addresses (or modify characteristics of the primary address if the default address for the address family is specified). Rather than making separate calls to set destination addresses, broadcast addresses, or network masks (now an integral feature of multiple protocols) a separate structure is used to specify all three facets simultaneously: struct ifaliasreq { char ifra_name[IFNAMSIZ]; /* if name, e.g. "en0" */ struct sockaddr ifra_addr; struct sockaddr ifra_broadaddr; struct sockaddr ifra_mask; }; SIOCDIFADDR This request deletes the specified address from the list associ- ated with an interface. ... SIOCGIFCONF Get interface configuration list. This request takes an ifconf structure ... -------------------------- end of netintro man page excerpt ------------------- Now, it appears that there are only 2 (not 3) requests which use the new "struct ifaliasreq". Of course, /usr/include/sys/ioctl.h claims that only 1 request uses "struct ifaliasreq"... So, at least 2 of the 3 are wrong... ------------------------- ioctl.h excerpt ------------------------------------- #define SIOCDIFADDR _IOW('i', 25, struct ifreq) /* delete IF addr */ #define SIOCAIFADDR _IOW('i', 26, struct ifaliasreq)/* add/chg IF alias */ ------------------------------------------------------------------------------- But, what I really wanted to know was, if "SIOCSIFFLAGS" is deprecated, and given: struct ifaliasreq { char ifra_name[IFNAMSIZ]; /* if name, e.g. "en0" */ struct sockaddr ifra_addr; struct sockaddr ifra_broadaddr; struct sockaddr ifra_mask; }; what is the non-deprecated way to set the interface flags??? John -- John Hascall ``An ill-chosen word is the fool's messenger.'' Systems Software Engineer Project Vincent Iowa State University Computation Center + Ames, IA 50011 + 515/294-9551