1struct atif_data { 2 struct atif_data *aid_next, *aid_prev; 3 char aid_name[ IFNAMSIZ ]; 4 unchar aid_hwaddr[ ETHERADDRL ]; 5 queue_t *aid_q; /* RD() side */ 6 int aid_state; 7 int aid_flags; 8 struct sockaddr_at aid_sat; 9 struct netrange aid_nr; 10 struct aarplist *aid_aarplist, *aid_aarpflist; 11 /* solaris 7 wants timeout_id_t, but solaris 2.6 doesn't have that. 12 * so, we compromise with an unsigned long as we know that's big 13 * enough to hold a pointer. */ 14#ifdef HAVE_TIMEOUT_ID_T 15 timeout_id_t aid_aarptimeo; 16#else 17 unsigned long aid_aarptimeo; 18#endif 19 /* 20 * A little bit of cleverness, to overcome the inability of 21 * streams to sleep. The type of context must be checked before 22 * the data is accessed. The atif_data can't be freed if the 23 * type is non-zero. 24 */ 25 struct { 26 int c_type; /* ioctl command */ 27 union { 28 struct { /* unit select */ 29 mblk_t *uu_m; 30 ulong uu_ppa; 31 } u_unit; 32 struct { /* set addr */ 33 mblk_t *ua_m; 34 queue_t *ua_q; 35 int ua_probecnt; 36 int ua_netcnt; 37 int ua_nodecnt; 38 } u_addr; 39 struct { /* add multi */ 40 mblk_t *um_m; 41 queue_t *um_q; 42 } u_multi; 43 } c_u; 44 } aid_c; 45}; 46 47#define AIDF_LOOPBACK (1<<0) 48#define AIDF_PROBING (1<<1) 49#define AIDF_PROBEFAILED (1<<2) 50 51extern u_char at_multicastaddr[ ETHERADDRL ]; 52extern u_char at_org_code[ 3 ]; 53extern u_char aarp_org_code[ 3 ]; 54 55int if_setaddr( queue_t *, mblk_t *, char *, 56 struct sockaddr_at * ); 57int if_getaddr( char *, struct sockaddr_at * ); 58int if_addmulti( queue_t *, mblk_t *, char *, 59 struct sockaddr * ); 60 61struct atif_data *if_alloc( queue_t * ); 62void if_free( struct atif_data * ); 63int if_name( struct atif_data *, char *, ulong ); 64int if_attach( struct atif_data *, char * ); 65struct atif_data *if_primary( void ); 66struct atif_data *if_dest( struct atif_data *, struct sockaddr_at * ); 67struct atif_data *if_withaddr( struct sockaddr_at * ); 68struct atif_data *if_withnet( struct sockaddr_at * ); 69int if_route( struct atif_data *, mblk_t *, 70 struct sockaddr_at * ); 71 72int dl_unitdata_req( queue_t *, mblk_t *, ushort, caddr_t ); 73int dl_enabmulti_req( queue_t *, caddr_t ); 74void aarp_send( struct atif_data *, int, caddr_t, 75 ushort, unchar ); 76int aarp_rput( queue_t *, mblk_t * ); 77int aarp_resolve( struct atif_data *, mblk_t *, 78 struct sockaddr_at *); 79void aarp_init( struct atif_data * ); 80void aarp_clean( struct atif_data * ); 81int ddp_rput( struct atif_data *, mblk_t * ); 82