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

Go to the source code of this file.

Data Structures

struct  rfcomm_hdr
 
struct  rfcomm_cmd
 
struct  rfcomm_mcc
 
struct  rfcomm_pn
 
struct  rfcomm_rpn
 
struct  rfcomm_rls
 
struct  rfcomm_msc
 
struct  rfcomm_session
 
struct  rfcomm_dlc
 
struct  sockaddr_rc
 
struct  rfcomm_conninfo
 
struct  rfcomm_pinfo
 
struct  rfcomm_dev_req
 
struct  rfcomm_dev_info
 
struct  rfcomm_dev_list_req
 

Macros

#define RFCOMM_PSM   3
 
#define RFCOMM_CONN_TIMEOUT   (HZ * 30)
 
#define RFCOMM_DISC_TIMEOUT   (HZ * 20)
 
#define RFCOMM_AUTH_TIMEOUT   (HZ * 25)
 
#define RFCOMM_IDLE_TIMEOUT   (HZ * 2)
 
#define RFCOMM_DEFAULT_MTU   127
 
#define RFCOMM_DEFAULT_CREDITS   7
 
#define RFCOMM_MAX_L2CAP_MTU   1013
 
#define RFCOMM_MAX_CREDITS   40
 
#define RFCOMM_SKB_HEAD_RESERVE   8
 
#define RFCOMM_SKB_TAIL_RESERVE   2
 
#define RFCOMM_SKB_RESERVE   (RFCOMM_SKB_HEAD_RESERVE + RFCOMM_SKB_TAIL_RESERVE)
 
#define RFCOMM_SABM   0x2f
 
#define RFCOMM_DISC   0x43
 
#define RFCOMM_UA   0x63
 
#define RFCOMM_DM   0x0f
 
#define RFCOMM_UIH   0xef
 
#define RFCOMM_TEST   0x08
 
#define RFCOMM_FCON   0x28
 
#define RFCOMM_FCOFF   0x18
 
#define RFCOMM_MSC   0x38
 
#define RFCOMM_RPN   0x24
 
#define RFCOMM_RLS   0x14
 
#define RFCOMM_PN   0x20
 
#define RFCOMM_NSC   0x04
 
#define RFCOMM_V24_FC   0x02
 
#define RFCOMM_V24_RTC   0x04
 
#define RFCOMM_V24_RTR   0x08
 
#define RFCOMM_V24_IC   0x40
 
#define RFCOMM_V24_DV   0x80
 
#define RFCOMM_RPN_BR_2400   0x0
 
#define RFCOMM_RPN_BR_4800   0x1
 
#define RFCOMM_RPN_BR_7200   0x2
 
#define RFCOMM_RPN_BR_9600   0x3
 
#define RFCOMM_RPN_BR_19200   0x4
 
#define RFCOMM_RPN_BR_38400   0x5
 
#define RFCOMM_RPN_BR_57600   0x6
 
#define RFCOMM_RPN_BR_115200   0x7
 
#define RFCOMM_RPN_BR_230400   0x8
 
#define RFCOMM_RPN_DATA_5   0x0
 
#define RFCOMM_RPN_DATA_6   0x1
 
#define RFCOMM_RPN_DATA_7   0x2
 
#define RFCOMM_RPN_DATA_8   0x3
 
#define RFCOMM_RPN_STOP_1   0
 
#define RFCOMM_RPN_STOP_15   1
 
#define RFCOMM_RPN_PARITY_NONE   0x0
 
#define RFCOMM_RPN_PARITY_ODD   0x1
 
#define RFCOMM_RPN_PARITY_EVEN   0x3
 
#define RFCOMM_RPN_PARITY_MARK   0x5
 
#define RFCOMM_RPN_PARITY_SPACE   0x7
 
#define RFCOMM_RPN_FLOW_NONE   0x00
 
#define RFCOMM_RPN_XON_CHAR   0x11
 
#define RFCOMM_RPN_XOFF_CHAR   0x13
 
#define RFCOMM_RPN_PM_BITRATE   0x0001
 
#define RFCOMM_RPN_PM_DATA   0x0002
 
#define RFCOMM_RPN_PM_STOP   0x0004
 
#define RFCOMM_RPN_PM_PARITY   0x0008
 
#define RFCOMM_RPN_PM_PARITY_TYPE   0x0010
 
#define RFCOMM_RPN_PM_XON   0x0020
 
#define RFCOMM_RPN_PM_XOFF   0x0040
 
