X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/1c79356b52d46aa6b508fb032f5ae709b1f2897b..0c530ab8987f0ae6a1a3d9284f40182b88852816:/bsd/netat/nbp.h?ds=sidebyside diff --git a/bsd/netat/nbp.h b/bsd/netat/nbp.h index d6386b349..648d373a1 100644 --- a/bsd/netat/nbp.h +++ b/bsd/netat/nbp.h @@ -52,6 +52,9 @@ #ifndef _NETAT_NBP_H_ #define _NETAT_NBP_H_ +#include + +#ifdef __APPLE_API_OBSOLETE /* NBP packet types */ @@ -88,15 +91,23 @@ #define NBP_HDR_SIZE 2 typedef struct at_nbp { - unsigned control : 4, - tuple_count : 4; +#if BYTE_ORDER == BIG_ENDIAN + unsigned + control : 4, + tuple_count : 4; +#endif +#if BYTE_ORDER == LITTLE_ENDIAN + unsigned + tuple_count : 4, + control : 4; +#endif u_char at_nbp_id; at_nbptuple_t tuple[NBP_TUPLE_MAX]; } at_nbp_t; #define DEFAULT_ZONE(zone) (!(zone)->len || ((zone)->len == 1 && (zone)->str[0] == '*')) -#ifdef KERNEL +#ifdef KERNEL_PRIVATE /* Struct for name registry */ typedef struct _nve_ { @@ -121,8 +132,10 @@ typedef struct _nve_ { #define NBP_WILD_TYPE 0x02 #define NBP_WILD_MASK 0x03 -typedef struct nbp_req { - int (*func)(); +struct nbp_req; +typedef struct nbp_req nbp_req_t; +struct nbp_req { + int (*func)(nbp_req_t *, nve_entry_t *); gbuf_t *response; /* the response datagram */ int space_unused; /* Space available in the resp */ /* packet. */ @@ -132,15 +145,16 @@ typedef struct nbp_req { u_char flags; /* Flags to indicate whether or */ /* not the request tuple has */ /* wildcards in it */ -} nbp_req_t; +}; extern int nbp_insert_entry(nve_entry_t *); extern u_int nbp_strhash (at_nvestr_t *); extern nve_entry_t *nbp_find_nve(nve_entry_t *); -extern int nbp_fillin_nve(); +extern int nbp_fillin_nve(at_entity_t *, nve_entry_t *); extern at_nvestr_t *getSPLocalZone(int); extern at_nvestr_t *getLocalZone(int); -#endif /* KERNEL */ +#endif /* KERNEL_PRIVATE */ +#endif /* __APPLE_API_OBSOLETE */ #endif /* _NETAT_NBP_H_ */