Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
x25.h File Reference
#include <linux/x25.h>
#include <linux/slab.h>
#include <net/sock.h>

Go to the source code of this file.

Data Structures

struct  x25_route
 
struct  x25_neigh
 
struct  x25_sock
 
struct  x25_forward
 
struct  x25_skb_cb
 

Macros

#define X25_ADDR_LEN   16
 
#define X25_MAX_L2_LEN   18 /* 802.2 LLC */
 
#define X25_STD_MIN_LEN   3
 
#define X25_EXT_MIN_LEN   4
 
#define X25_GFI_SEQ_MASK   0x30
 
#define X25_GFI_STDSEQ   0x10
 
#define X25_GFI_EXTSEQ   0x20
 
#define X25_Q_BIT   0x80
 
#define X25_D_BIT   0x40
 
#define X25_STD_M_BIT   0x10
 
#define X25_EXT_M_BIT   0x01
 
#define X25_CALL_REQUEST   0x0B
 
#define X25_CALL_ACCEPTED   0x0F
 
#define X25_CLEAR_REQUEST   0x13
 
#define X25_CLEAR_CONFIRMATION   0x17
 
#define X25_DATA   0x00
 
#define X25_INTERRUPT   0x23
 
#define X25_INTERRUPT_CONFIRMATION   0x27
 
#define X25_RR   0x01
 
#define X25_RNR   0x05
 
#define X25_REJ   0x09
 
#define X25_RESET_REQUEST   0x1B
 
#define X25_RESET_CONFIRMATION   0x1F
 
#define X25_REGISTRATION_REQUEST   0xF3
 
#define X25_REGISTRATION_CONFIRMATION   0xF7
 
#define X25_RESTART_REQUEST   0xFB
 
#define X25_RESTART_CONFIRMATION   0xFF
 
#define X25_DIAGNOSTIC   0xF1
 
#define X25_ILLEGAL   0xFD
 
#define X25_COND_ACK_PENDING   0x01
 
#define X25_COND_OWN_RX_BUSY   0x02
 
#define X25_COND_PEER_RX_BUSY   0x04
 
#define X25_DEFAULT_T20   (180 * HZ) /* Default T20 value */
 
#define X25_DEFAULT_T21   (200 * HZ) /* Default T21 value */
 
#define X25_DEFAULT_T22   (180 * HZ) /* Default T22 value */
 
#define X25_DEFAULT_T23   (180 * HZ) /* Default T23 value */
 
#define X25_DEFAULT_T2   (3 * HZ) /* Default ack holdback value */
 
#define X25_DEFAULT_WINDOW_SIZE   2 /* Default Window Size */
 
#define X25_DEFAULT_PACKET_SIZE   X25_PS128 /* Default Packet Size */
 
#define X25_DEFAULT_THROUGHPUT   0x0A /* Deafult Throughput */
 
#define X25_DEFAULT_REVERSE   0x00 /* Default Reverse Charging */
 
#define X25_SMODULUS   8
 
#define X25_EMODULUS   128
 
#define X25_FAC_CLASS_MASK   0xC0
 
#define X25_FAC_CLASS_A   0x00
 
#define X25_FAC_CLASS_B   0x40
 
#define X25_FAC_CLASS_C   0x80
 
#define X25_FAC_CLASS_D   0xC0
 
#define X25_FAC_REVERSE   0x01 /* also fast select */
 
#define X25_FAC_THROUGHPUT   0x02
 
#define X25_FAC_PACKET_SIZE   0x42
 
#define X25_FAC_WINDOW_SIZE   0x43
 
#define X25_MAX_FAC_LEN   60
 
#define X25_MAX_CUD_LEN   128
 
#define X25_FAC_CALLING_AE   0xCB
 
#define X25_FAC_CALLED_AE   0xC9
 
#define X25_MARKER   0x00
 
#define X25_DTE_SERVICES   0x0F
 
#define X25_MAX_AE_LEN   40 /* Max num of semi-octets in AE - OSI Nw */
 
#define X25_MAX_DTE_FACIL_LEN   21 /* Max length of DTE facility params */
 
#define X25_Q_BIT_FLAG   0
 
#define X25_INTERRUPT_FLAG   1
 
#define X25_ACCPT_APPRV_FLAG   2
 
#define X25_SKB_CB(s)   ((struct x25_skb_cb *) ((s)->cb))
 

Enumerations

enum  {
  X25_STATE_0, X25_STATE_1, X25_STATE_2, X25_STATE_3,
  X25_STATE_4
}
 
enum  { X25_LINK_STATE_0, X25_LINK_STATE_1, X25_LINK_STATE_2, X25_LINK_STATE_3 }
 

Functions

int x25_parse_address_block (struct sk_buff *skb, struct x25_address *called_addr, struct x25_address *calling_addr)
 
int x25_addr_ntoa (unsigned char *, struct x25_address *, struct x25_address *)
 
int x25_addr_aton (unsigned char *, struct x25_address *, struct x25_address *)
 
struct sockx25_find_socket (unsigned int, struct x25_neigh *)
 
void x25_destroy_socket_from_timer (struct sock *)
 
int x25_rx_call_request (struct sk_buff *, struct x25_neigh *, unsigned int)
 
void x25_kill_by_neigh (struct x25_neigh *)
 
void x25_send_frame (struct sk_buff *, struct x25_neigh *)
 
int x25_lapb_receive_frame (struct sk_buff *, struct net_device *, struct packet_type *, struct net_device *)
 
void x25_establish_link (struct x25_neigh *)
 
void x25_terminate_link (struct x25_neigh *)
 
int x25_parse_facilities (struct sk_buff *, struct x25_facilities *, struct x25_dte_facilities *, unsigned long *)
 
int x25_create_facilities (unsigned char *, struct x25_facilities *, struct x25_dte_facilities *, unsigned long)
 
int x25_negotiate_facilities (struct sk_buff *, struct sock *, struct x25_facilities *, struct x25_dte_facilities *)
 
void x25_limit_facilities (struct x25_facilities *, struct x25_neigh *)
 
void x25_clear_forward_by_lci (unsigned int lci)
 
void x25_clear_forward_by_dev (struct net_device *)
 
int x25_forward_data (int, struct x25_neigh *, struct sk_buff *)
 
int x25_forward_call (struct x25_address *, struct x25_neigh *, struct sk_buff *, int)
 
int x25_process_rx_frame (struct sock *, struct sk_buff *)
 
int x25_backlog_rcv (struct sock *, struct sk_buff *)
 
void x25_link_control (struct sk_buff *, struct x25_neigh *, unsigned short)
 
void x25_link_device_up (struct net_device *)
 
void x25_link_device_down (struct net_device *)
 
void x25_link_established (struct x25_neigh *)
 
void x25_link_terminated (struct x25_neigh *)
 
void x25_transmit_clear_request (struct x25_neigh *, unsigned int, unsigned char)
 
void x25_transmit_link (struct sk_buff *, struct x25_neigh *)
 
int x25_subscr_ioctl (unsigned int, void __user *)
 
struct x25_neighx25_get_neigh (struct net_device *)
 
void x25_link_free (void)
 
int x25_output (struct sock *, struct sk_buff *)
 
void x25_kick (struct sock *)
 
void x25_enquiry_response (struct sock *)
 
struct x25_routex25_get_route (struct x25_address *addr)
 
struct net_devicex25_dev_get (char *)
 
void x25_route_device_down (struct net_device *dev)
 
int x25_route_ioctl (unsigned int, void __user *)
 
void x25_route_free (void)
 
void x25_clear_queues (struct sock *)
 
void x25_frames_acked (struct sock *, unsigned short)
 
void x25_requeue_frames (struct sock *)
 
int x25_validate_nr (struct sock *, unsigned short)
 
void x25_write_internal (struct sock *, int)
 
int x25_decode (struct sock *, struct sk_buff *, int *, int *, int *, int *, int *)
 
void x25_disconnect (struct sock *, int, unsigned char, unsigned char)
 
void x25_init_timers (struct sock *sk)
 
void x25_start_heartbeat (struct sock *)
 
void x25_start_t2timer (struct sock *)
 
void x25_start_t21timer (struct sock *)
 
void x25_start_t22timer (struct sock *)
 
void x25_start_t23timer (struct sock *)
 
void x25_stop_heartbeat (struct sock *)
 
void x25_stop_timer (struct sock *)
 
unsigned long x25_display_timer (struct sock *)
 
void x25_check_rbuf (struct sock *)
 
int x25_proc_init (void)
 
void x25_proc_exit (void)
 

Variables

int sysctl_x25_restart_request_timeout
 
int sysctl_x25_call_request_timeout
 
int sysctl_x25_reset_request_timeout
 
int sysctl_x25_clear_request_timeout
 
int sysctl_x25_ack_holdback_timeout
 
int sysctl_x25_forward
 
struct hlist_head x25_list
 
rwlock_t x25_list_lock
 
struct list_head x25_route_list
 
rwlock_t x25_route_list_lock
 
struct list_head x25_forward_list
 
rwlock_t x25_forward_list_lock
 
struct list_head x25_neigh_list
 
rwlock_t x25_neigh_list_lock
 

Macro Definition Documentation

#define X25_ACCPT_APPRV_FLAG   2

Definition at line 117 of file x25.h.

#define X25_ADDR_LEN   16

Definition at line 16 of file x25.h.

#define X25_CALL_ACCEPTED   0x0F

Definition at line 33 of file x25.h.

#define X25_CALL_REQUEST   0x0B

Definition at line 32 of file x25.h.

#define X25_CLEAR_CONFIRMATION   0x17

Definition at line 35 of file x25.h.

#define X25_CLEAR_REQUEST   0x13

Definition at line 34 of file x25.h.

#define X25_COND_ACK_PENDING   0x01

Definition at line 53 of file x25.h.

#define X25_COND_OWN_RX_BUSY   0x02

Definition at line 54 of file x25.h.

#define X25_COND_PEER_RX_BUSY   0x04

Definition at line 55 of file x25.h.

#define X25_D_BIT   0x40

Definition at line 28 of file x25.h.

#define X25_DATA   0x00

Definition at line 36 of file x25.h.

#define X25_DEFAULT_PACKET_SIZE   X25_PS128 /* Default Packet Size */

Definition at line 80 of file x25.h.

#define X25_DEFAULT_REVERSE   0x00 /* Default Reverse Charging */

Definition at line 82 of file x25.h.

#define X25_DEFAULT_T2   (3 * HZ) /* Default ack holdback value */

Definition at line 77 of file x25.h.

#define X25_DEFAULT_T20   (180 * HZ) /* Default T20 value */

Definition at line 73 of file x25.h.

#define X25_DEFAULT_T21   (200 * HZ) /* Default T21 value */

Definition at line 74 of file x25.h.

#define X25_DEFAULT_T22   (180 * HZ) /* Default T22 value */

Definition at line 75 of file x25.h.

#define X25_DEFAULT_T23   (180 * HZ) /* Default T23 value */

Definition at line 76 of file x25.h.

#define X25_DEFAULT_THROUGHPUT   0x0A /* Deafult Throughput */

Definition at line 81 of file x25.h.

#define X25_DEFAULT_WINDOW_SIZE   2 /* Default Window Size */

Definition at line 79 of file x25.h.

#define X25_DIAGNOSTIC   0xF1

Definition at line 48 of file x25.h.

#define X25_DTE_SERVICES   0x0F

Definition at line 110 of file x25.h.

#define X25_EMODULUS   128

Definition at line 85 of file x25.h.

#define X25_EXT_M_BIT   0x01

Definition at line 30 of file x25.h.

#define X25_EXT_MIN_LEN   4

Definition at line 21 of file x25.h.

#define X25_FAC_CALLED_AE   0xC9

Definition at line 107 of file x25.h.

#define X25_FAC_CALLING_AE   0xCB

Definition at line 106 of file x25.h.

#define X25_FAC_CLASS_A   0x00

Definition at line 93 of file x25.h.

#define X25_FAC_CLASS_B   0x40

Definition at line 94 of file x25.h.

#define X25_FAC_CLASS_C   0x80

Definition at line 95 of file x25.h.

#define X25_FAC_CLASS_D   0xC0

Definition at line 96 of file x25.h.

#define X25_FAC_CLASS_MASK   0xC0

Definition at line 91 of file x25.h.

#define X25_FAC_PACKET_SIZE   0x42

Definition at line 100 of file x25.h.

#define X25_FAC_REVERSE   0x01 /* also fast select */

Definition at line 98 of file x25.h.

#define X25_FAC_THROUGHPUT   0x02

Definition at line 99 of file x25.h.

#define X25_FAC_WINDOW_SIZE   0x43

Definition at line 101 of file x25.h.

#define X25_GFI_EXTSEQ   0x20

Definition at line 25 of file x25.h.

#define X25_GFI_SEQ_MASK   0x30

Definition at line 23 of file x25.h.

#define X25_GFI_STDSEQ   0x10

Definition at line 24 of file x25.h.

#define X25_ILLEGAL   0xFD

Definition at line 49 of file x25.h.

#define X25_INTERRUPT   0x23

Definition at line 37 of file x25.h.

#define X25_INTERRUPT_CONFIRMATION   0x27

Definition at line 38 of file x25.h.

#define X25_INTERRUPT_FLAG   1

Definition at line 116 of file x25.h.

#define X25_MARKER   0x00

Definition at line 109 of file x25.h.

#define X25_MAX_AE_LEN   40 /* Max num of semi-octets in AE - OSI Nw */

Definition at line 111 of file x25.h.

#define X25_MAX_CUD_LEN   128

Definition at line 104 of file x25.h.

#define X25_MAX_DTE_FACIL_LEN   21 /* Max length of DTE facility params */

Definition at line 112 of file x25.h.

#define X25_MAX_FAC_LEN   60

Definition at line 103 of file x25.h.

#define X25_MAX_L2_LEN   18 /* 802.2 LLC */

Definition at line 18 of file x25.h.

#define X25_Q_BIT   0x80

Definition at line 27 of file x25.h.

#define X25_Q_BIT_FLAG   0

Definition at line 115 of file x25.h.

#define X25_REGISTRATION_CONFIRMATION   0xF7

Definition at line 45 of file x25.h.

#define X25_REGISTRATION_REQUEST   0xF3

Definition at line 44 of file x25.h.

#define X25_REJ   0x09

Definition at line 41 of file x25.h.

#define X25_RESET_CONFIRMATION   0x1F

Definition at line 43 of file x25.h.

#define X25_RESET_REQUEST   0x1B

Definition at line 42 of file x25.h.

#define X25_RESTART_CONFIRMATION   0xFF

Definition at line 47 of file x25.h.

#define X25_RESTART_REQUEST   0xFB

Definition at line 46 of file x25.h.

#define X25_RNR   0x05

Definition at line 40 of file x25.h.

#define X25_RR   0x01

Definition at line 39 of file x25.h.

#define X25_SKB_CB (   s)    ((struct x25_skb_cb *) ((s)->cb))

Definition at line 310 of file x25.h.

#define X25_SMODULUS   8

Definition at line 84 of file x25.h.

#define X25_STD_M_BIT   0x10

Definition at line 29 of file x25.h.

#define X25_STD_MIN_LEN   3

Definition at line 20 of file x25.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
X25_STATE_0 
X25_STATE_1 
X25_STATE_2 
X25_STATE_3 
X25_STATE_4 

Definition at line 58 of file x25.h.

anonymous enum
Enumerator:
X25_LINK_STATE_0 
X25_LINK_STATE_1 
X25_LINK_STATE_2 
X25_LINK_STATE_3 

Definition at line 66 of file x25.h.

Function Documentation

int x25_addr_aton ( unsigned char ,
struct x25_address ,
struct x25_address  
)

Definition at line 157 of file af_x25.c.

int x25_addr_ntoa ( unsigned char ,
struct x25_address ,
struct x25_address  
)

Definition at line 120 of file af_x25.c.

int x25_backlog_rcv ( struct sock ,
struct sk_buff  
)

Definition at line 409 of file x25_in.c.

void x25_check_rbuf ( struct sock )

Definition at line 375 of file x25_subr.c.

void x25_clear_forward_by_dev ( struct net_device )

Definition at line 152 of file x25_forward.c.

void x25_clear_forward_by_lci ( unsigned int  lci)

Definition at line 134 of file x25_forward.c.

void x25_clear_queues ( struct sock )

Definition at line 37 of file x25_subr.c.

int x25_create_facilities ( unsigned char ,
struct x25_facilities ,
struct x25_dte_facilities ,
unsigned  long 
)

Definition at line 187 of file x25_facilities.c.

int x25_decode ( struct sock ,
struct sk_buff ,
int ,
int ,
int ,
int ,
int  
)

Definition at line 268 of file x25_subr.c.

void x25_destroy_socket_from_timer ( struct sock )

Definition at line 426 of file af_x25.c.

struct net_device* x25_dev_get ( char )
read

Definition at line 131 of file x25_route.c.

void x25_disconnect ( struct sock ,
int  ,
unsigned  char,
unsigned  char 
)

Definition at line 347 of file x25_subr.c.

unsigned long x25_display_timer ( struct sock )

Definition at line 86 of file x25_timer.c.

void x25_enquiry_response ( struct sock )

Definition at line 218 of file x25_out.c.

void x25_establish_link ( struct x25_neigh )

Definition at line 149 of file x25_dev.c.

struct sock* x25_find_socket ( unsigned  int,
struct x25_neigh  
)
read

Definition at line 338 of file af_x25.c.

int x25_forward_call ( struct x25_address ,
struct x25_neigh ,
struct sk_buff ,
int   
)

Definition at line 19 of file x25_forward.c.

int x25_forward_data ( int  ,
struct x25_neigh ,
struct sk_buff  
)

Definition at line 94 of file x25_forward.c.

void x25_frames_acked ( struct sock ,
unsigned  short 
)

Definition at line 54 of file x25_subr.c.

struct x25_neigh* x25_get_neigh ( struct net_device )
read

Definition at line 317 of file x25_link.c.

struct x25_route* x25_get_route ( struct x25_address addr)
read

x25_get_route - Find a route given an X.25 address. - address to find a route for

Find a route given an X.25 address.

Definition at line 154 of file x25_route.c.

void x25_init_timers ( struct sock sk)

Definition at line 32 of file x25_timer.c.

void x25_kick ( struct sock )

Definition at line 141 of file x25_out.c.

void x25_kill_by_neigh ( struct x25_neigh )

Definition at line 1782 of file af_x25.c.

int x25_lapb_receive_frame ( struct sk_buff ,
struct net_device ,
struct packet_type ,
struct net_device  
)

Definition at line 97 of file x25_dev.c.

void x25_limit_facilities ( struct x25_facilities ,
struct x25_neigh  
)

Definition at line 334 of file x25_facilities.c.

void x25_link_control ( struct sk_buff ,
struct x25_neigh ,
unsigned  short 
)

Definition at line 72 of file x25_link.c.

void x25_link_device_down ( struct net_device )

Definition at line 295 of file x25_link.c.

void x25_link_device_up ( struct net_device )

Definition at line 245 of file x25_link.c.

void x25_link_established ( struct x25_neigh )

Definition at line 216 of file x25_link.c.

void x25_link_free ( void  )

Definition at line 393 of file x25_link.c.

void x25_link_terminated ( struct x25_neigh )

Definition at line 235 of file x25_link.c.

int x25_negotiate_facilities ( struct sk_buff ,
struct sock ,
struct x25_facilities ,
struct x25_dte_facilities  
)

Definition at line 264 of file x25_facilities.c.

int x25_output ( struct sock ,
struct sk_buff  
)

Definition at line 52 of file x25_out.c.

int x25_parse_address_block ( struct sk_buff skb,
struct x25_address called_addr,
struct x25_address calling_addr 
)

Definition at line 86 of file af_x25.c.

int x25_parse_facilities ( struct sk_buff skb,
struct x25_facilities facilities,
struct x25_dte_facilities dte_facs,
unsigned long vc_fac_mask 
)

x25_parse_facilities - Parse facilities from skb into the facilities structs

: sk_buff to parse : Regular facilities, updated as facilities are found : ITU DTE facilities, updated as DTE facilities are found : mask is updated with all facilities found

Return codes: -1 - Parsing error, caller should drop call and clean up 0 - Parse OK, this skb has no facilities >0 - Parse OK, returns the length of the facilities header

Definition at line 44 of file x25_facilities.c.

void x25_proc_exit ( void  )

Definition at line 264 of file x25_proc.c.

int x25_proc_init ( void  )

Definition at line 259 of file x25_proc.c.

int x25_process_rx_frame ( struct sock ,
struct sk_buff  
)

Definition at line 379 of file x25_in.c.

void x25_requeue_frames ( struct sock )

Definition at line 71 of file x25_subr.c.

void x25_route_device_down ( struct net_device dev)

Definition at line 109 of file x25_route.c.

void x25_route_free ( void  )

Definition at line 215 of file x25_route.c.

int x25_route_ioctl ( unsigned  int,
void __user  
)

Definition at line 182 of file x25_route.c.

int x25_rx_call_request ( struct sk_buff ,
struct x25_neigh ,
unsigned  int 
)

Definition at line 921 of file af_x25.c.

void x25_send_frame ( struct sk_buff ,
struct x25_neigh  
)

Definition at line 204 of file x25_dev.c.

void x25_start_heartbeat ( struct sock )

Definition at line 43 of file x25_timer.c.

void x25_start_t21timer ( struct sock )

Definition at line 60 of file x25_timer.c.

void x25_start_t22timer ( struct sock )

Definition at line 67 of file x25_timer.c.

void x25_start_t23timer ( struct sock )

Definition at line 74 of file x25_timer.c.

void x25_start_t2timer ( struct sock )

Definition at line 53 of file x25_timer.c.

void x25_stop_heartbeat ( struct sock )

Definition at line 48 of file x25_timer.c.

void x25_stop_timer ( struct sock )

Definition at line 81 of file x25_timer.c.

int x25_subscr_ioctl ( unsigned  int,
void __user  
)

Definition at line 341 of file x25_link.c.

void x25_terminate_link ( struct x25_neigh )

Definition at line 178 of file x25_dev.c.

void x25_transmit_clear_request ( struct x25_neigh ,
unsigned  int,
unsigned  char 
)

Definition at line 168 of file x25_link.c.

void x25_transmit_link ( struct sk_buff ,
struct x25_neigh  
)

Definition at line 195 of file x25_link.c.

int x25_validate_nr ( struct sock ,
unsigned  short 
)

Definition at line 93 of file x25_subr.c.

void x25_write_internal ( struct sock ,
int   
)

Definition at line 112 of file x25_subr.c.

Variable Documentation

int sysctl_x25_ack_holdback_timeout

Definition at line 67 of file af_x25.c.

int sysctl_x25_call_request_timeout

Definition at line 64 of file af_x25.c.

int sysctl_x25_clear_request_timeout

Definition at line 66 of file af_x25.c.

int sysctl_x25_forward

Definition at line 68 of file af_x25.c.

int sysctl_x25_reset_request_timeout

Definition at line 65 of file af_x25.c.

int sysctl_x25_restart_request_timeout

Definition at line 63 of file af_x25.c.

struct list_head x25_forward_list
rwlock_t x25_forward_list_lock
struct hlist_head x25_list
rwlock_t x25_list_lock
struct list_head x25_neigh_list
rwlock_t x25_neigh_list_lock
struct list_head x25_route_list
rwlock_t x25_route_list_lock