lkml.org 
[lkml]   [1998]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Another SOCK_PACKET question
From
Date
longd <maxwell@europa.com> writes:

> 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?

You're right. The only requirement is that the descriptor is opened by
a socket() call so that the socket layer sees the ioctl.

-Andi

\
 
 \ /
  Last update: 2005-03-22 13:41    [W:0.037 / U:2.808 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site