Subversion Repositories shark

Rev

Rev 422 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
422 giacomo 1
/*****************************************************************************
2
* if_wanipe_common.h   Sangoma Driver/Socket common area definitions.
3
*
4
* Author:       Nenad Corbic <ncorbic@sangoma.com>
5
*
6
* Copyright:    (c) 2000 Sangoma Technologies Inc.
7
*
8
*               This program is free software; you can redistribute it and/or
9
*               modify it under the terms of the GNU General Public License
10
*               as published by the Free Software Foundation; either version
11
*               2 of the License, or (at your option) any later version.
12
* ============================================================================
13
* Jan 13, 2000  Nenad Corbic      Initial version
14
*****************************************************************************/
15
 
16
 
17
#ifndef _WANPIPE_SOCK_DRIVER_COMMON_H
18
#define _WANPIPE_SOCK_DRIVER_COMMON_H
19
 
20
#include <linux/version.h>
21
 
22
typedef struct {
23
        struct net_device *slave;
24
        atomic_t packet_sent;
25
        atomic_t receive_block;
26
        atomic_t command;
27
        atomic_t disconnect;
28
        atomic_t driver_busy;
29
        long common_critical;
30
        struct timer_list *tx_timer;
31
        struct sock *sk;                /* Wanpipe Sock bind's here */
32
        int (*func)(struct sk_buff *skb, struct net_device *dev,
33
                    struct sock *sk);
34
 
35
        struct work_struct wanpipe_work;    /* deferred keventd work */
36
        unsigned char rw_bind;                    /* Sock bind state */
37
        unsigned char usedby;
38
        unsigned char state;
39
        unsigned char svc;
40
        unsigned short lcn;
41
        void *mbox;
42
} wanpipe_common_t;
43
 
44
 
45
enum {
46
        WANSOCK_UNCONFIGURED,   /* link/channel is not configured */
47
        WANSOCK_DISCONNECTED,   /* link/channel is disconnected */
48
        WANSOCK_CONNECTING,             /* connection is in progress */
49
        WANSOCK_CONNECTED,              /* link/channel is operational */
50
        WANSOCK_LIMIT,          /* for verification only */
51
        WANSOCK_DUALPORT,               /* for Dual Port cards */
52
        WANSOCK_DISCONNECTING,
53
        WANSOCK_BINDED,
54
        WANSOCK_BIND_LISTEN,
55
        WANSOCK_LISTEN
56
};
57
 
58
#endif
59
 
60