-
-struct dl_tag_attr_str {
- u_long dl_tag;
- short if_flags;
- short if_unit;
- u_long if_family;
- u_long protocol_family;
-};
-
-
-struct dlil_pr_flt_str {
- caddr_t cookie;
-
- int (*filter_dl_input)(caddr_t cookie,
- struct mbuf **m,
- char **frame_header,
- struct ifnet **ifp);
-
-
- int (*filter_dl_output)(caddr_t cookie,
- struct mbuf **m,
- struct ifnet **ifp,
- struct sockaddr **dest,
- char *dest_linkaddr,
- char *frame_type);
-
- int (*filter_dl_event)(caddr_t cookie,
- struct kern_event_msg *event_msg);
-
- int (*filter_dl_ioctl)(caddr_t cookie,
- struct ifnet *ifp,
- u_long ioctl_cmd,
- caddr_t ioctl_arg);
-
- int (*filter_detach)(caddr_t cookie);
- u_long reserved[2];
-};
-
-struct dlil_if_flt_str {
- caddr_t cookie;
- int (*filter_if_input)(caddr_t cookie,
- struct ifnet **ifnet_ptr,
- struct mbuf **mbuf_ptr,
- char **frame_ptr);
-
- int (*filter_if_event)(caddr_t cookie,
- struct ifnet **ifnet_ptr,
- struct kern_event_msg **event_msg_ptr);
-
- int (*filter_if_output)(caddr_t cookie,
- struct ifnet **ifnet_ptr,
- struct mbuf **mbuf_ptr);
-
-
- int (*filter_if_ioctl)(caddr_t cookie,
- struct ifnet *ifnet_ptr,
- u_long ioctl_code_ptr,
- caddr_t ioctl_arg_ptr);
-
- int (*filter_if_free)(caddr_t cookie,
- struct ifnet *ifnet_ptr);
-
- int (*filter_detach)(caddr_t cookie);
- u_long reserved[2];
-};
-
-
-#define DLIL_PR_FILTER 1
-#define DLIL_IF_FILTER 2
-
-
-
-typedef int (*dl_input_func)(struct mbuf *m, char *frame_header,
- struct ifnet *ifp, u_long dl_tag, int sync_ok);
-typedef int (*dl_pre_output_func)(struct ifnet *ifp,
- struct mbuf **m,
- struct sockaddr *dest,
- caddr_t route_entry,
- char *frame_type,
- char *dst_addr,
- u_long dl_tag);
-
-typedef int (*dl_event_func)(struct kern_event_msg *event,
- u_long dl_tag);
-
-typedef int (*dl_offer_func)(struct mbuf *m, char *frame_header);
-typedef int (*dl_ioctl_func)(u_long dl_tag,
- struct ifnet *ifp,
- u_long ioctl_cmd,
- caddr_t ioctl_arg);
-
-
-
-#ifdef __APPLE_API_PRIVATE
-struct dlil_filterq_entry {
- TAILQ_ENTRY(dlil_filterq_entry) que;
- u_long filter_id;
- int type;
- union {
- struct dlil_if_flt_str if_filter;
- struct dlil_pr_flt_str pr_filter;
- } variants;
-};
-#else
-struct dlil_filterq_entry;
-#endif /* __APPLE_API_PRIVATE */
-
-TAILQ_HEAD(dlil_filterq_head, dlil_filterq_entry);
-
-
-struct if_proto {
- TAILQ_ENTRY(if_proto) next;
- u_long dl_tag;
- struct dlil_filterq_head pr_flt_head;
- struct ifnet *ifp;
- dl_input_func dl_input;
- dl_pre_output_func dl_pre_output;
- dl_event_func dl_event;
- dl_offer_func dl_offer;
- dl_ioctl_func dl_ioctl;
- u_long protocol_family;
- u_long reserved[4];
-
-};
-
-#ifdef __APPLE_API_PRIVATE
-TAILQ_HEAD(dlil_proto_head, if_proto);
-
-struct dlil_tag_list_entry {
- TAILQ_ENTRY(dlil_tag_list_entry) next;
- struct ifnet *ifp;
- u_long dl_tag;
-};
-#endif /* __APPLE_API_PRIVATE */
-
-
-#ifdef __APPLE_API_OBSOLETE
-/* Obsolete types */
-#define DLIL_DESC_RAW 1
-#define DLIL_DESC_802_2 2
-#define DLIL_DESC_802_2_SNAP 3
-/*
- * DLIL_DESC_RAW - obsolete type, data in variants.bitmask or native_type
- * if variants.bitmask.proto_id_length, native_type in host
- * byte order.
- * DLIL_DESC_802_2 - obsolete, data in variants.desc_802_2
- * DLIL_DESC_802_2_SNAP - obsolete, data in variants.desc_802_2_SNAP
- * protocol field in host byte order
- */
-#endif /* __APPLE_API_OBSOLETE */
-
-/* Ehernet specific types */