RetroArch
Macros | Functions | Variables
uip_tcp.c File Reference
#include <stdlib.h>
#include <string.h>
#include "memb.h"
#include "uip.h"
#include "uip_arch.h"
#include "uip_ip.h"
#include "uip_tcp.h"
#include "uip_pbuf.h"
#include "uip_netif.h"
Include dependency graph for uip_tcp.c:

Macros

#define UIP_LOG(m)
 
#define UIP_ERROR(m)
 
#define UIP_STAT(s)
 
#define TCP_LOCAL_PORT_RANGE_START   4096
 
#define TCP_LOCAL_PORT_RANGE_END   0x7fff
 

Functions

 MEMB (uip_listen_tcp_pcbs, sizeof(struct uip_tcp_pcb_listen), UIP_LISTEN_TCP_PCBS)
 
 MEMB (uip_tcp_pcbs, sizeof(struct uip_tcp_pcb), UIP_TCP_PCBS)
 
 MEMB (uip_tcp_segs, sizeof(struct uip_tcpseg), UIP_TCP_SEGS)
 
static s8_t uip_tcp_nullaccept (void *arg, struct uip_tcp_pcb *pcb, s8_t err)
 
static s8_t uip_tcp_nullrecv (void *arg, struct uip_tcp_pcb *pcb, struct uip_pbuf *p, s8_t err)
 
static void uip_tcp_parseopt (struct uip_tcp_pcb *pcb)
 
static void uip_tcpoutput_segments (struct uip_tcpseg *seg, struct uip_tcp_pcb *pcb)
 
static s8_t uip_tcpinput_listen (struct uip_tcp_pcb_listen *pcb)
 
static s8_t uip_tcpinput_timewait (struct uip_tcp_pcb *pcb)
 
static s8_t uip_tcpprocess (struct uip_tcp_pcb *pcb)
 
static void uip_tcpreceive (struct uip_tcp_pcb *pcb)
 
static u16_t uip_tcp_newport ()
 
s8_t uip_tcp_sendctrl (struct uip_tcp_pcb *pcb, u8_t flags)
 
s8_t uip_tcp_write (struct uip_tcp_pcb *pcb, const void *arg, u16_t len, u8_t copy)
 
s8_t uip_tcpenqueue (struct uip_tcp_pcb *pcb, void *arg, u16_t len, u8_t flags, u8_t copy, u8_t *optdata, u8_t optlen)
 
void uip_tcpinput (struct uip_pbuf *p, struct uip_netif *inp)
 
s8_t uip_tcpoutput (struct uip_tcp_pcb *pcb)
 
void uip_tcp_tmr ()
 
void uip_tcp_init ()
 
void uip_tcp_accept (struct uip_tcp_pcb *pcb, s8_t(*accept)(void *, struct uip_tcp_pcb *, s8_t))
 
void uip_tcp_err (struct uip_tcp_pcb *pcb, void(*errf)(void *, s8_t))
 
void uip_tcp_recv (struct uip_tcp_pcb *pcb, s8_t(*recv)(void *, struct uip_tcp_pcb *, struct uip_pbuf *, s8_t))
 
void uip_tcp_sent (struct uip_tcp_pcb *pcb, s8_t(*sent)(void *, struct uip_tcp_pcb *, u16_t))
 
void uip_tcp_poll (struct uip_tcp_pcb *pcb, s8_t(*poll)(void *, struct uip_tcp_pcb *), u8_t interval)
 
void uip_tcp_arg (struct uip_tcp_pcb *pcb, void *arg)
 
struct uip_tcp_pcbuip_tcp_pcballoc (u8_t prio)
 
void uip_tcp_pcbremove (struct uip_tcp_pcb **pcblist, struct uip_tcp_pcb *pcb)
 
void uip_tcp_pcbpurge (struct uip_tcp_pcb *pcb)
 
struct uip_tcp_pcbuip_tcp_new ()
 
s8_t uip_tcp_bind (struct uip_tcp_pcb *pcb, struct uip_ip_addr *ipaddr, u16_t port)
 
struct uip_tcp_pcbuip_tcp_listen (struct uip_tcp_pcb *pcb)
 
void uip_tcp_recved (struct uip_tcp_pcb *pcb, u16_t len)
 
s8_t uip_tcp_close (struct uip_tcp_pcb *pcb)
 
void uip_tcp_rst (u32_t seqno, u32_t ackno, struct uip_ip_addr *lipaddr, struct uip_ip_addr *ripaddr, u16_t lport, u16_t rport)
 
void uip_tcp_abort (struct uip_tcp_pcb *pcb)
 
void uip_tcp_keepalive (struct uip_tcp_pcb *pcb)
 
void uip_tcp_rexmit (struct uip_tcp_pcb *pcb)
 
