Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations
wanrouter.h File Reference

Go to the source code of this file.

Data Structures

struct  wan_x25_conf
 
struct  wan_fr_conf
 
struct  wan_ppp_conf
 
struct  wan_chdlc_conf
 
struct  wandev_conf
 
struct  wandev_stat
 
struct  wanif_conf
 

Macros

#define ROUTER_NAME   "wanrouter" /* in case we ever change it */
 
#define ROUTER_VERSION   1 /* version number */
 
#define ROUTER_RELEASE   1 /* release (minor version) number */
 
#define ROUTER_IOCTL   'W' /* for IOCTL calls */
 
#define ROUTER_MAGIC   0x524D4157L /* signature: 'WANR' reversed */
 
#define PROC_DATA_PORT_0   0x8000 /* the data is for port 0 */
 
#define PROC_DATA_PORT_1   0x8001 /* the data is for port 1 */
 
#define NLPID_IP   0xCC /* Internet Protocol Datagram */
 
#define NLPID_SNAP   0x80 /* IEEE Subnetwork Access Protocol */
 
#define NLPID_CLNP   0x81 /* ISO/IEC 8473 */
 
#define NLPID_ESIS   0x82 /* ISO/IEC 9542 */
 
#define NLPID_ISIS   0x83 /* ISO/IEC ISIS */
 
#define NLPID_Q933   0x08 /* CCITT Q.933 */
 
#define WAN_IFNAME_SZ   15 /* max length of the interface name */
 
#define WAN_DRVNAME_SZ   15 /* max length of the link driver name */
 
#define WAN_ADDRESS_SZ   31 /* max length of the WAN media address */
 
#define USED_BY_FIELD   8 /* max length of the used by field */
 
#define UDP_PTPIPE_TYPE   0x01
 
#define UDP_FPIPE_TYPE   0x02
 
#define UDP_CPIPE_TYPE   0x03
 
#define UDP_DRVSTATS_TYPE   0x04
 
#define UDP_INVALID_TYPE   0x05
 
#define CMD_OK   0 /* normal firmware return code */
 
#define CMD_TIMEOUT   0xFF /* firmware command timed out */
 
#define UDP_PKT_FRM_STACK   0x00
 
#define UDP_PKT_FRM_NETWORK   0x01
 
#define MAX_INTR_TEST_COUNTER   100
 
#define CRITICAL_IN_ISR   0xA1
 
#define CRITICAL_INTR_HANDLED   0xB1
 
#define WANCONFIG_X25   101 /* X.25 link */
 
#define WANCONFIG_FR   102 /* frame relay link */
 
#define WANCONFIG_PPP   103 /* synchronous PPP link */
 
#define WANCONFIG_CHDLC   104 /* Cisco HDLC Link */
 
#define WANCONFIG_BSC   105 /* BiSync Streaming */
 
#define WANCONFIG_HDLC   106 /* HDLC Support */
 
#define WANCONFIG_MPPP   107 /* Multi Port PPP over RAW CHDLC */
 
#define WANOPT_OFF   0
 
#define WANOPT_ON   1
 
#define WANOPT_NO   0
 
#define WANOPT_YES   1
 
#define WANOPT_RS232   0
 
#define WANOPT_V35   1
 
#define WANOPT_NRZ   0
 
#define WANOPT_NRZI   1
 
#define WANOPT_FM0   2
 
#define WANOPT_FM1   3
 
#define WANOPT_POINTTOPOINT   0 /* RTS always active */
 
#define WANOPT_MULTIDROP   1 /* RTS is active when transmitting */
 
#define WANOPT_EXTERNAL   0
 
#define WANOPT_INTERNAL   1
 
#define WANOPT_DTE   0
 
#define WANOPT_DCE   1
 
#define WANOPT_CPE   0
 
#define WANOPT_NODE   1
 
#define WANOPT_SECONDARY   0
 
#define WANOPT_PRIMARY   1
 
#define WANOPT_PERMANENT   0 /* DTR always active */
 
#define WANOPT_SWITCHED   1 /* use DTR to setup link (dial-up) */
 
