Automatic merge of rsync://rsync.kernel.org/pub/scm/linux/kernel/git/gregkh/driver...
[linux-2.6/verdex.git] / include / linux / if_wanpipe_common.h
blobf25fec8ee2cafee5d0e4780f3e8b49c3bb54cf56
1 /*****************************************************************************
2 * if_wanipe_common.h Sangoma Driver/Socket common area definitions.
4 * Author: Nenad Corbic <ncorbic@sangoma.com>
6 * Copyright: (c) 2000 Sangoma Technologies Inc.
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 *****************************************************************************/
17 #ifndef _WANPIPE_SOCK_DRIVER_COMMON_H
18 #define _WANPIPE_SOCK_DRIVER_COMMON_H
20 #include <linux/version.h>
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);
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;
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
58 #endif