#define RFCOMM_RPN_PM_FLOW   0x3F00
 
#define RFCOMM_RPN_PM_ALL   0x3F7F
 
#define RFCOMM_RX_THROTTLED   0
 
#define RFCOMM_TX_THROTTLED   1
 
#define RFCOMM_TIMED_OUT   2
 
#define RFCOMM_MSC_PENDING   3
 
#define RFCOMM_SEC_PENDING   4
 
#define RFCOMM_AUTH_PENDING   5
 
#define RFCOMM_AUTH_ACCEPT   6
 
#define RFCOMM_AUTH_REJECT   7
 
#define RFCOMM_DEFER_SETUP   8
 
#define RFCOMM_ENC_DROP   9
 
#define RFCOMM_SCHED_WAKEUP   31
 
#define RFCOMM_MSCEX_TX   1
 
#define RFCOMM_MSCEX_RX   2
 
#define RFCOMM_MSCEX_OK   (RFCOMM_MSCEX_TX + RFCOMM_MSCEX_RX)
 
#define RFCOMM_CFC_UNKNOWN   -1
 
#define RFCOMM_CFC_DISABLED   0
 
#define RFCOMM_CFC_ENABLED   RFCOMM_MAX_CREDITS
 
#define rfcomm_dlc_lock(d)   spin_lock(&d->lock)
 
#define rfcomm_dlc_unlock(d)   spin_unlock(&d->lock)
 
#define RFCOMM_CONNINFO   0x02
 
#define RFCOMM_LM   0x03
 
#define RFCOMM_LM_MASTER   0x0001
 
#define RFCOMM_LM_AUTH   0x0002
 
#define RFCOMM_LM_ENCRYPT   0x0004
 
#define RFCOMM_LM_TRUSTED   0x0008
 
#define RFCOMM_LM_RELIABLE   0x0010
 
#define RFCOMM_LM_SECURE   0x0020
 
#define rfcomm_pi(sk)   ((struct rfcomm_pinfo *) sk)
 
#define RFCOMM_MAX_DEV   256
 
#define RFCOMMCREATEDEV   _IOW('R', 200, int)
 
#define RFCOMMRELEASEDEV   _IOW('R', 201, int)
 
#define RFCOMMGETDEVLIST   _IOR('R', 210, int)
 
#define RFCOMMGETDEVINFO   _IOR('R', 211, int)
 
#define RFCOMMSTEALDLC   _IOW('R', 220, int)
 
#define RFCOMM_REUSE_DLC   0
 
#define RFCOMM_RELEASE_ONHUP   1
 
#define RFCOMM_HANGUP_NOW   2
 
#define RFCOMM_TTY_ATTACHED   3
 
#define RFCOMM_TTY_RELEASED   4
 

Functions

int rfcomm_send_rpn (struct rfcomm_session *s, int cr, u8 dlci, u8 bit_rate, u8 data_bits, u8 stop_bits, u8 parity, u8 flow_ctrl_settings, u8 xon_char, u8 xoff_char, u16 param_mask)
 
struct rfcomm_dlcrfcomm_dlc_alloc (gfp_t prio)
 
void rfcomm_dlc_free (struct rfcomm_dlc *d)
 
int rfcomm_dlc_open (struct rfcomm_dlc *d, bdaddr_t *src, bdaddr_t *dst, u8 channel)
 
int rfcomm_dlc_close (struct rfcomm_dlc *d, int reason)
 
int rfcomm_dlc_send (struct rfcomm_dlc *d, struct sk_buff *skb)
 
int rfcomm_dlc_set_modem_status (struct rfcomm_dlc *d, u8 v24_sig)
 
int rfcomm_dlc_get_modem_status (struct rfcomm_dlc *d, u8 *v24_sig)
 
void rfcomm_dlc_accept (struct rfcomm_dlc *d)
 
void __rfcomm_dlc_throttle (struct rfcomm_dlc *d)
 
void __rfcomm_dlc_unthrottle (struct rfcomm_dlc *d)
 
void rfcomm_session_getaddr (struct rfcomm_session *s, bdaddr_t *src, bdaddr_t *dst)
 
int rfcomm_init_sockets (void)
 
void rfcomm_cleanup_sockets (void)
 
int rfcomm_connect_ind (struct rfcomm_session *s, u8 channel, struct rfcomm_dlc **d)
 
int rfcomm_dev_ioctl (struct sock *sk, unsigned int cmd, void __user *arg)
 

Variables

