RetroArch
Functions | Variables
l2cap.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
#include <ogcsys.h>
#include <gccore.h>
#include "hci.h"
#include "l2cap.h"
#include "btmemb.h"
#include "btpbuf.h"
Include dependency graph for l2cap.c:

Functions

static u16_t l2cap_cid_alloc (void)
 
 MEMB (l2cap_pcbs, sizeof(struct l2cap_pcb), MEMB_NUM_L2CAP_PCB)
 
 MEMB (l2cap_listenpcbs, sizeof(struct l2cap_pcb_listen), MEMB_NUM_L2CAP_PCB_LISTEN)
 
 MEMB (l2cap_sigs, sizeof(struct l2cap_sig), MEMB_NUM_L2CAP_SIG)
 
 MEMB (l2cap_segs, sizeof(struct l2cap_seg), MEMB_NUM_L2CAP_SEG)
 
void l2cap_init ()
 
void l2cap_tmr ()
 
err_t l2cap_write (struct bd_addr *bdaddr, struct pbuf *p, u16_t len)
 
void l2cap_process_sig (struct pbuf *q, struct l2cap_hdr *l2caphdr, struct bd_addr *bdaddr)
 
void l2cap_input (struct pbuf *p, struct bd_addr *bdaddr)
 
struct l2cap_pcbl2cap_new (void)
 
err_t l2cap_close (struct l2cap_pcb *pcb)
 
void l2cap_reset_all (void)
 
err_t l2cap_signal (struct l2cap_pcb *pcb, u8_t code, u16_t ursp_id, struct bd_addr *remote_bdaddr, struct pbuf *data)
 
err_t l2cap_rexmit_signal (struct l2cap_pcb *pcb, struct l2cap_sig *sig)
 
err_t l2ca_connect_req (struct l2cap_pcb *pcb, struct bd_addr *bdaddr, u16_t psm, u8_t role_switch, err_t(*l2ca_connect_cfm)(void *arg, struct l2cap_pcb *lpcb, u16_t result, u16_t status))
 
err_t l2ca_config_req (struct l2cap_pcb *pcb)
 
err_t l2ca_disconnect_req (struct l2cap_pcb *pcb, err_t(*l2ca_disconnect_cfm)(void *arg, struct l2cap_pcb *pcb))
 
err_t l2ca_datawrite (struct l2cap_pcb *pcb, struct pbuf *p)
 
err_t l2ca_ping (struct bd_addr *bdaddr, struct l2cap_pcb *tpcb, err_t(*l2ca_pong)(void *arg, struct l2cap_pcb *pcb, u8_t result))
 
void lp_connect_cfm (struct bd_addr *bdaddr, u8_t encrypt_mode, err_t err)
 
void lp_connect_ind (struct bd_addr *bdaddr)
 
void lp_disconnect_ind (struct bd_addr *bdaddr, u8_t reason)
 
u8_t l2cap_next_sigid (void)
 
void l2cap_arg (struct l2cap_pcb *pcb, void *arg)
 
err_t l2cap_connect_ind (struct l2cap_pcb *npcb, struct bd_addr *bdaddr, u16_t psm, err_t(*l2ca_connect_ind)(void *arg, struct l2cap_pcb *pcb, err_t err))
 
void l2cap_disconnect_ind (struct l2cap_pcb *pcb, err_t(*l2ca_disconnect_ind)(void *arg, struct l2cap_pcb *newpcb, err_t err))
 
void l2cap_timeout_ind (struct l2cap_pcb *pcb, err_t(*l2ca_timeout_ind)(void *arg, struct l2cap_pcb *newpcb, err_t err))
 
void l2cap_recv (struct l2cap_pcb *pcb, err_t(*l2ca_recv)(void *arg, struct l2cap_pcb *pcb, struct pbuf *p, err_t err))
 

Variables

u8_t sigid_nxt
 
struct l2cap_pcb_listenl2cap_listen_pcbs = NULL
 
struct l2cap_pcbl2cap_active_pcbs
 
struct l2cap_pcbl2cap_tmp_pcb = NULL
 
struct l2cap_sigl2cap_tmp_sig = NULL
 
struct l2cap_segl2cap_insegs = NULL
 
struct l2cap_segl2cap_tmp_inseg = NULL
 
static void(* l2cap_disconnect_bb_cb )(struct bd_addr *bdaddr, u8_t reason) = NULL
 
void(*)(struct bd_addr *bdaddr, u8_t reason) l2cap_disconnect_bb (void(*l2ca_disconnect_bb)(struct bd_addr *bdaddr, u8_t reason))
 

Function Documentation

◆ l2ca_config_req()

err_t l2ca_config_req ( struct l2cap_pcb pcb)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ l2ca_connect_req()

err_t l2ca_connect_req ( struct l2cap_pcb pcb,
struct bd_addr bdaddr,
u16_t  psm,
u8_t  role_switch,
err_t(*)(void *arg, struct l2cap_pcb *lpcb, u16_t result, u16_t status)  l2ca_connect_cfm 
)
Here is the call graph for this function:

◆ l2ca_datawrite()