void uip_tcp_rexmit_rto (struct uip_tcp_pcb *pcb)
 
void uip_tcp_fasttmr ()
 
void uip_tcp_slowtmr ()
 
u32_t uip_tcpiss_next ()
 
struct uip_tcpseguip_tcpseg_copy (struct uip_tcpseg *seg)
 
u8_t uip_tcpsegs_free (struct uip_tcpseg *seg)
 
u8_t uip_tcpseg_free (struct uip_tcpseg *seg)
 

Variables

static u8_t uip_tcp_timer
 
static u8_t uip_flags
 
static u8_t uip_recv_flags
 
static u16_t uip_tcplen
 
static u32_t uip_seqno
 
static u32_t uip_ackno
 
static struct uip_tcpseg uip_inseg
 
static struct uip_pbufuip_recv_data = NULL
 
static struct uip_ip_hdruip_iphdr = NULL
 
static struct uip_tcp_hdruip_tcphdr = NULL
 
u32_t uip_tcp_ticks
 
struct uip_tcp_pcbuip_tcp_tmp_pcb = NULL
 
struct uip_tcp_pcbuip_tcp_input_pcb = NULL
 
struct uip_tcp_pcbuip_tcp_active_pcbs = NULL
 
struct uip_tcp_pcbuip_tcp_tw_pcbs = NULL
 
union uip_tcp_listen_pcbs_t uip_tcp_listen_pcbs
 
const u8_t uip_tcp_backoff [13] = { 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 7, 7}
 

Macro Definition Documentation

◆ TCP_LOCAL_PORT_RANGE_END

#define TCP_LOCAL_PORT_RANGE_END   0x7fff

◆ TCP_LOCAL_PORT_RANGE_START

#define TCP_LOCAL_PORT_RANGE_START   4096

◆ UIP_ERROR

#define UIP_ERROR (   m)

◆ UIP_LOG

#define UIP_LOG (   m)

◆ UIP_STAT

#define UIP_STAT (   s)

Function Documentation

◆ MEMB() [1/3]