struct rfcomm_hdr __packed
 

Macro Definition Documentation

#define RFCOMM_AUTH_ACCEPT   6

Definition at line 211 of file rfcomm.h.

#define RFCOMM_AUTH_PENDING   5

Definition at line 210 of file rfcomm.h.

#define RFCOMM_AUTH_REJECT   7

Definition at line 212 of file rfcomm.h.

#define RFCOMM_AUTH_TIMEOUT   (HZ * 25)

Definition at line 31 of file rfcomm.h.

#define RFCOMM_CFC_DISABLED   0

Definition at line 226 of file rfcomm.h.

#define RFCOMM_CFC_ENABLED   RFCOMM_MAX_CREDITS

Definition at line 227 of file rfcomm.h.

#define RFCOMM_CFC_UNKNOWN   -1

Definition at line 225 of file rfcomm.h.

#define RFCOMM_CONN_TIMEOUT   (HZ * 30)

Definition at line 29 of file rfcomm.h.

#define RFCOMM_CONNINFO   0x02

Definition at line 291 of file rfcomm.h.

#define RFCOMM_DEFAULT_CREDITS   7

Definition at line 35 of file rfcomm.h.

#define RFCOMM_DEFAULT_MTU   127

Definition at line 34 of file rfcomm.h.

#define RFCOMM_DEFER_SETUP   8

Definition at line 213 of file rfcomm.h.

#define RFCOMM_DISC   0x43

Definition at line 45 of file rfcomm.h.

#define RFCOMM_DISC_TIMEOUT   (HZ * 20)

Definition at line 30 of file rfcomm.h.

#define rfcomm_dlc_lock (   d)    spin_lock(&d->lock)

Definition at line 246 of file rfcomm.h.

#define rfcomm_dlc_unlock (   d)    spin_unlock(&d->lock)

Definition at line 247 of file rfcomm.h.

#define RFCOMM_DM   0x0f

Definition at line 47 of file rfcomm.h.

#define RFCOMM_ENC_DROP   9

Definition at line 214 of file rfcomm.h.

#define RFCOMM_FCOFF   0x18

Definition at line 52 of file rfcomm.h.

#define RFCOMM_FCON   0x28

Definition at line 51 of file rfcomm.h.

#define RFCOMM_HANGUP_NOW   2

Definition at line 332 of file rfcomm.h.

#define RFCOMM_IDLE_TIMEOUT   (HZ * 2)

Definition at line 32 of file rfcomm.h.

#define RFCOMM_LM   0x03

Definition at line 297 of file rfcomm.h.

#define RFCOMM_LM_AUTH   0x0002

Definition at line 299 of file rfcomm.h.

#define RFCOMM_LM_ENCRYPT   0x0004

Definition at line 300 of file rfcomm.h.

#define RFCOMM_LM_MASTER   0x0001

Definition at line 298 of file rfcomm.h.

#define RFCOMM_LM_RELIABLE   0x0010

Definition at line 302 of file rfcomm.h.

#define RFCOMM_LM_SECURE   0x0020

Definition at line 303 of file rfcomm.h.

#define RFCOMM_LM_TRUSTED   0x0008

Definition at line 301 of file rfcomm.h.

#define RFCOMM_MAX_CREDITS   40

Definition at line 38 of file rfcomm.h.

#define RFCOMM_MAX_DEV   256

Definition at line 322 of file rfcomm.h.

#define RFCOMM_MAX_L2CAP_MTU   1013

Definition at line 37 of file rfcomm.h.

#define RFCOMM_MSC   0x38

Definition at line 53 of file rfcomm.h.

#define RFCOMM_MSC_PENDING   3

Definition at line 208 of file rfcomm.h.

#define RFCOMM_MSCEX_OK   (RFCOMM_MSCEX_TX + RFCOMM_MSCEX_RX)

Definition at line 222 of file rfcomm.h.

#define RFCOMM_MSCEX_RX   2

Definition at line 221 of file rfcomm.h.

#define RFCOMM_MSCEX_TX   1

Definition at line 220 of file rfcomm.h.

#define RFCOMM_NSC   0x04

Definition at line 57 of file rfcomm.h.

#define rfcomm_pi (   sk)    ((struct rfcomm_pinfo *) sk)

Definition at line 305 of file rfcomm.h.

#define RFCOMM_PN   0x20

Definition at line 56 of file rfcomm.h.

#define RFCOMM_PSM   3

Definition at line 27 of file rfcomm.h.