#define WANOPT_ONDEMAND   2 /* activate DTR only before sending */
 
#define WANOPT_FR_ANSI   1 /* ANSI T1.617 Annex D */
 
#define WANOPT_FR_Q933   2 /* ITU Q.933A */
 
#define WANOPT_FR_LMI   3 /* LMI */
 
#define WANOPT_PPP_STATIC   0
 
#define WANOPT_PPP_HOST   1
 
#define WANOPT_PPP_PEER   2
 
#define WANOPT_ONE   1
 
#define WANOPT_TWO   2
 
#define WANOPT_ONE_AND_HALF   3
 
#define WANOPT_NONE   0
 
#define WANOPT_ODD   1
 
#define WANOPT_EVEN   2
 
#define WANOPT_PRI   0
 
#define WANOPT_SEC   1
 
#define WANOPT_INTR   0
 
#define WANOPT_POLL   1
 
#define WANOPT_TTY_SYNC   0
 
#define WANOPT_TTY_ASYNC   1
 
#define WAN_MODEM_CTS   0x0001 /* CTS line active */
 
#define WAN_MODEM_DCD   0x0002 /* DCD line active */
 
#define WAN_MODEM_DTR   0x0010 /* DTR line active */
 
#define WAN_MODEM_RTS   0x0020 /* RTS line active */
 

Typedefs

typedef struct wan_x25_conf wan_x25_conf_t
 
typedef struct wan_fr_conf wan_fr_conf_t
 
typedef struct wan_ppp_conf wan_ppp_conf_t
 
typedef struct wan_chdlc_conf wan_chdlc_conf_t
 
typedef struct wandev_conf wandev_conf_t
 
typedef struct wandev_stat wandev_stat_t
 
typedef struct wanif_conf wanif_conf_t
 

Enumerations

enum  router_ioctls {
  ROUTER_SETUP = ROUTER_IOCTL<<8, ROUTER_DOWN, ROUTER_STAT, ROUTER_IFNEW,
  ROUTER_IFDEL, ROUTER_IFSTAT, ROUTER_USER = (ROUTER_IOCTL<<8)+16, ROUTER_USER_MAX = (ROUTER_IOCTL<<8)+31
}
 
enum  wan_states {
  WAN_UNCONFIGURED, WAN_DISCONNECTED, WAN_CONNECTING, WAN_CONNECTED,
  WAN_LIMIT, WAN_DUALPORT, WAN_DISCONNECTING, WAN_FT1_READY
}
 
enum  { WAN_LOCAL_IP, WAN_POINTOPOINT_IP, WAN_NETMASK_IP, WAN_BROADCAST_IP }
 

Macro Definition Documentation

#define CMD_OK   0 /* normal firmware return code */

Definition at line 95 of file wanrouter.h.

#define CMD_TIMEOUT   0xFF /* firmware command timed out */

Definition at line 96 of file wanrouter.h.

#define CRITICAL_IN_ISR   0xA1

Definition at line 106 of file wanrouter.h.

#define CRITICAL_INTR_HANDLED   0xB1

Definition at line 107 of file wanrouter.h.

#define MAX_INTR_TEST_COUNTER   100

Definition at line 103 of file wanrouter.h.

#define NLPID_CLNP   0x81 /* ISO/IEC 8473 */

Definition at line 76 of file wanrouter.h.

#define NLPID_ESIS   0x82 /* ISO/IEC 9542 */

Definition at line 77 of file wanrouter.h.

#define NLPID_IP   0xCC /* Internet Protocol Datagram */

Definition at line 74 of file wanrouter.h.

#define NLPID_ISIS   0x83 /* ISO/IEC ISIS */

Definition at line 78 of file wanrouter.h.

#define NLPID_Q933   0x08 /* CCITT Q.933 */

Definition at line 79 of file wanrouter.h.

#define NLPID_SNAP   0x80 /* IEEE Subnetwork Access Protocol */

Definition at line 75 of file wanrouter.h.

#define PROC_DATA_PORT_0   0x8000 /* the data is for port 0 */

