10 ! Standard interface flags (netdevice->flags)
12 : IFF_UP HEX: 1 ; ! interface is up
13 : IFF_BROADCAST HEX: 2 ; ! broadcast address valid
14 : IFF_DEBUG HEX: 4 ; ! turn on debugging
15 : IFF_LOOPBACK HEX: 8 ; ! is a loopback net
16 : IFF_POINTOPOINT HEX: 10 ; ! interface is has p-p link
17 : IFF_NOTRAILERS HEX: 20 ; ! avoid use of trailers
18 : IFF_RUNNING HEX: 40 ; ! interface running and carrier ok
19 : IFF_NOARP HEX: 80 ; ! no ARP protocol
20 : IFF_PROMISC HEX: 100 ; ! receive all packets
21 : IFF_ALLMULTI HEX: 200 ; ! receive all multicast packets
23 : IFF_MASTER HEX: 400 ; ! master of a load balancer
24 : IFF_SLAVE HEX: 800 ; ! slave of a load balancer
26 : IFF_MULTICAST HEX: 1000 ; ! Supports multicast
28 ! #define IFF_VOLATILE
29 ! (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_MASTER|IFF_SLAVE|IFF_RUNNING)
31 : IFF_PORTSEL HEX: 2000 ; ! can set media type
32 : IFF_AUTOMEDIA HEX: 4000 ; ! auto media select active
33 : IFF_DYNAMIC HEX: 8000 ; ! dialup device with changing addresses
35 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
37 C-STRUCT: struct-ifmap
38 { "ulong" "mem-start" }
40 { "ushort" "base-addr" }
45 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
47 ! Hmm... the generic sockaddr type isn't defined anywhere.
48 ! Put it here for now.
50 TYPEDEF: ushort sa_family_t
52 C-STRUCT: struct-sockaddr
53 { "sa_family_t" "sa_family" }
54 { { "char" 14 } "sa_data" } ;
56 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
58 ! C-UNION: union-ifr-ifrn { "char" IFNAMSIZ } ;
60 C-UNION: union-ifr-ifrn { "char" 16 } ;
62 C-UNION: union-ifr-ifru
72 C-STRUCT: struct-ifreq
73 { "union-ifr-ifrn" "ifr-ifrn" }
74 { "union-ifr-ifru" "ifr-ifru" } ;
76 : ifr-name ( struct-ifreq -- value ) struct-ifreq-ifr-ifrn ;
78 : ifr-hwaddr ( struct-ifreq -- value ) struct-ifreq-ifr-ifru ;
79 : ifr-addr ( struct-ifreq -- value ) struct-ifreq-ifr-ifru ;
80 : ifr-dstaddr ( struct-ifreq -- value ) struct-ifreq-ifr-ifru ;
81 : ifr-broadaddr ( struct-ifreq -- value ) struct-ifreq-ifr-ifru ;
82 : ifr-netmask ( struct-ifreq -- value ) struct-ifreq-ifr-ifru ;
83 : ifr-flags ( struct-ifreq -- value ) struct-ifreq-ifr-ifru ;
85 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
87 C-UNION: union-ifc-ifcu "caddr_t" "struct-ifreq*" ;
89 C-STRUCT: struct-ifconf
91 { "union-ifc-ifcu" "ifc-ifcu" } ;
93 : ifc-len ( struct-ifconf -- value ) struct-ifconf-ifc-len ;
95 : ifc-buf ( struct-ifconf -- value ) struct-ifconf-ifc-ifcu ;
96 : ifc-req ( struct-ifconf -- value ) struct-ifconf-ifc-ifcu ;
98 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!