PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
ps2ip.h
Go to the documentation of this file.
1/*
2# _____ ___ ____ ___ ____
3# ____| | ____| | | |____|
4# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5#-----------------------------------------------------------------------
6# Copyright (c) 2003 Marcus R. Brown <mrbrown@0xd6.org>
7# Licenced under Academic Free License version 2.0
8# Review ps2sdk README & LICENSE files for further details.
9*/
10
16#ifndef __PS2IP_H__
17#define __PS2IP_H__
18
19#ifndef LIBCGLUE_SYS_SOCKET_ALIASES
20#define LIBCGLUE_SYS_SOCKET_ALIASES 1
21#endif
22
23#include <stddef.h>
24#include <sys/socket.h>
25#include <time.h>
26
28int ps2ipInit(struct ip4_addr *ip_address, struct ip4_addr *subnet_mask, struct ip4_addr *gateway);
29void ps2ipDeinit(void);
35void ps2ipSetHsyncTicksPerMSec(unsigned char ticks);
36
37err_t ps2ip_input(struct pbuf *p, struct netif *inp);
38
39/* From include/netif/etharp.h: */
40err_t etharp_output(struct netif *netif, struct pbuf *q, const ip_addr_t *ipaddr);
41
42/* From include/lwip/tcpip.h: */
43err_t tcpip_input(struct pbuf *p, struct netif *inp);
44
45/* From include/lwip/netif.h: */
46struct netif *netif_add(struct netif *netif,
47#if LWIP_IPV4
48 const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw,
49#endif /* LWIP_IPV4 */
51
56struct netif *netif_find(const char *name);
57void netif_set_default(struct netif *netif);
58void netif_set_ipaddr(struct netif *netif, const ip4_addr_t *ipaddr);
59void netif_set_netmask(struct netif *netif, const ip4_addr_t *netmask);
60void netif_set_gw(struct netif *netif, const ip4_addr_t *gw);
61void netif_set_up(struct netif *netif);
62void netif_set_down(struct netif *netif);
63
64struct pbuf* pbuf_alloc(pbuf_layer l, u16 size, pbuf_type type);
65void pbuf_realloc(struct pbuf *p, u16 size);
66u8 pbuf_header(struct pbuf *p, s16 header_size);
67void pbuf_ref(struct pbuf *p);
68u8 pbuf_free(struct pbuf *p);
69u8 pbuf_clen(struct pbuf *p);
70void pbuf_chain(struct pbuf *h, struct pbuf *t);
71struct pbuf* pbuf_dechain(struct pbuf *p);
72struct pbuf* pbuf_take(struct pbuf *f);
73struct pbuf* pbuf_coalesce(struct pbuf *p, pbuf_layer layer);
74
75#endif /* __PS2IP_H__ */
struct netif * netif_find(const char *name)
int ps2ipInit(struct ip4_addr *ip_address, struct ip4_addr *subnet_mask, struct ip4_addr *gateway)
Definition ps2ip.c:323
void ps2ipSetHsyncTicksPerMSec(unsigned char ticks)
Definition ps2ip.c:358
err_t(* netif_init_fn)(struct netif *netif)
Definition tcpip.h:1162
char name[2]
Definition tcpip.h:1315
void * state
Definition tcpip.h:1287
netif_input_fn input
Definition tcpip.h:1252
err_t(* netif_input_fn)(struct pbuf *p, struct netif *inp)
Definition tcpip.h:1169
pbuf_type
Definition tcpip.h:173
u8 type
Definition tcpip.h:220
pbuf_layer
Definition tcpip.h:144
Definition tcpip.h:200