err_t l2ca_datawrite ( struct l2cap_pcb pcb,
struct pbuf p 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ l2ca_disconnect_req()

err_t l2ca_disconnect_req ( struct l2cap_pcb pcb,
err_t(*)(void *arg, struct l2cap_pcb *pcb)  l2ca_disconnect_cfm 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ l2ca_ping()

err_t l2ca_ping ( struct bd_addr bdaddr,
struct l2cap_pcb tpcb,
err_t(*)(void *arg, struct l2cap_pcb *pcb, u8_t result l2ca_pong 
)
Here is the call graph for this function:

◆ l2cap_arg()

void l2cap_arg ( struct l2cap_pcb pcb,
void arg 
)
Here is the caller graph for this function:

◆ l2cap_cid_alloc()

static u16_t l2cap_cid_alloc ( void  )
static
Here is the caller graph for this function:

◆ l2cap_close()

err_t l2cap_close ( struct l2cap_pcb pcb)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ l2cap_connect_ind()

err_t l2cap_connect_ind ( struct l2cap_pcb npcb,
struct bd_addr bdaddr,
u16_t  psm,
err_t(*)(void *arg, struct l2cap_pcb *pcb, err_t err)  l2ca_connect_ind 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ l2cap_disconnect_ind()

void l2cap_disconnect_ind ( struct l2cap_pcb pcb,
err_t(*)(void *arg, struct l2cap_pcb *newpcb, err_t err)  l2ca_disconnect_ind 
)
Here is the caller graph for this function:

◆ l2cap_init()

void l2cap_init ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ l2cap_input()

void l2cap_input ( struct pbuf p,
struct bd_addr bdaddr 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ l2cap_new()

struct l2cap_pcb* l2cap_new ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ l2cap_next_sigid()

u8_t l2cap_next_sigid ( void  )
Here is the caller graph for this function:

◆ l2cap_process_sig()

void l2cap_process_sig ( struct pbuf q,
struct l2cap_hdr l2caphdr,
struct bd_addr bdaddr 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ l2cap_recv()

void l2cap_recv ( struct l2cap_pcb pcb,
err_t(*)(void *arg, struct l2cap_pcb *pcb, struct pbuf *p, err_t err)  l2ca_recv 
)
Here is the caller graph for this function:

◆ l2cap_reset_all()

void l2cap_reset_all ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ l2cap_rexmit_signal()

err_t l2cap_rexmit_signal ( struct l2cap_pcb pcb,
struct l2cap_sig sig 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ l2cap_signal()

err_t l2cap_signal ( struct l2cap_pcb pcb,
u8_t  code,
u16_t  ursp_id,
struct bd_addr remote_bdaddr,
struct pbuf data 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ l2cap_timeout_ind()

void l2cap_timeout_ind ( struct l2cap_pcb pcb,
err_t(*)(void *arg, struct l2cap_pcb *newpcb, err_t err)  l2ca_timeout_ind 
)

◆ l2cap_tmr()

void l2cap_tmr ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ l2cap_write()

err_t l2cap_write ( struct bd_addr bdaddr,
struct pbuf p,
u16_t  len 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ lp_connect_cfm()

void lp_connect_cfm ( struct bd_addr bdaddr,
u8_t  encrypt_mode,
err_t  err 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ lp_connect_ind()

void lp_connect_ind ( struct bd_addr bdaddr)
Here is the caller graph for this function:

◆ lp_disconnect_ind()

void lp_disconnect_ind ( struct bd_addr bdaddr,
u8_t  reason 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MEMB() [1/4]

MEMB ( l2cap_pcbs  ,
sizeof(struct l2cap_pcb ,
MEMB_NUM_L2CAP_PCB   
)

◆ MEMB() [2/4]

MEMB ( l2cap_listenpcbs  ,
sizeof(struct l2cap_pcb_listen ,
MEMB_NUM_L2CAP_PCB_LISTEN   
)

◆ MEMB() [3/4]

MEMB ( l2cap_sigs  ,
sizeof(struct l2cap_sig ,
MEMB_NUM_L2CAP_SIG   
)

◆ MEMB() [4/4]

MEMB ( l2cap_segs  ,
sizeof(struct l2cap_seg ,
MEMB_NUM_L2CAP_SEG   
)

Variable Documentation

◆ l2cap_active_pcbs

struct l2cap_pcb* l2cap_active_pcbs

◆ l2cap_disconnect_bb

void(*)(struct bd_addr *bdaddr, u8_t reason) l2cap_disconnect_bb(void(*l2ca_disconnect_bb)(struct bd_addr *bdaddr, u8_t reason))

◆ l2cap_disconnect_bb_cb

void(* l2cap_disconnect_bb_cb) (struct bd_addr *bdaddr, u8_t reason) = NULL
static

◆ l2cap_insegs

struct l2cap_seg* l2cap_insegs = NULL

◆ l2cap_listen_pcbs

struct l2cap_pcb_listen* l2cap_listen_pcbs = NULL

◆ l2cap_tmp_inseg

struct l2cap_seg* l2cap_tmp_inseg = NULL

◆ l2cap_tmp_pcb

struct l2cap_pcb* l2cap_tmp_pcb = NULL

◆ l2cap_tmp_sig

struct l2cap_sig* l2cap_tmp_sig = NULL

◆ sigid_nxt

u8_t sigid_nxt