Definition at line 70 of file wanrouter.h.

#define PROC_DATA_PORT_1   0x8001 /* the data is for port 1 */

Definition at line 71 of file wanrouter.h.

#define ROUTER_IOCTL   'W' /* for IOCTL calls */

Definition at line 53 of file wanrouter.h.

#define ROUTER_MAGIC   0x524D4157L /* signature: 'WANR' reversed */

Definition at line 54 of file wanrouter.h.

#define ROUTER_NAME   "wanrouter" /* in case we ever change it */

Definition at line 50 of file wanrouter.h.

#define ROUTER_RELEASE   1 /* release (minor version) number */

Definition at line 52 of file wanrouter.h.

#define ROUTER_VERSION   1 /* version number */

Definition at line 51 of file wanrouter.h.

#define UDP_CPIPE_TYPE   0x03

Definition at line 90 of file wanrouter.h.

#define UDP_DRVSTATS_TYPE   0x04

Definition at line 91 of file wanrouter.h.

#define UDP_FPIPE_TYPE   0x02

Definition at line 89 of file wanrouter.h.

#define UDP_INVALID_TYPE   0x05

Definition at line 92 of file wanrouter.h.

#define UDP_PKT_FRM_NETWORK   0x01

Definition at line 100 of file wanrouter.h.

#define UDP_PKT_FRM_STACK   0x00

Definition at line 99 of file wanrouter.h.

#define UDP_PTPIPE_TYPE   0x01

Definition at line 88 of file wanrouter.h.

#define USED_BY_FIELD   8 /* max length of the used by field */

Definition at line 85 of file wanrouter.h.

#define WAN_ADDRESS_SZ   31 /* max length of the WAN media address */

Definition at line 84 of file wanrouter.h.

#define WAN_DRVNAME_SZ   15 /* max length of the link driver name */

Definition at line 83 of file wanrouter.h.

#define WAN_IFNAME_SZ   15 /* max length of the interface name */

Definition at line 82 of file wanrouter.h.

#define WAN_MODEM_CTS   0x0001 /* CTS line active */

Definition at line 383 of file wanrouter.h.

#define WAN_MODEM_DCD   0x0002 /* DCD line active */

Definition at line 384 of file wanrouter.h.

#define WAN_MODEM_DTR   0x0010 /* DTR line active */

Definition at line 385 of file wanrouter.h.

#define WAN_MODEM_RTS   0x0020 /* RTS line active */

Definition at line 386 of file wanrouter.h.

#define WANCONFIG_BSC   105 /* BiSync Streaming */

Definition at line 248 of file wanrouter.h.

#define WANCONFIG_CHDLC   104 /* Cisco HDLC Link */

Definition at line 247 of file wanrouter.h.

#define WANCONFIG_FR   102 /* frame relay link */

Definition at line 245 of file wanrouter.h.

#define WANCONFIG_HDLC   106 /* HDLC Support */

Definition at line 249 of file wanrouter.h.

#define WANCONFIG_MPPP   107 /* Multi Port PPP over RAW CHDLC */

Definition at line 250 of file wanrouter.h.

#define WANCONFIG_PPP   103 /* synchronous PPP link */

Definition at line 246 of file wanrouter.h.

#define WANCONFIG_X25   101 /* X.25 link */

Definition at line 244 of file wanrouter.h.

#define WANOPT_CPE   0

Definition at line 282 of file wanrouter.h.

#define WANOPT_DCE   1

Definition at line 281 of file wanrouter.h.

#define WANOPT_DTE   0

Definition at line 280 of file wanrouter.h.

#define WANOPT_EVEN   2

Definition at line 309 of file wanrouter.h.

#define WANOPT_EXTERNAL   0

Definition at line 276 of file wanrouter.h.

#define WANOPT_FM0   2

Definition at line 268 of file wanrouter.h.

#define WANOPT_FM1   3

Definition at line 269 of file wanrouter.h.

#define WANOPT_FR_ANSI   1 /* ANSI T1.617 Annex D */

Definition at line 293 of file wanrouter.h.