MEMB ( uip_listen_tcp_pcbs  ,
sizeof(struct uip_tcp_pcb_listen ,
UIP_LISTEN_TCP_PCBS   
)

◆ MEMB() [2/3]

MEMB ( uip_tcp_pcbs  ,
sizeof(struct uip_tcp_pcb ,
UIP_TCP_PCBS   
)

◆ MEMB() [3/3]

MEMB ( uip_tcp_segs  ,
sizeof(struct uip_tcpseg ,
UIP_TCP_SEGS   
)

◆ uip_tcp_abort()

void uip_tcp_abort ( struct uip_tcp_pcb pcb)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ uip_tcp_accept()

void uip_tcp_accept ( struct uip_tcp_pcb pcb,
s8_t(*)(void *, struct uip_tcp_pcb *, s8_t accept 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ uip_tcp_arg()

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

◆ uip_tcp_bind()

s8_t uip_tcp_bind ( struct uip_tcp_pcb pcb,
struct uip_ip_addr ipaddr,
u16_t  port 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ uip_tcp_close()

s8_t uip_tcp_close ( struct uip_tcp_pcb pcb)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ uip_tcp_err()

void uip_tcp_err ( struct uip_tcp_pcb pcb,
void(*)(void *, s8_t errf 
)
Here is the caller graph for this function:

◆ uip_tcp_fasttmr()

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

◆ uip_tcp_init()

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

◆ uip_tcp_keepalive()

void uip_tcp_keepalive ( struct uip_tcp_pcb pcb)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ uip_tcp_listen()

struct uip_tcp_pcb* uip_tcp_listen ( struct uip_tcp_pcb pcb)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ uip_tcp_new()

struct uip_tcp_pcb* uip_tcp_new ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ uip_tcp_newport()

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

◆ uip_tcp_nullaccept()

static s8_t uip_tcp_nullaccept ( void arg,
struct uip_tcp_pcb pcb,
s8_t  err 
)
static
Here is the caller graph for this function:

◆ uip_tcp_nullrecv()

static s8_t uip_tcp_nullrecv ( void arg,
struct uip_tcp_pcb pcb,
struct uip_pbuf p,
s8_t  err 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ uip_tcp_parseopt()

static void uip_tcp_parseopt ( struct uip_tcp_pcb pcb)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ uip_tcp_pcballoc()

struct uip_tcp_pcb* uip_tcp_pcballoc ( u8_t  prio)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ uip_tcp_pcbpurge()

void uip_tcp_pcbpurge ( struct uip_tcp_pcb pcb)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ uip_tcp_pcbremove()

void uip_tcp_pcbremove ( struct uip_tcp_pcb **  pcblist,
struct uip_tcp_pcb pcb 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ uip_tcp_poll()

void uip_tcp_poll ( struct uip_tcp_pcb pcb,
s8_t(*)(void *, struct uip_tcp_pcb *)  poll,
u8_t  interval 
)
Here is the caller graph for this function:

◆ uip_tcp_recv()

void uip_tcp_recv ( struct uip_tcp_pcb pcb,
s8_t(*)(void *, struct uip_tcp_pcb *, struct uip_pbuf *, s8_t recv 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ uip_tcp_recved()

void uip_tcp_recved ( struct uip_tcp_pcb pcb,
u16_t  len 
)
Here is the caller graph for this function:

◆ uip_tcp_rexmit()

void uip_tcp_rexmit ( struct uip_tcp_pcb pcb)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ uip_tcp_rexmit_rto()

void uip_tcp_rexmit_rto ( struct uip_tcp_pcb pcb)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ uip_tcp_rst()

void uip_tcp_rst ( u32_t  seqno,
u32_t  ackno,
struct uip_ip_addr lipaddr,
struct uip_ip_addr ripaddr,
u16_t  lport,
u16_t  rport 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ uip_tcp_sendctrl()

s8_t uip_tcp_sendctrl ( struct uip_tcp_pcb pcb,
u8_t  flags 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ uip_tcp_sent()

void uip_tcp_sent ( struct uip_tcp_pcb pcb,
s8_t(*)(void *, struct uip_tcp_pcb *, u16_t sent 
)
Here is the caller graph for this function:

◆ uip_tcp_slowtmr()

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

◆ uip_tcp_tmr()

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

◆ uip_tcp_write()

s8_t uip_tcp_write ( struct uip_tcp_pcb pcb,
const void arg,
u16_t  len,
u8_t  copy 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ uip_tcpenqueue()

s8_t uip_tcpenqueue ( struct uip_tcp_pcb pcb,
void arg,
u16_t  len,
u8_t  flags,
u8_t  copy,
u8_t optdata,
u8_t  optlen 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ uip_tcpinput()

void uip_tcpinput ( struct uip_pbuf p,
struct uip_netif inp 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ uip_tcpinput_listen()

static s8_t uip_tcpinput_listen ( struct uip_tcp_pcb_listen pcb)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ uip_tcpinput_timewait()

static s8_t uip_tcpinput_timewait ( struct uip_tcp_pcb pcb)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ uip_tcpiss_next()

u32_t uip_tcpiss_next ( )
Here is the caller graph for this function:

◆ uip_tcpoutput()

s8_t uip_tcpoutput ( struct uip_tcp_pcb pcb)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ uip_tcpoutput_segments()

static void uip_tcpoutput_segments ( struct uip_tcpseg seg,
struct uip_tcp_pcb pcb 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ uip_tcpprocess()

static s8_t uip_tcpprocess ( struct uip_tcp_pcb pcb)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ uip_tcpreceive()

static void uip_tcpreceive ( struct uip_tcp_pcb pcb)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ uip_tcpseg_copy()

struct uip_tcpseg* uip_tcpseg_copy ( struct uip_tcpseg seg)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ uip_tcpseg_free()

u8_t uip_tcpseg_free ( struct uip_tcpseg seg)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ uip_tcpsegs_free()

u8_t uip_tcpsegs_free ( struct uip_tcpseg seg)
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ uip_ackno

u32_t uip_ackno
static

◆ uip_flags

u8_t uip_flags
static

◆ uip_inseg

struct uip_tcpseg uip_inseg
static

◆ uip_iphdr

struct uip_ip_hdr* uip_iphdr = NULL
static

◆ uip_recv_data

struct uip_pbuf* uip_recv_data = NULL
static

◆ uip_recv_flags

u8_t uip_recv_flags
static

◆ uip_seqno

u32_t uip_seqno
static

◆ uip_tcp_active_pcbs

struct uip_tcp_pcb* uip_tcp_active_pcbs = NULL

◆ uip_tcp_backoff

const u8_t uip_tcp_backoff[13] = { 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 7, 7}

◆ uip_tcp_input_pcb

struct uip_tcp_pcb* uip_tcp_input_pcb = NULL

◆ uip_tcp_listen_pcbs

union uip_tcp_listen_pcbs_t uip_tcp_listen_pcbs

◆ uip_tcp_ticks

u32_t uip_tcp_ticks

◆ uip_tcp_timer

u8_t uip_tcp_timer
static

◆ uip_tcp_tmp_pcb

struct uip_tcp_pcb* uip_tcp_tmp_pcb = NULL

◆ uip_tcp_tw_pcbs

struct uip_tcp_pcb* uip_tcp_tw_pcbs = NULL

◆ uip_tcphdr

struct uip_tcp_hdr* uip_tcphdr = NULL
static

◆ uip_tcplen

u16_t uip_tcplen
static