blob: 6e5461d69fdd818d09c195b6f160d6cbfdc607f7 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*****************************************************************************
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
Linus Torvalds1da177e2005-04-16 15:20:36 -070020typedef struct {
21 struct net_device *slave;
22 atomic_t packet_sent;
23 atomic_t receive_block;
24 atomic_t command;
25 atomic_t disconnect;
26 atomic_t driver_busy;
27 long common_critical;
28 struct timer_list *tx_timer;
29 struct sock *sk; /* Wanpipe Sock bind's here */
30 int (*func)(struct sk_buff *skb, struct net_device *dev,
31 struct sock *sk);
32
33 struct work_struct wanpipe_work; /* deferred keventd work */
34 unsigned char rw_bind; /* Sock bind state */
35 unsigned char usedby;
36 unsigned char state;
37 unsigned char svc;
38 unsigned short lcn;
39 void *mbox;
40} wanpipe_common_t;
41
42
43enum {
44 WANSOCK_UNCONFIGURED, /* link/channel is not configured */
45 WANSOCK_DISCONNECTED, /* link/channel is disconnected */
46 WANSOCK_CONNECTING, /* connection is in progress */
47 WANSOCK_CONNECTED, /* link/channel is operational */
48 WANSOCK_LIMIT, /* for verification only */
49 WANSOCK_DUALPORT, /* for Dual Port cards */
50 WANSOCK_DISCONNECTING,
51 WANSOCK_BINDED,
52 WANSOCK_BIND_LISTEN,
53 WANSOCK_LISTEN
54};
55
56#endif
57
58