#define RFCOMM_RELEASE_ONHUP   1

Definition at line 331 of file rfcomm.h.

#define RFCOMM_REUSE_DLC   0

Definition at line 330 of file rfcomm.h.

#define RFCOMM_RLS   0x14

Definition at line 55 of file rfcomm.h.

#define RFCOMM_RPN   0x24

Definition at line 54 of file rfcomm.h.

#define RFCOMM_RPN_BR_115200   0x7

Definition at line 72 of file rfcomm.h.

#define RFCOMM_RPN_BR_19200   0x4

Definition at line 69 of file rfcomm.h.

#define RFCOMM_RPN_BR_230400   0x8

Definition at line 73 of file rfcomm.h.

#define RFCOMM_RPN_BR_2400   0x0

Definition at line 65 of file rfcomm.h.

#define RFCOMM_RPN_BR_38400   0x5

Definition at line 70 of file rfcomm.h.

#define RFCOMM_RPN_BR_4800   0x1

Definition at line 66 of file rfcomm.h.

#define RFCOMM_RPN_BR_57600   0x6

Definition at line 71 of file rfcomm.h.

#define RFCOMM_RPN_BR_7200   0x2

Definition at line 67 of file rfcomm.h.

#define RFCOMM_RPN_BR_9600   0x3

Definition at line 68 of file rfcomm.h.

#define RFCOMM_RPN_DATA_5   0x0

Definition at line 75 of file rfcomm.h.

#define RFCOMM_RPN_DATA_6   0x1

Definition at line 76 of file rfcomm.h.

#define RFCOMM_RPN_DATA_7   0x2

Definition at line 77 of file rfcomm.h.

#define RFCOMM_RPN_DATA_8   0x3

Definition at line 78 of file rfcomm.h.

#define RFCOMM_RPN_FLOW_NONE   0x00

Definition at line 89 of file rfcomm.h.

#define RFCOMM_RPN_PARITY_EVEN   0x3

Definition at line 85 of file rfcomm.h.

#define RFCOMM_RPN_PARITY_MARK   0x5

Definition at line 86 of file rfcomm.h.

#define RFCOMM_RPN_PARITY_NONE   0x0

Definition at line 83 of file rfcomm.h.

#define RFCOMM_RPN_PARITY_ODD   0x1

Definition at line 84 of file rfcomm.h.

#define RFCOMM_RPN_PARITY_SPACE   0x7

Definition at line 87 of file rfcomm.h.

#define RFCOMM_RPN_PM_ALL   0x3F7F

Definition at line 103 of file rfcomm.h.

#define RFCOMM_RPN_PM_BITRATE   0x0001

Definition at line 94 of file rfcomm.h.

#define RFCOMM_RPN_PM_DATA   0x0002

Definition at line 95 of file rfcomm.h.

#define RFCOMM_RPN_PM_FLOW   0x3F00

Definition at line 101 of file rfcomm.h.

#define RFCOMM_RPN_PM_PARITY   0x0008

Definition at line 97 of file rfcomm.h.

#define RFCOMM_RPN_PM_PARITY_TYPE   0x0010

Definition at line 98 of file rfcomm.h.

#define RFCOMM_RPN_PM_STOP   0x0004

Definition at line 96 of file rfcomm.h.

#define RFCOMM_RPN_PM_XOFF   0x0040

Definition at line 100 of file rfcomm.h.

#define RFCOMM_RPN_PM_XON   0x0020

Definition at line 99 of file rfcomm.h.

#define RFCOMM_RPN_STOP_1   0

Definition at line 80 of file rfcomm.h.

#define RFCOMM_RPN_STOP_15   1

Definition at line 81 of file rfcomm.h.

#define RFCOMM_RPN_XOFF_CHAR   0x13

Definition at line 92 of file rfcomm.h.

#define RFCOMM_RPN_XON_CHAR   0x11

Definition at line 91 of file rfcomm.h.

#define RFCOMM_RX_THROTTLED   0

Definition at line 205 of file rfcomm.h.

#define RFCOMM_SABM   0x2f

Definition at line 44 of file rfcomm.h.

#define RFCOMM_SCHED_WAKEUP   31

Definition at line 217 of file rfcomm.h.

#define RFCOMM_SEC_PENDING   4

Definition at line 209 of file rfcomm.h.

#define RFCOMM_SKB_HEAD_RESERVE   8

Definition at line 40 of file rfcomm.h.

