RetroArch
Macros | Functions
slipif.c File Reference
#include "netif/slipif.h"
#include "lwip/opt.h"
#include "lwip/def.h"
#include "lwip/pbuf.h"
#include "lwip/sys.h"
#include "lwip/stats.h"
#include "lwip/sio.h"
Include dependency graph for slipif.c:

Macros

#define SLIP_END   0300
 
#define SLIP_ESC   0333
 
#define SLIP_ESC_END   0334
 
#define SLIP_ESC_ESC   0335
 
#define MAX_SIZE   1500
 

Functions

err_t slipif_output (struct netif *netif, struct pbuf *p, struct ip_addr *ipaddr)
 
static struct pbufslipif_input (struct netif *netif)
 
static void slipif_loop (void *nf)
 
err_t slipif_init (struct netif *netif)
 

Macro Definition Documentation

◆ MAX_SIZE

#define MAX_SIZE   1500

◆ SLIP_END

#define SLIP_END   0300

◆ SLIP_ESC

#define SLIP_ESC   0333

◆ SLIP_ESC_END

#define SLIP_ESC_END   0334

◆ SLIP_ESC_ESC

#define SLIP_ESC_ESC   0335

Function Documentation

◆ slipif_init()

err_t slipif_init ( struct netif netif)

SLIP netif initialization

Call the arch specific sio_open and remember the opened device in the state field of the netif.

Here is the call graph for this function:

◆ slipif_input()

static struct pbuf* slipif_input ( struct netif netif)
static

Handle the incoming SLIP stream character by character

Poll the serial layer by calling sio_recv()

Returns
The IP packet when SLIP_END is received
Here is the call graph for this function:
Here is the caller graph for this function:

◆ slipif_loop()

static void slipif_loop ( void nf)
static

The SLIP input thread

Feed the IP layer with incoming packets

Here is the call graph for this function:
Here is the caller graph for this function:

◆ slipif_output()

err_t slipif_output ( struct netif netif,
struct pbuf p,
struct ip_addr ipaddr 
)

Send a pbuf doing the necessary SLIP encapsulation

Uses the serial layer's sio_send()

Here is the call graph for this function:
Here is the caller graph for this function: