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

Go to the source code of this file.

Data Structures

struct  lapb_frame
 
struct  lapb_cb
 

Macros

#define LAPB_HEADER_LEN   20 /* LAPB over Ethernet + a bit more */
 
#define LAPB_ACK_PENDING_CONDITION   0x01
 
#define LAPB_REJECT_CONDITION   0x02
 
#define LAPB_PEER_RX_BUSY_CONDITION   0x04
 
#define LAPB_I   0x00 /* Information frames */
 
#define LAPB_S   0x01 /* Supervisory frames */
 
#define LAPB_U   0x03 /* Unnumbered frames */
 
#define LAPB_RR   0x01 /* Receiver ready */
 
#define LAPB_RNR   0x05 /* Receiver not ready */
 
#define LAPB_REJ   0x09 /* Reject */
 
#define LAPB_SABM   0x2F /* Set Asynchronous Balanced Mode */
 
#define LAPB_SABME   0x6F /* Set Asynchronous Balanced Mode Extended */
 
#define LAPB_DISC   0x43 /* Disconnect */
 
#define LAPB_DM   0x0F /* Disconnected mode */
 
#define LAPB_UA   0x63 /* Unnumbered acknowledge */
 
#define LAPB_FRMR   0x87 /* Frame reject */
 
#define LAPB_ILLEGAL   0x100 /* Impossible to be a real frame type */
 
#define LAPB_SPF   0x10 /* Poll/final bit for standard LAPB */
 
#define LAPB_EPF   0x01 /* Poll/final bit for extended LAPB */
 
#define LAPB_FRMR_W   0x01 /* Control field invalid */
 
#define LAPB_FRMR_X   0x02 /* I field invalid */
 
#define LAPB_FRMR_Y   0x04 /* I field too long */
 
#define LAPB_FRMR_Z   0x08 /* Invalid N(R) */
 
#define LAPB_POLLOFF   0
 
#define LAPB_POLLON   1
 
#define LAPB_COMMAND   1
 
#define LAPB_RESPONSE   2
 
#define LAPB_ADDR_A   0x03
 
#define LAPB_ADDR_B   0x01
 
#define LAPB_ADDR_C   0x0F
 
#define LAPB_ADDR_D   0x07
 
#define LAPB_DEFAULT_MODE   (LAPB_STANDARD | LAPB_SLP | LAPB_DTE)
 
#define LAPB_DEFAULT_WINDOW   7 /* Window=7 */
 
#define LAPB_DEFAULT_T1   (5 * HZ) /* T1=5s */
 
#define LAPB_DEFAULT_T2   (1 * HZ) /* T2=1s */
 
#define LAPB_DEFAULT_N2   20 /* N2=20 */
 
#define LAPB_SMODULUS   8
 
#define LAPB_EMODULUS   128
 
#define LAPB_DEBUG   0
 
#define lapb_dbg(level, fmt,...)
 

Enumerations

enum  {
  LAPB_STATE_0, LAPB_STATE_1, LAPB_STATE_2, LAPB_STATE_3,
  LAPB_STATE_4
}
 

Functions

void lapb_connect_confirmation (struct lapb_cb *lapb, int)
 
void lapb_connect_indication (struct lapb_cb *lapb, int)
 
void lapb_disconnect_confirmation (struct lapb_cb *lapb, int)
 
void lapb_disconnect_indication (struct lapb_cb *lapb, int)
 
int lapb_data_indication (struct lapb_cb *lapb, struct sk_buff *)
 
int lapb_data_transmit (struct lapb_cb *lapb, struct sk_buff *)
 
void lapb_data_input (struct lapb_cb *lapb, struct sk_buff *)
 
void lapb_kick (struct lapb_cb *lapb)
 
void lapb_transmit_buffer (struct lapb_cb *lapb, struct sk_buff *, int)
 
void lapb_establish_data_link (struct lapb_cb *lapb)
 
void lapb_enquiry_response (struct lapb_cb *lapb)
 
void lapb_timeout_response (struct lapb_cb *lapb)
 
void lapb_check_iframes_acked (struct lapb_cb *lapb, unsigned short)
 
void lapb_check_need_response (struct lapb_cb *lapb, int, int)
 
void lapb_clear_queues (struct lapb_cb *lapb)
 
void lapb_frames_acked (struct lapb_cb *lapb, unsigned short)
 
void lapb_requeue_frames (struct lapb_cb *lapb)
 
int lapb_validate_nr (struct lapb_cb *lapb, unsigned short)
 
int lapb_decode (struct lapb_cb *lapb, struct sk_buff *, struct lapb_frame *)
 
void lapb_send_control (struct lapb_cb *lapb, int, int, int)
 
void lapb_transmit_frmr (struct lapb_cb *lapb)
 
void lapb_start_t1timer (struct lapb_cb *lapb)
 
void lapb_start_t2timer (struct lapb_cb *lapb)
 
void lapb_stop_t1timer (struct lapb_cb *lapb)
 
void lapb_stop_t2timer (struct lapb_cb *lapb)
 
int lapb_t1timer_running (struct lapb_cb *lapb)
 

Macro Definition Documentation

#define LAPB_ACK_PENDING_CONDITION   0x01

Definition at line 7 of file lapb.h.

#define LAPB_ADDR_A   0x03

Definition at line 44 of file lapb.h.

#define LAPB_ADDR_B   0x01

Definition at line 45 of file lapb.h.

#define LAPB_ADDR_C   0x0F

Definition at line 46 of file lapb.h.

#define LAPB_ADDR_D   0x07

Definition at line 47 of file lapb.h.

#define LAPB_COMMAND   1

Definition at line 41 of file lapb.h.

