|
1 | | -/* $OpenBSD: if.h,v 1.189 2017/12/21 01:11:47 dlg Exp $ */ |
| 1 | +/* $OpenBSD: if.h,v 1.190 2018/01/16 10:33:55 mpi Exp $ */ |
2 | 2 | /* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */ |
3 | 3 |
|
4 | 4 | /* |
@@ -184,34 +184,43 @@ struct if_status_description { |
184 | 184 | */ |
185 | 185 | #define IFDESCRSIZE 64 |
186 | 186 |
|
187 | | -#define IFF_UP 0x1 /* interface is up */ |
188 | | -#define IFF_BROADCAST 0x2 /* broadcast address valid */ |
189 | | -#define IFF_DEBUG 0x4 /* turn on debugging */ |
190 | | -#define IFF_LOOPBACK 0x8 /* is a loopback net */ |
191 | | -#define IFF_POINTOPOINT 0x10 /* interface is point-to-point link */ |
192 | | -#define IFF_NOTRAILERS 0x20 /* avoid use of trailers */ |
193 | | -#define IFF_RUNNING 0x40 /* resources allocated */ |
194 | | -#define IFF_NOARP 0x80 /* no address resolution protocol */ |
195 | | -#define IFF_PROMISC 0x100 /* receive all packets */ |
196 | | -#define IFF_ALLMULTI 0x200 /* receive all multicast packets */ |
197 | | -#define IFF_OACTIVE 0x400 /* transmission in progress */ |
198 | | -#define IFF_SIMPLEX 0x800 /* can't hear own transmissions */ |
199 | | -#define IFF_LINK0 0x1000 /* per link layer defined bit */ |
200 | | -#define IFF_LINK1 0x2000 /* per link layer defined bit */ |
201 | | -#define IFF_LINK2 0x4000 /* per link layer defined bit */ |
202 | | -#define IFF_MULTICAST 0x8000 /* supports multicast */ |
| 187 | +/* |
| 188 | + * Interface flags can be either owned by the stack or the driver. The |
| 189 | + * symbols below document who is toggling which flag. |
| 190 | + * |
| 191 | + * I immutable after creation |
| 192 | + * N written by the stack (upon user request) |
| 193 | + * d written by the driver |
| 194 | + * c for userland compatibility only |
| 195 | + */ |
| 196 | +#define IFF_UP 0x1 /* [N] interface is up */ |
| 197 | +#define IFF_BROADCAST 0x2 /* [I] broadcast address valid */ |
| 198 | +#define IFF_DEBUG 0x4 /* [N] turn on debugging */ |
| 199 | +#define IFF_LOOPBACK 0x8 /* [I] is a loopback net */ |
| 200 | +#define IFF_POINTOPOINT 0x10 /* [I] is point-to-point link */ |
| 201 | +#define IFF_STATICARP 0x20 /* [N] only static ARP */ |
| 202 | +#define IFF_RUNNING 0x40 /* [d] resources allocated */ |
| 203 | +#define IFF_NOARP 0x80 /* [N] no address resolution protocol */ |
| 204 | +#define IFF_PROMISC 0x100 /* [N] receive all packets */ |
| 205 | +#define IFF_ALLMULTI 0x200 /* [d] receive all multicast packets */ |
| 206 | +#define IFF_OACTIVE 0x400 /* [c] transmission in progress */ |
| 207 | +#define IFF_SIMPLEX 0x800 /* [I] can't hear own transmissions */ |
| 208 | +#define IFF_LINK0 0x1000 /* [N] per link layer defined bit */ |
| 209 | +#define IFF_LINK1 0x2000 /* [N] per link layer defined bit */ |
| 210 | +#define IFF_LINK2 0x4000 /* [N] per link layer defined bit */ |
| 211 | +#define IFF_MULTICAST 0x8000 /* [I] supports multicast */ |
203 | 212 |
|
204 | 213 | /* flags set internally only: */ |
205 | 214 | #define IFF_CANTCHANGE \ |
206 | 215 | (IFF_BROADCAST|IFF_POINTOPOINT|IFF_RUNNING|IFF_OACTIVE|\ |
207 | 216 | IFF_SIMPLEX|IFF_MULTICAST|IFF_ALLMULTI) |
208 | 217 |
|
209 | | -#define IFXF_MPSAFE 0x1 /* if_start is mpsafe */ |
210 | | -#define IFXF_CLONED 0x2 /* pseudo interface */ |
211 | | -#define IFXF_INET6_NOPRIVACY 0x4 /* don't autoconf privacy */ |
212 | | -#define IFXF_MPLS 0x8 /* supports MPLS */ |
213 | | -#define IFXF_WOL 0x10 /* wake on lan enabled */ |
214 | | -#define IFXF_AUTOCONF6 0x20 /* v6 autoconf enabled */ |
| 218 | +#define IFXF_MPSAFE 0x1 /* [I] if_start is mpsafe */ |
| 219 | +#define IFXF_CLONED 0x2 /* [I] pseudo interface */ |
| 220 | +#define IFXF_INET6_NOPRIVACY 0x4 /* [N] don't autoconf privacy */ |
| 221 | +#define IFXF_MPLS 0x8 /* [N] supports MPLS */ |
| 222 | +#define IFXF_WOL 0x10 /* [N] wake on lan enabled */ |
| 223 | +#define IFXF_AUTOCONF6 0x20 /* [N] v6 autoconf enabled */ |
215 | 224 |
|
216 | 225 | #define IFXF_CANTCHANGE \ |
217 | 226 | (IFXF_MPSAFE|IFXF_CLONED) |
|
0 commit comments