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

Go to the source code of this file.

Data Structures

struct  llcp_sock_list
 
struct  nfc_llcp_local
 
struct  nfc_llcp_sock
 

Macros

#define LLCP_DEFAULT_LTO   100
 
#define LLCP_DEFAULT_RW   1
 
#define LLCP_DEFAULT_MIU   128
 
#define LLCP_MAX_LTO   0xff
 
#define LLCP_MAX_RW   15
 
#define LLCP_MAX_MIUX   0x7ff
 
#define LLCP_WKS_NUM_SAP   16
 
#define LLCP_SDP_NUM_SAP   16
 
#define LLCP_LOCAL_NUM_SAP   32
 
#define LLCP_LOCAL_SAP_OFFSET   (LLCP_WKS_NUM_SAP + LLCP_SDP_NUM_SAP)
 
#define LLCP_MAX_SAP   (LLCP_WKS_NUM_SAP + LLCP_SDP_NUM_SAP + LLCP_LOCAL_NUM_SAP)
 
#define LLCP_SDP_UNBOUND   (LLCP_MAX_SAP + 1)
 
#define nfc_llcp_sock(sk)   ((struct nfc_llcp_sock *) (sk))
 
#define nfc_llcp_dev(sk)   (nfc_llcp_sock((sk))->dev)
 
#define LLCP_HEADER_SIZE   2
 
#define LLCP_SEQUENCE_SIZE   1
 
#define LLCP_VERSION_10   0x10
 
#define LLCP_VERSION_11   0x11
 
#define LLCP_PDU_SYMM   0x0
 
#define LLCP_PDU_PAX   0x1
 
#define LLCP_PDU_AGF   0x2
 
#define LLCP_PDU_UI   0x3
 
#define LLCP_PDU_CONNECT   0x4
 
#define LLCP_PDU_DISC   0x5
 
#define LLCP_PDU_CC   0x6
 
#define LLCP_PDU_DM   0x7
 
#define LLCP_PDU_FRMR   0x8
 
#define LLCP_PDU_SNL   0x9
 
#define LLCP_PDU_I   0xc
 
#define LLCP_PDU_RR   0xd
 
#define LLCP_PDU_RNR   0xe
 
#define LLCP_TLV_VERSION   0x1
 
#define LLCP_TLV_MIUX   0x2
 
#define LLCP_TLV_WKS   0x3
 
#define LLCP_TLV_LTO   0x4
 
#define LLCP_TLV_RW   0x5
 
#define LLCP_TLV_SN   0x6
 
#define LLCP_TLV_OPT   0x7
 
#define LLCP_TLV_SDREQ   0x8
 
#define LLCP_TLV_SDRES   0x9
 
#define LLCP_TLV_MAX   0xa
 
#define LLCP_SAP_SDP   0x1
 
#define LLCP_SAP_IP   0x2
 
#define LLCP_SAP_OBEX   0x3
 
#define LLCP_SAP_SNEP   0x4
 
#define LLCP_SAP_MAX   0xff
 
#define LLCP_DM_DISC   0x00
 
#define LLCP_DM_NOCONN   0x01
 
#define LLCP_DM_NOBOUND   0x02
 
#define LLCP_DM_REJ   0x03
 

Enumerations

enum  llcp_state { LLCP_CONNECTED = 1, LLCP_CLOSED, LLCP_BOUND, LLCP_LISTEN }
 

Functions

void nfc_llcp_sock_link (struct llcp_sock_list *l, struct sock *s)
 
void nfc_llcp_sock_unlink (struct llcp_sock_list *l, struct sock *s)
 
struct nfc_llcp_localnfc_llcp_find_local (struct nfc_dev *dev)
 
struct nfc_llcp_localnfc_llcp_local_get (struct nfc_llcp_local *local)
 
int nfc_llcp_local_put (struct nfc_llcp_local *local)
 
u8 nfc_llcp_get_sdp_ssap (struct nfc_llcp_local *local, struct nfc_llcp_sock *sock)
 
u8 nfc_llcp_get_local_ssap (struct nfc_llcp_local *local)
 
void nfc_llcp_put_ssap (struct nfc_llcp_local *local, u8 ssap)
 
int nfc_llcp_queue_i_frames (struct nfc_llcp_sock *sock)
 
void nfc_llcp_send_to_raw_sock (struct nfc_llcp_local *local, struct sk_buff *skb, u8 direction)
 
struct socknfc_llcp_sock_alloc (struct socket *sock, int type, gfp_t gfp)
 
void nfc_llcp_sock_free (struct nfc_llcp_sock *sock)
 
void nfc_llcp_accept_unlink (struct sock *sk)
 
void nfc_llcp_accept_enqueue (struct sock *parent, struct sock *sk)
 
struct socknfc_llcp_accept_dequeue (struct sock *sk, struct socket *newsock)
 
int nfc_llcp_parse_gb_tlv (struct nfc_llcp_local *local, u8 *tlv_array, u16 tlv_array_len)
 
int nfc_llcp_parse_connection_tlv (struct nfc_llcp_sock *sock, u8 *tlv_array, u16 tlv_array_len)
 
