if_wanpipe_common.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. #ifndef _WANPIPE_SOCK_DRIVER_COMMON_H
  16. #define _WANPIPE_SOCK_DRIVER_COMMON_H
  17. typedef struct {
  18. struct net_device *slave;
  19. atomic_t packet_sent;
  20. atomic_t receive_block;
  21. atomic_t command;
  22. atomic_t disconnect;
  23. atomic_t driver_busy;
  24. long common_critical;
  25. struct timer_list *tx_timer;
  26. struct sock *sk; /* Wanpipe Sock bind's here */
  27. int (*func)(struct sk_buff *skb, struct net_device *dev,
  28. struct sock *sk);
  29. struct work_struct wanpipe_work; /* deferred keventd work */
  30. unsigned char rw_bind; /* Sock bind state */
  31. unsigned char usedby;
  32. unsigned char state;
  33. unsigned char svc;
  34. unsigned short lcn;
  35. void *mbox;
  36. } wanpipe_common_t;
  37. enum {
  38. WANSOCK_UNCONFIGURED, /* link/channel is not configured */
  39. WANSOCK_DISCONNECTED, /* link/channel is disconnected */
  40. WANSOCK_CONNECTING, /* connection is in progress */
  41. WANSOCK_CONNECTED, /* link/channel is operational */
  42. WANSOCK_LIMIT, /* for verification only */
  43. WANSOCK_DUALPORT, /* for Dual Port cards */
  44. WANSOCK_DISCONNECTING,
  45. WANSOCK_BINDED,
  46. WANSOCK_BIND_LISTEN,
  47. WANSOCK_LISTEN
  48. };
  49. #endif