Another SOCK_PACKET question

longd (maxwell@europa.com)
Fri, 9 Jan 1998 09:53:41 -0800 (PST)


I'm sure there is a list more appropriate to these questions.. if you know
of one please point me to it. one more question:

linsniff.c sets promisc mode on an interface with ioctl() a la:

ioctl(s,SIOCSIFFLAGS,&ifr);

s is a descriptor pointing to the previously opened SOCK_PACKET socket..
it seems to me that the s descriptor is purely arbitrary.. is it necessary
to use a socket opened in this way as a descriptor for a SIOCSIFFLAGS or
SIOCGIFFLAGS ioctl call? What type of descriptor needs to be used here?