void nfc_llcp_recv (void *data, struct sk_buff *skb, int err)
 
u8nfc_llcp_build_tlv (u8 type, u8 *value, u8 value_length, u8 *tlv_length)
 
int nfc_llcp_disconnect (struct nfc_llcp_sock *sock)
 
int nfc_llcp_send_symm (struct nfc_dev *dev)
 
int nfc_llcp_send_connect (struct nfc_llcp_sock *sock)
 
int nfc_llcp_send_cc (struct nfc_llcp_sock *sock)
 
int nfc_llcp_send_dm (struct nfc_llcp_local *local, u8 ssap, u8 dsap, u8 reason)
 
int nfc_llcp_send_disconnect (struct nfc_llcp_sock *sock)
 
int nfc_llcp_send_i_frame (struct nfc_llcp_sock *sock, struct msghdr *msg, size_t len)
 
int nfc_llcp_send_rr (struct nfc_llcp_sock *sock)
 
int __init nfc_llcp_sock_init (void)
 
void nfc_llcp_sock_exit (void)
 

Macro Definition Documentation

#define LLCP_DEFAULT_LTO   100

Definition at line 27 of file llcp.h.

#define LLCP_DEFAULT_MIU   128

Definition at line 29 of file llcp.h.

#define LLCP_DEFAULT_RW   1

Definition at line 28 of file llcp.h.

#define LLCP_DM_DISC   0x00

Definition at line 172 of file llcp.h.

#define LLCP_DM_NOBOUND   0x02

Definition at line 174 of file llcp.h.

#define LLCP_DM_NOCONN   0x01

Definition at line 173 of file llcp.h.

#define LLCP_DM_REJ   0x03

Definition at line 175 of file llcp.h.

#define LLCP_HEADER_SIZE   2

Definition at line 130 of file llcp.h.

#define LLCP_LOCAL_NUM_SAP   32

Definition at line 37 of file llcp.h.

#define LLCP_LOCAL_SAP_OFFSET   (LLCP_WKS_NUM_SAP + LLCP_SDP_NUM_SAP)

Definition at line 38 of file llcp.h.

#define LLCP_MAX_LTO   0xff

Definition at line 31 of file llcp.h.

#define LLCP_MAX_MIUX   0x7ff

Definition at line 33 of file llcp.h.

#define LLCP_MAX_RW   15

Definition at line 32 of file llcp.h.

#define LLCP_MAX_SAP   (LLCP_WKS_NUM_SAP + LLCP_SDP_NUM_SAP + LLCP_LOCAL_NUM_SAP)

Definition at line 39 of file llcp.h.

#define LLCP_PDU_AGF   0x2

Definition at line 140 of file llcp.h.

#define LLCP_PDU_CC   0x6

Definition at line 144 of file llcp.h.

#define LLCP_PDU_CONNECT   0x4

Definition at line 142 of file llcp.h.

#define LLCP_PDU_DISC   0x5

Definition at line 143 of file llcp.h.

#define LLCP_PDU_DM   0x7

Definition at line 145 of file llcp.h.

#define LLCP_PDU_FRMR   0x8

Definition at line 146 of file llcp.h.

#define LLCP_PDU_I   0xc

Definition at line 148 of file llcp.h.

#define LLCP_PDU_PAX   0x1

Definition at line 139 of file llcp.h.

#define LLCP_PDU_RNR   0xe

Definition at line 150 of file llcp.h.

#define LLCP_PDU_RR   0xd

Definition at line 149 of file llcp.h.

#define LLCP_PDU_SNL   0x9

Definition at line 147 of file llcp.h.

#define LLCP_PDU_SYMM   0x0

Definition at line 138 of file llcp.h.

#define LLCP_PDU_UI   0x3

Definition at line 141 of file llcp.h.

#define LLCP_SAP_IP   0x2

Definition at line 166 of file llcp.h.

#define LLCP_SAP_MAX   0xff

Definition at line 169 of file llcp.h.

#define LLCP_SAP_OBEX   0x3

Definition at line 167 of file llcp.h.

#define LLCP_SAP_SDP   0x1

Definition at line 165 of file llcp.h.

#define LLCP_SAP_SNEP   0x4

Definition at line 168 of file llcp.h.

#define LLCP_SDP_NUM_SAP   16

Definition at line 36 of file llcp.h.

#define LLCP_SDP_UNBOUND   (LLCP_MAX_SAP + 1)

Definition at line 40 of file llcp.h.

#define LLCP_SEQUENCE_SIZE   1

Definition at line 131 of file llcp.h.

#define LLCP_TLV_LTO   0x4

Definition at line 156 of file llcp.h.

#define LLCP_TLV_MAX   0xa

Definition at line 162 of file llcp.h.

#define LLCP_TLV_MIUX   0x2

Definition at line 154 of file llcp.h.

#define LLCP_TLV_OPT   0x7

Definition at line 159 of file llcp.h.

#define LLCP_TLV_RW   0x5

Definition at line 157 of file llcp.h.

#define LLCP_TLV_SDREQ   0x8

Definition at line 160 of file llcp.h.

#define LLCP_TLV_SDRES   0x9

