RetroArch
Classes | Macros | Functions | Variables
tcpip.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "asm.h"
#include "processor.h"
#include "uIP/bba.h"
#include "uIP/memr.h"
#include "uIP/memb.h"
#include "uIP/uip_ip.h"
#include "uIP/uip_arp.h"
#include "uIP/uip_tcp.h"
#include "uIP/uip_pbuf.h"
#include "uIP/uip_netif.h"
#include "tcpip.h"
#include "debug_if.h"
Include dependency graph for tcpip.c:

Classes

struct  tcpip_sock
 

Macros

#define UIP_LOG(m)
 
#define UIP_STAT(s)
 

Functions

const char *tcp_localip __attribute__ ((weak))
 
s64 gettime ()
 
u32 diff_msec (s64 start, s64 end)
 
static s32_t tcpip_allocsocket (struct uip_tcp_pcb *pcb)
 
static struct tcpip_socktcpip_getsocket (s32_t s)
 
static int opentcpip (struct dbginterface *device)
 
static int closetcpip (struct dbginterface *device)
 
static int waittcpip (struct dbginterface *device)
 
static int readtcpip (struct dbginterface *device, void *buffer, int size)
 
static int writetcpip (struct dbginterface *device, const void *buffer, int size)
 
static void tcpip_err (void *arg, s8_t err)
 
static s8_t tcpip_poll (void *arg, struct uip_tcp_pcb *pcb)
 
static s8_t tcpip_sent (void *arg, struct uip_tcp_pcb *pcb, u16_t space)
 
static s8_t tcpip_recved (void *arg, struct uip_tcp_pcb *pcb, struct uip_pbuf *p, s8_t err)
 
static s8_t tcpip_accept_func (void *arg, struct uip_tcp_pcb *newpcb, s8_t err)
 
static void __tcpip_poll ()
 
void tcpip_tmr_needed ()
 
struct dbginterfacetcpip_init (struct uip_ip_addr *localip, struct uip_ip_addr *netmask, struct uip_ip_addr *gateway, u16 port)
 
s32_t tcpip_socket ()
 
s32_t tcpip_bind (s32_t s, struct sockaddr *name, socklen_t *namelen)
 
s32_t tcpip_listen (s32_t s, u32_t backlog)
 
s32_t tcpip_accept (s32_t s)
 
s32_t tcpip_read (s32_t s, void *buffer, u32_t len)
 
s32_t tcpip_write (s32_t s, const void *buffer, u32_t len)
 
void tcpip_close (s32_t s)
 
void tcpip_stoptimer (s32_t s)
 
void tcpip_starttimer (s32_t s)
 

Variables

struct tcpip_sock tcpip_socks [UIP_TCPIP_SOCKS]
 
static s64 tcpip_time = 0
 
static s32 listensock = -1
 
static struct uip_netif netif
 
static struct dbginterface netif_device
 
static struct tcpip_socktcpip_accepted_sockets = NULL
 

Macro Definition Documentation

◆ UIP_LOG

#define UIP_LOG (   m)

◆ UIP_STAT

#define UIP_STAT (   s)

Function Documentation

◆ __attribute__()

const char* tcp_localip __attribute__ ( (weak)  )

Mount the filesystem(s) needed by the application. By default, we mount the SD card to /sd.

The 'iosuhaxMount' symbol used here is public and can be referenced in overriding implementations.

Unmount filesystems. Implementing applications should be careful to clean up anything mounted in __mount_filesystems() here.

Here is the call graph for this function:

◆ __tcpip_poll()

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

◆ closetcpip()

static int closetcpip ( struct dbginterface device)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ diff_msec()

u32 diff_msec ( s64  start,
s64  end 
)
Here is the caller graph for this function:

◆ gettime()

s64 gettime ( )
Here is the caller graph for this function:

◆ opentcpip()

static int opentcpip ( struct dbginterface device)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ readtcpip()

static int readtcpip ( struct dbginterface device,
void buffer,
int  size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tcpip_accept()

s32_t tcpip_accept ( s32_t  s)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tcpip_accept_func()

static s8_t tcpip_accept_func ( void arg,
struct uip_tcp_pcb newpcb,
s8_t  err 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tcpip_allocsocket()

static s32_t tcpip_allocsocket ( struct uip_tcp_pcb pcb)
static
Here is the caller graph for this function:

◆ tcpip_bind()

s32_t tcpip_bind ( s32_t  s,
struct sockaddr name,
socklen_t namelen 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tcpip_close()

void tcpip_close ( s32_t  s)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tcpip_err()

static void tcpip_err ( void arg,
s8_t  err 
)
static
Here is the caller graph for this function:

◆ tcpip_getsocket()

static struct tcpip_sock* tcpip_getsocket ( s32_t  s)
static
Here is the caller graph for this function:

◆ tcpip_init()

struct dbginterface* tcpip_init ( struct uip_ip_addr localip,
struct uip_ip_addr netmask,
struct uip_ip_addr gateway,
u16  port 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tcpip_listen()

s32_t tcpip_listen ( s32_t  s,
u32_t  backlog 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tcpip_poll()

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

◆ tcpip_read()

s32_t tcpip_read ( s32_t  s,
void buffer,
u32_t  len 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tcpip_recved()

static s8_t tcpip_recved ( 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:

◆ tcpip_sent()

static s8_t tcpip_sent ( void arg,
struct uip_tcp_pcb pcb,
u16_t  space 
)
static
Here is the caller graph for this function:

◆ tcpip_socket()

s32_t tcpip_socket ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tcpip_starttimer()

void tcpip_starttimer ( s32_t  s)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tcpip_stoptimer()

void tcpip_stoptimer ( s32_t  s)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tcpip_write()

s32_t tcpip_write ( s32_t  s,
const void buffer,
u32_t  len 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ waittcpip()

static int waittcpip ( struct dbginterface device)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ writetcpip()

static int writetcpip ( struct dbginterface device,
const void buffer,
int  size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ listensock

s32 listensock = -1
static

◆ netif

struct uip_netif netif
static

◆ netif_device

struct dbginterface netif_device
static

◆ tcpip_accepted_sockets

struct tcpip_sock* tcpip_accepted_sockets = NULL
static

◆ tcpip_socks

struct tcpip_sock tcpip_socks[UIP_TCPIP_SOCKS]

◆ tcpip_time

s64 tcpip_time = 0
static