]> arthur.barton.de Git - netatalk.git/blob - sys/solaris/if.h
Ensure TCP_NODELAY is set on the AFP session socket
[netatalk.git] / sys / solaris / if.h
1 struct 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
51 extern u_char   at_multicastaddr[ ETHERADDRL ];
52 extern u_char   at_org_code[ 3 ];
53 extern u_char   aarp_org_code[ 3 ];
54
55 int                     if_setaddr( queue_t *, mblk_t *, char *,
56                                 struct sockaddr_at * );
57 int                     if_getaddr(  char *, struct sockaddr_at * );
58 int                     if_addmulti( queue_t *, mblk_t *, char *,
59                                 struct sockaddr * );
60
61 struct atif_data        *if_alloc( queue_t * );
62 void                    if_free( struct atif_data * );
63 int                     if_name( struct atif_data *, char *, ulong );
64 int                     if_attach( struct atif_data *, char * );
65 struct atif_data        *if_primary( void );
66 struct atif_data        *if_dest( struct atif_data *, struct sockaddr_at * );
67 struct atif_data        *if_withaddr( struct sockaddr_at * );
68 struct atif_data        *if_withnet( struct sockaddr_at * );
69 int                     if_route( struct atif_data *, mblk_t *,
70                                 struct sockaddr_at * );
71
72 int                     dl_unitdata_req( queue_t *, mblk_t *, ushort, caddr_t );
73 int                     dl_enabmulti_req( queue_t *, caddr_t );
74 void                    aarp_send( struct atif_data *, int, caddr_t,
75                                 ushort, unchar );
76 int                     aarp_rput( queue_t *, mblk_t * );
77 int                     aarp_resolve( struct atif_data *, mblk_t *,
78                                 struct sockaddr_at *);
79 void                    aarp_init( struct atif_data * );
80 void                    aarp_clean( struct atif_data * );
81 int                     ddp_rput( struct atif_data *, mblk_t * );