Definition at line 161 of file llcp.h.

#define LLCP_TLV_SN   0x6

Definition at line 158 of file llcp.h.

#define LLCP_TLV_VERSION   0x1

Definition at line 153 of file llcp.h.

#define LLCP_TLV_WKS   0x3

Definition at line 155 of file llcp.h.

#define LLCP_VERSION_10   0x10

Definition at line 134 of file llcp.h.

#define LLCP_VERSION_11   0x11

Definition at line 135 of file llcp.h.

#define LLCP_WKS_NUM_SAP   16

Definition at line 35 of file llcp.h.

#define nfc_llcp_dev (   sk)    (nfc_llcp_sock((sk))->dev)

Definition at line 128 of file llcp.h.

#define nfc_llcp_sock (   sk)    ((struct nfc_llcp_sock *) (sk))

Definition at line 127 of file llcp.h.

Enumeration Type Documentation

enum llcp_state
Enumerator:
LLCP_CONNECTED 
LLCP_CLOSED 
LLCP_BOUND 
LLCP_LISTEN 

Definition at line 20 of file llcp.h.

Function Documentation

struct sock* nfc_llcp_accept_dequeue ( struct sock sk,
struct socket newsock 
)
read

Definition at line 253 of file sock.c.

void nfc_llcp_accept_enqueue ( struct sock parent,
struct sock sk 
)

Definition at line 239 of file sock.c.

void nfc_llcp_accept_unlink ( struct sock sk)

Definition at line 226 of file sock.c.

u8* nfc_llcp_build_tlv ( u8  type,
u8 value,
u8  value_length,
u8 tlv_length 
)

Definition at line 93 of file commands.c.

int nfc_llcp_disconnect ( struct nfc_llcp_sock sock)

Definition at line 259 of file commands.c.

struct nfc_llcp_local* nfc_llcp_find_local ( struct nfc_dev dev)
read

Definition at line 187 of file llcp.c.

u8 nfc_llcp_get_local_ssap ( struct nfc_llcp_local local)

Definition at line 329 of file llcp.c.

u8 nfc_llcp_get_sdp_ssap ( struct nfc_llcp_local local,
struct nfc_llcp_sock sock 
)

Definition at line 275 of file llcp.c.

struct nfc_llcp_local* nfc_llcp_local_get ( struct nfc_llcp_local local)
read

Definition at line 100 of file llcp.c.

int nfc_llcp_local_put ( struct nfc_llcp_local local)

Definition at line 124 of file llcp.c.

int nfc_llcp_parse_connection_tlv ( struct nfc_llcp_sock sock,
u8 tlv_array,
u16  tlv_array_len 
)

Definition at line 169 of file commands.c.

int nfc_llcp_parse_gb_tlv ( struct nfc_llcp_local local,
u8 tlv_array,
u16  tlv_array_len 
)

Definition at line 120 of file commands.c.

void nfc_llcp_put_ssap ( struct nfc_llcp_local local,
u8  ssap 
)

Definition at line 348 of file llcp.c.

int nfc_llcp_queue_i_frames ( struct nfc_llcp_sock sock)

Definition at line 831 of file llcp.c.

void nfc_llcp_recv ( void data,
struct sk_buff skb,
int  err 
)

Definition at line 1111 of file llcp.c.

int nfc_llcp_send_cc ( struct nfc_llcp_sock sock)

Definition at line 384 of file commands.c.

int nfc_llcp_send_connect ( struct nfc_llcp_sock sock)

Definition at line 321 of file commands.c.

int nfc_llcp_send_disconnect ( struct nfc_llcp_sock sock)

Definition at line 464 of file commands.c.

int nfc_llcp_send_dm ( struct nfc_llcp_local local,
u8  ssap,
u8  dsap,
u8  reason 
)

Definition at line 431 of file commands.c.

int nfc_llcp_send_i_frame ( struct nfc_llcp_sock sock,
struct msghdr msg,
size_t  len 
)

Definition at line 484 of file commands.c.

int nfc_llcp_send_rr ( struct nfc_llcp_sock sock)

Definition at line 544 of file commands.c.

int nfc_llcp_send_symm ( struct nfc_dev dev)

Definition at line 292 of file commands.c.

void nfc_llcp_send_to_raw_sock ( struct nfc_llcp_local local,
struct sk_buff skb,
u8  direction 
)

Definition at line 561 of file llcp.c.

struct sock* nfc_llcp_sock_alloc ( struct socket sock,
int  type,
gfp_t  gfp 
)
read

Definition at line 750 of file sock.c.

void nfc_llcp_sock_exit ( void  )

Definition at line 837 of file sock.c.

void nfc_llcp_sock_free ( struct nfc_llcp_sock sock)

Definition at line 786 of file sock.c.

int __init nfc_llcp_sock_init ( void  )

Definition at line 832 of file sock.c.

void nfc_llcp_sock_link ( struct llcp_sock_list l,
struct sock s 
)

Definition at line 34 of file llcp.c.

void nfc_llcp_sock_unlink ( struct llcp_sock_list l,
struct sock s 
)

Definition at line 41 of file llcp.c.