5754687 [rkeene@sledge /home/rkeene/devel/cygwin-stuff/cyg-root/usr/include/cygwin]$ cat -n if.h
 1 #ifndef _CYGWIN_IF_H_
 2 #define _CYGWIN_IF_H_
 3 
 4 #ifdef __cplusplus
 5 extern "C" {
 6 #endif /* __cplusplus */
 7 
 8 #include <sys/types.h>
 9 #include <sys/socket.h>
10 
11 /* Standard interface flags. */
12 #define IFF_UP          0x1             /* interface is up              */
13 #define IFF_BROADCAST   0x2             /* broadcast address valid      */
14 #define IFF_LOOPBACK    0x8             /* is a loopback net            */
15 #define IFF_NOTRAILERS  0x20            /* avoid use of trailers        */
16 #define IFF_RUNNING     0x40            /* resources allocated          */
17 #define IFF_PROMISC     0x100           /* receive all packets          */
18 #define IFF_MULTICAST   0x1000          /* Supports multicast           */
19 
20 /*
21  * Interface request structure used for socket
22  * ioctl's.  All interface ioctl's must have parameter
23  * definitions which begin with ifr_name.  The
24  * remainder may be interface specific.
25  */
26 
27 struct ifreq
28 {
29 #define IFNAMSIZ        16
30         union
31         {
32                 char    ifrn_name[IFNAMSIZ];            /* if name, e.g. "en0" */
33         } ifr_ifrn;
34 
35         union {
36                 struct  sockaddr ifru_addr;
37                 struct  sockaddr ifru_broadaddr;
38                 struct  sockaddr ifru_netmask;
39                 short   ifru_flags;
40                 int     ifru_metric;
41                 int     ifru_mtu;
42         } ifr_ifru;
43 };
44 
45 #define ifr_name        ifr_ifrn.ifrn_name      /* interface name       */
46 #define ifr_addr        ifr_ifru.ifru_addr      /* address              */
47 #define ifr_broadaddr   ifr_ifru.ifru_broadaddr /* broadcast address    */
48 #define ifr_netmask     ifr_ifru.ifru_netmask   /* interface net mask   */
49 #define ifr_flags       ifr_ifru.ifru_flags     /* flags                */
50 
51 /*
52  * Structure used in SIOCGIFCONF request.
53  * Used to retrieve interface configuration
54  * for machine (useful for programs which
55  * must know all networks accessible).
56  */
57 
58 struct ifconf
59 {
60         int     ifc_len;                        /* size of buffer       */
61         union
62         {
63                 caddr_t ifcu_buf;
64                 struct  ifreq *ifcu_req;
65         } ifc_ifcu;
66 };
67 #define ifc_buf ifc_ifcu.ifcu_buf               /* buffer address       */
68 #define ifc_req ifc_ifcu.ifcu_req               /* array of structures  */
69 
70 #ifdef __cplusplus
71 };
72 #endif /* __cplusplus */
73 
74 #endif /* _CYGWIN_IF_H_ */
5754688 [rkeene@sledge /home/rkeene/devel/cygwin-stuff/cyg-root/usr/include/cygwin]$

Click here to go back to the directory listing.
Click here to download this file.
last modified: 2001-01-31 15:09:10