#define RFCOMM_SKB_RESERVE   (RFCOMM_SKB_HEAD_RESERVE + RFCOMM_SKB_TAIL_RESERVE)

Definition at line 42 of file rfcomm.h.

#define RFCOMM_SKB_TAIL_RESERVE   2

Definition at line 41 of file rfcomm.h.

#define RFCOMM_TEST   0x08

Definition at line 50 of file rfcomm.h.

#define RFCOMM_TIMED_OUT   2

Definition at line 207 of file rfcomm.h.

#define RFCOMM_TTY_ATTACHED   3

Definition at line 333 of file rfcomm.h.

#define RFCOMM_TTY_RELEASED   4

Definition at line 334 of file rfcomm.h.

#define RFCOMM_TX_THROTTLED   1

Definition at line 206 of file rfcomm.h.

#define RFCOMM_UA   0x63

Definition at line 46 of file rfcomm.h.

#define RFCOMM_UIH   0xef

Definition at line 48 of file rfcomm.h.

#define RFCOMM_V24_DV   0x80

Definition at line 63 of file rfcomm.h.

#define RFCOMM_V24_FC   0x02

Definition at line 59 of file rfcomm.h.

#define RFCOMM_V24_IC   0x40

Definition at line 62 of file rfcomm.h.

#define RFCOMM_V24_RTC   0x04

Definition at line 60 of file rfcomm.h.

#define RFCOMM_V24_RTR   0x08

Definition at line 61 of file rfcomm.h.

#define RFCOMMCREATEDEV   _IOW('R', 200, int)

Definition at line 324 of file rfcomm.h.

#define RFCOMMGETDEVINFO   _IOR('R', 211, int)

Definition at line 327 of file rfcomm.h.

#define RFCOMMGETDEVLIST   _IOR('R', 210, int)

Definition at line 326 of file rfcomm.h.

#define RFCOMMRELEASEDEV   _IOW('R', 201, int)

Definition at line 325 of file rfcomm.h.

#define RFCOMMSTEALDLC   _IOW('R', 220, int)

Definition at line 328 of file rfcomm.h.

Function Documentation

void __rfcomm_dlc_throttle ( struct rfcomm_dlc d)

Definition at line 526 of file core.c.

void __rfcomm_dlc_unthrottle ( struct rfcomm_dlc d)

Definition at line 537 of file core.c.

void rfcomm_cleanup_sockets ( void  )

Definition at line 1066 of file sock.c.

int rfcomm_connect_ind ( struct rfcomm_session s,
u8  channel,
struct rfcomm_dlc **  d 
)

Definition at line 920 of file sock.c.

int rfcomm_dev_ioctl ( struct sock sk,
unsigned int  cmd,
void __user arg 
)

Definition at line 519 of file tty.c.

void rfcomm_dlc_accept ( struct rfcomm_dlc d)

Definition at line 1237 of file core.c.

struct rfcomm_dlc* rfcomm_dlc_alloc ( gfp_t  prio)
read

Definition at line 307 of file core.c.

int rfcomm_dlc_close ( struct rfcomm_dlc d,
int  reason 
)

Definition at line 494 of file core.c.

void rfcomm_dlc_free ( struct rfcomm_dlc d)

Definition at line 327 of file core.c.

int rfcomm_dlc_get_modem_status ( struct rfcomm_dlc d,
u8 v24_sig 
)

Definition at line 571 of file core.c.

int rfcomm_dlc_open ( struct rfcomm_dlc d,
bdaddr_t *  src,
bdaddr_t *  dst,
u8  channel 
)

Definition at line 428 of file core.c.

int rfcomm_dlc_send ( struct rfcomm_dlc d,
struct sk_buff skb 
)

Definition at line 506 of file core.c.

int rfcomm_dlc_set_modem_status ( struct rfcomm_dlc d,
u8  v24_sig 
)

Definition at line 553 of file core.c.

int rfcomm_init_sockets ( void  )

Definition at line 1029 of file sock.c.

int rfcomm_send_rpn ( struct rfcomm_session s,
int  cr,
u8  dlci,
u8  bit_rate,
u8  data_bits,
u8  stop_bits,
u8  parity,
u8  flow_ctrl_settings,
u8  xon_char,
u8  xoff_char,
u16  param_mask 
)

Definition at line 900 of file core.c.

void rfcomm_session_getaddr ( struct rfcomm_session s,
bdaddr_t *  src,
bdaddr_t *  dst 
)

Definition at line 726 of file core.c.

Variable Documentation