#define WANOPT_FR_LMI   3 /* LMI */

Definition at line 295 of file wanrouter.h.

#define WANOPT_FR_Q933   2 /* ITU Q.933A */

Definition at line 294 of file wanrouter.h.

#define WANOPT_INTERNAL   1

Definition at line 277 of file wanrouter.h.

#define WANOPT_INTR   0

Definition at line 323 of file wanrouter.h.

#define WANOPT_MULTIDROP   1 /* RTS is active when transmitting */

Definition at line 273 of file wanrouter.h.

#define WANOPT_NO   0

Definition at line 258 of file wanrouter.h.

#define WANOPT_NODE   1

Definition at line 283 of file wanrouter.h.

#define WANOPT_NONE   0

Definition at line 307 of file wanrouter.h.

#define WANOPT_NRZ   0

Definition at line 266 of file wanrouter.h.

#define WANOPT_NRZI   1

Definition at line 267 of file wanrouter.h.

#define WANOPT_ODD   1

Definition at line 308 of file wanrouter.h.

#define WANOPT_OFF   0

Definition at line 256 of file wanrouter.h.

#define WANOPT_ON   1

Definition at line 257 of file wanrouter.h.

#define WANOPT_ONDEMAND   2 /* activate DTR only before sending */

Definition at line 290 of file wanrouter.h.

#define WANOPT_ONE   1

Definition at line 303 of file wanrouter.h.

#define WANOPT_ONE_AND_HALF   3

Definition at line 305 of file wanrouter.h.

#define WANOPT_PERMANENT   0 /* DTR always active */

Definition at line 288 of file wanrouter.h.

#define WANOPT_POINTTOPOINT   0 /* RTS always active */

Definition at line 272 of file wanrouter.h.

#define WANOPT_POLL   1

Definition at line 324 of file wanrouter.h.

#define WANOPT_PPP_HOST   1

Definition at line 299 of file wanrouter.h.

#define WANOPT_PPP_PEER   2

Definition at line 300 of file wanrouter.h.

#define WANOPT_PPP_STATIC   0

Definition at line 298 of file wanrouter.h.

#define WANOPT_PRI   0

Definition at line 320 of file wanrouter.h.

#define WANOPT_PRIMARY   1

Definition at line 285 of file wanrouter.h.

#define WANOPT_RS232   0

Definition at line 262 of file wanrouter.h.

#define WANOPT_SEC   1

Definition at line 321 of file wanrouter.h.

#define WANOPT_SECONDARY   0

Definition at line 284 of file wanrouter.h.

#define WANOPT_SWITCHED   1 /* use DTR to setup link (dial-up) */

Definition at line 289 of file wanrouter.h.

#define WANOPT_TTY_ASYNC   1

Definition at line 328 of file wanrouter.h.

#define WANOPT_TTY_SYNC   0

Definition at line 327 of file wanrouter.h.

#define WANOPT_TWO   2

Definition at line 304 of file wanrouter.h.

#define WANOPT_V35   1

Definition at line 263 of file wanrouter.h.

#define WANOPT_YES   1

Definition at line 259 of file wanrouter.h.

Typedef Documentation

Enumeration Type Documentation

anonymous enum
Enumerator:
WAN_LOCAL_IP 
WAN_POINTOPOINT_IP 
WAN_NETMASK_IP 
WAN_BROADCAST_IP 

Definition at line 375 of file wanrouter.h.

Enumerator:
ROUTER_SETUP 
ROUTER_DOWN 
ROUTER_STAT 
ROUTER_IFNEW 
ROUTER_IFDEL 
ROUTER_IFSTAT 
ROUTER_USER 
ROUTER_USER_MAX 

Definition at line 57 of file wanrouter.h.

enum wan_states
Enumerator:
WAN_UNCONFIGURED 
WAN_DISCONNECTED 
WAN_CONNECTING 
WAN_CONNECTED 
WAN_LIMIT 
WAN_DUALPORT 
WAN_DISCONNECTING 
WAN_FT1_READY 

Definition at line 363 of file wanrouter.h.