diff options
| author | Luigi Rizzo <luigi@FreeBSD.org> | 2001-12-14 17:56:12 +0000 |
|---|---|---|
| committer | Luigi Rizzo <luigi@FreeBSD.org> | 2001-12-14 17:56:12 +0000 |
| commit | e4fc250c15768b8e203496ee908dedb37846ea4f (patch) | |
| tree | 4ea0e407bb3cf5815d6067507d1fdc39f76f58e6 /sys/net | |
| parent | 99adc698c1889950d1ff2b747f52de00fd69a8b1 (diff) | |
Notes
Diffstat (limited to 'sys/net')
| -rw-r--r-- | sys/net/if.h | 9 | ||||
| -rw-r--r-- | sys/net/if_var.h | 9 | ||||
| -rw-r--r-- | sys/net/netisr.h | 1 |
3 files changed, 19 insertions, 0 deletions
diff --git a/sys/net/if.h b/sys/net/if.h index 83116b968257..6cc5522118c7 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -131,6 +131,15 @@ struct if_data { #define IFF_ALTPHYS IFF_LINK2 /* use alternate physical connection */ #define IFF_MULTICAST 0x8000 /* supports multicast */ +/* + * The following flag(s) ought to go in if_flags, but we cannot change + * struct ifnet because of binary compatibility, so we store them in + * if_ipending, which is not used so far. + * If possible, make sure the value is not conflicting with other + * IFF flags, so we have an easier time when we want to merge them. + */ +#define IFF_POLLING 0x10000 /* Interface is in polling mode. */ + /* flags set internally only: */ #define IFF_CANTCHANGE \ (IFF_BROADCAST|IFF_POINTOPOINT|IFF_RUNNING|IFF_OACTIVE|\ diff --git a/sys/net/if_var.h b/sys/net/if_var.h index 58d37804620f..dacea6319072 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -459,6 +459,15 @@ int if_clone_destroy __P((const char *)); #define IF_LLADDR(ifp) \ LLADDR((struct sockaddr_dl *) ifaddr_byindex((ifp)->if_index)->ifa_addr) +#ifdef DEVICE_POLLING +enum poll_cmd { POLL_ONLY, POLL_AND_CHECK_STATUS, POLL_DEREGISTER }; + +typedef void poll_handler_t __P((struct ifnet *ifp, + enum poll_cmd cmd, int count)); +int ether_poll_register __P((poll_handler_t *h, struct ifnet *ifp)); +int ether_poll_deregister __P((struct ifnet *ifp)); +#endif /* DEVICE_POLLING */ + #endif /* _KERNEL */ #endif /* !_NET_IF_VAR_H_ */ diff --git a/sys/net/netisr.h b/sys/net/netisr.h index 621cf2268b96..35e8cc132252 100644 --- a/sys/net/netisr.h +++ b/sys/net/netisr.h @@ -52,6 +52,7 @@ * interrupt used for scheduling the network code to calls * on the lowest level routine of each protocol. */ +#define NETISR_POLL 0 /* polling callback, must be first */ #define NETISR_IP 2 /* same as AF_INET */ #define NETISR_NS 6 /* same as AF_NS */ #define NETISR_ATALK 16 /* same as AF_APPLETALK */ |