#define lapb_dbg (   level,
  fmt,
  ... 
)
Value:
do { \
if (level < LAPB_DEBUG) \
pr_debug(fmt, ##__VA_ARGS__); \
} while (0)

Definition at line 152 of file lapb.h.

#define LAPB_DEBUG   0

Definition at line 150 of file lapb.h.

#define LAPB_DEFAULT_MODE   (LAPB_STANDARD | LAPB_SLP | LAPB_DTE)

Definition at line 58 of file lapb.h.

#define LAPB_DEFAULT_N2   20 /* N2=20 */

Definition at line 62 of file lapb.h.

#define LAPB_DEFAULT_T1   (5 * HZ) /* T1=5s */

Definition at line 60 of file lapb.h.

#define LAPB_DEFAULT_T2   (1 * HZ) /* T2=1s */

Definition at line 61 of file lapb.h.

#define LAPB_DEFAULT_WINDOW   7 /* Window=7 */

Definition at line 59 of file lapb.h.

#define LAPB_DISC   0x43 /* Disconnect */

Definition at line 22 of file lapb.h.

#define LAPB_DM   0x0F /* Disconnected mode */

Definition at line 23 of file lapb.h.

#define LAPB_EMODULUS   128

Definition at line 65 of file lapb.h.

#define LAPB_EPF   0x01 /* Poll/final bit for extended LAPB */

Definition at line 30 of file lapb.h.

#define LAPB_FRMR   0x87 /* Frame reject */

Definition at line 25 of file lapb.h.

#define LAPB_FRMR_W   0x01 /* Control field invalid */

Definition at line 32 of file lapb.h.

#define LAPB_FRMR_X   0x02 /* I field invalid */

Definition at line 33 of file lapb.h.

#define LAPB_FRMR_Y   0x04 /* I field too long */

Definition at line 34 of file lapb.h.

#define LAPB_FRMR_Z   0x08 /* Invalid N(R) */

Definition at line 35 of file lapb.h.

#define LAPB_HEADER_LEN   20 /* LAPB over Ethernet + a bit more */

Definition at line 5 of file lapb.h.

#define LAPB_I   0x00 /* Information frames */

Definition at line 12 of file lapb.h.

#define LAPB_ILLEGAL   0x100 /* Impossible to be a real frame type */

Definition at line 27 of file lapb.h.

#define LAPB_PEER_RX_BUSY_CONDITION   0x04

Definition at line 9 of file lapb.h.

#define LAPB_POLLOFF   0

Definition at line 37 of file lapb.h.

#define LAPB_POLLON   1

Definition at line 38 of file lapb.h.

#define LAPB_REJ   0x09 /* Reject */

Definition at line 18 of file lapb.h.

#define LAPB_REJECT_CONDITION   0x02

Definition at line 8 of file lapb.h.

#define LAPB_RESPONSE   2

Definition at line 42 of file lapb.h.

#define LAPB_RNR   0x05 /* Receiver not ready */

Definition at line 17 of file lapb.h.

#define LAPB_RR   0x01 /* Receiver ready */

Definition at line 16 of file lapb.h.

#define LAPB_S   0x01 /* Supervisory frames */

Definition at line 13 of file lapb.h.

#define LAPB_SABM   0x2F /* Set Asynchronous Balanced Mode */

Definition at line 20 of file lapb.h.

#define LAPB_SABME   0x6F /* Set Asynchronous Balanced Mode Extended */

Definition at line 21 of file lapb.h.

#define LAPB_SMODULUS   8

Definition at line 64 of file lapb.h.

#define LAPB_SPF   0x10 /* Poll/final bit for standard LAPB */

Definition at line 29 of file lapb.h.

#define LAPB_U   0x03 /* Unnumbered frames */

Definition at line 14 of file lapb.h.

#define LAPB_UA   0x63 /* Unnumbered acknowledge */

Definition at line 24 of file lapb.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
LAPB_STATE_0 
LAPB_STATE_1 
LAPB_STATE_2 
LAPB_STATE_3 
LAPB_STATE_4 

Definition at line 50 of file lapb.h.

Function Documentation

void lapb_check_iframes_acked ( struct lapb_cb lapb,
unsigned  short 
)

Definition at line 195 of file lapb_out.c.

void lapb_check_need_response ( struct lapb_cb lapb,
int  ,
int   
)

Definition at line 207 of file lapb_out.c.

void lapb_clear_queues ( struct lapb_cb lapb)

Definition at line 40 of file lapb_subr.c.

void lapb_connect_confirmation ( struct lapb_cb lapb,
int   
)

Definition at line 373 of file lapb_iface.c.

void lapb_connect_indication ( struct lapb_cb lapb,
int   
)

Definition at line 379 of file lapb_iface.c.

int lapb_data_indication ( struct lapb_cb lapb,
struct sk_buff  
)

Definition at line 397 of file lapb_iface.c.

void lapb_data_input ( struct lapb_cb lapb,
struct sk_buff  
)

Definition at line 539 of file lapb_in.c.

int lapb_data_transmit ( struct lapb_cb lapb,
struct sk_buff  
)

Definition at line 406 of file lapb_iface.c.

int lapb_decode ( struct lapb_cb lapb,
struct sk_buff ,
struct lapb_frame  
)

Definition at line 111 of file lapb_subr.c.

void lapb_disconnect_confirmation ( struct lapb_cb lapb,
int   
)

Definition at line 385 of file lapb_iface.c.

void lapb_disconnect_indication ( struct lapb_cb lapb,
int   
)

Definition at line 391 of file lapb_iface.c.

void lapb_enquiry_response ( struct lapb_cb lapb)

Definition at line 176 of file lapb_out.c.

void lapb_establish_data_link ( struct lapb_cb lapb)

Definition at line 159 of file lapb_out.c.

void lapb_frames_acked ( struct lapb_cb lapb,
unsigned  short 
)

Definition at line 51 of file lapb_subr.c.

void lapb_kick ( struct lapb_cb lapb)

Definition at line 71 of file lapb_out.c.

void lapb_requeue_frames ( struct lapb_cb lapb)

Definition at line 69 of file lapb_subr.c.

void lapb_send_control ( struct lapb_cb lapb,
int  ,
int  ,
int   
)

Definition at line 228 of file lapb_subr.c.

void lapb_start_t1timer ( struct lapb_cb lapb)

Definition at line 41 of file lapb_timer.c.

void lapb_start_t2timer ( struct lapb_cb lapb)

Definition at line 52 of file lapb_timer.c.

void lapb_stop_t1timer ( struct lapb_cb lapb)

Definition at line 63 of file lapb_timer.c.

void lapb_stop_t2timer ( struct lapb_cb lapb)

Definition at line 68 of file lapb_timer.c.

int lapb_t1timer_running ( struct lapb_cb lapb)

Definition at line 73 of file lapb_timer.c.

void lapb_timeout_response ( struct lapb_cb lapb)

Definition at line 186 of file lapb_out.c.

void lapb_transmit_buffer ( struct lapb_cb lapb,
struct sk_buff ,
int   
)

Definition at line 119 of file lapb_out.c.

void lapb_transmit_frmr ( struct lapb_cb lapb)

Definition at line 265 of file lapb_subr.c.

int lapb_validate_nr ( struct lapb_cb lapb,
unsigned  short 
)

Definition at line 91 of file lapb_subr.c.