~ubuntu-branches/ubuntu/precise/netatalk/precise

« back to all changes in this revision

Viewing changes to sys/solaris/if.h

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Rittau
  • Date: 2004-01-19 12:43:49 UTC
  • Revision ID: james.westby@ubuntu.com-20040119124349-es563jbp0hk0ae51
Tags: upstream-1.6.4
ImportĀ upstreamĀ versionĀ 1.6.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
    unsigned long       aid_aarptimeo;
 
15
    /*
 
16
     * A little bit of cleverness, to overcome the inability of
 
17
     * streams to sleep.  The type of context must be checked before
 
18
     * the data is accessed.  The atif_data can't be freed if the
 
19
     * type is non-zero.
 
20
     */
 
21
    struct {
 
22
        int             c_type;                 /* ioctl command */
 
23
        union {
 
24
            struct {                            /* unit select */
 
25
                mblk_t          *uu_m;
 
26
                ulong           uu_ppa;
 
27
            }           u_unit;
 
28
            struct {                            /* set addr */
 
29
                mblk_t          *ua_m;
 
30
                queue_t         *ua_q;
 
31
                int             ua_probecnt;
 
32
                int             ua_netcnt;
 
33
                int             ua_nodecnt;
 
34
            }           u_addr;
 
35
            struct {                            /* add multi */
 
36
                mblk_t          *um_m;
 
37
                queue_t         *um_q;
 
38
            }           u_multi;
 
39
        }               c_u;
 
40
    }                   aid_c;
 
41
};
 
42
 
 
43
#define AIDF_LOOPBACK   (1<<0)
 
44
#define AIDF_PROBING    (1<<1)
 
45
#define AIDF_PROBEFAILED        (1<<2)
 
46
 
 
47
extern u_char   at_multicastaddr[ ETHERADDRL ];
 
48
extern u_char   at_org_code[ 3 ];
 
49
extern u_char   aarp_org_code[ 3 ];
 
50
 
 
51
int                     if_setaddr( queue_t *, mblk_t *, char *,
 
52
                                struct sockaddr_at * );
 
53
int                     if_getaddr(  char *, struct sockaddr_at * );
 
54
int                     if_addmulti( queue_t *, mblk_t *, char *,
 
55
                                struct sockaddr * );
 
56
 
 
57
struct atif_data        *if_alloc( queue_t * );
 
58
void                    if_free( struct atif_data * );
 
59
int                     if_name( struct atif_data *, char *, ulong );
 
60
int                     if_attach( struct atif_data *, char * );
 
61
struct atif_data        *if_primary( void );
 
62
struct atif_data        *if_dest( struct atif_data *, struct sockaddr_at * );
 
63
struct atif_data        *if_withaddr( struct sockaddr_at * );
 
64
struct atif_data        *if_withnet( struct sockaddr_at * );
 
65
int                     if_route( struct atif_data *, mblk_t *,
 
66
                                struct sockaddr_at * );
 
67
 
 
68
int                     dl_unitdata_req( queue_t *, mblk_t *, ushort, caddr_t );
 
69
int                     dl_enabmulti_req( queue_t *, caddr_t );
 
70
void                    aarp_send( struct atif_data *, int, caddr_t,
 
71
                                ushort, unchar );
 
72
int                     aarp_rput( queue_t *, mblk_t * );
 
73
int                     aarp_resolve( struct atif_data *, mblk_t *,
 
74
                                struct sockaddr_at *);
 
75
void                    aarp_init( struct atif_data * );
 
76
void                    aarp_clean( struct atif_data * );
 
77
int                     ddp_rput( struct atif_data *, mblk_t * );