38 if(CurrentMode !=
mode)
55 int ThreadID, retry_cycles;
59 for(retry_cycles = 0; checkingFunction() == 0; retry_cycles++)
64 if(retry_cycles >= 10)
130 u8 ip_address[4], netmask[4], gateway[4], dns[4];
161 "DNS:\t%d.%d.%d.%d\n",
162 ip_address[0], ip_address[1], ip_address[2], ip_address[3],
163 netmask[0], netmask[1], netmask[2], netmask[3],
164 gateway[0], gateway[1], gateway[2], gateway[3],
165 dns[0], dns[1], dns[2], dns[3]);
213 int main(
int argc,
char *argv[])
216 int EthernetLinkMode;
244 scr_printf(
"Error: failed to set link mode.\n");
266 scr_printf(
"Error: failed to get valid link status.\n");
void scr_printf(const char *,...)
int SifExecModuleBuffer(void *ptr, u32 size, u32 arg_len, const char *args, int *mod_res)
int SifLoadFileInit(void)
int SifIopReset(const char *arg, int mode)
s32 iWakeupThread(s32 thread_id)
s32 SetAlarm(u16 time, void(*callback)(s32 alarm_id, u16 time, void *common), void *common)
int NetManIoctl(unsigned int command, void *arg, unsigned int arg_len, void *output, unsigned int length)
@ NETMAN_NETIF_ETH_LINK_MODE_100M_HDX
@ NETMAN_NETIF_ETH_LINK_MODE_10M_FDX
@ NETMAN_NETIF_ETH_LINK_MODE_10M_HDX
@ NETMAN_NETIF_ETH_LINK_MODE_AUTO
@ NETMAN_NETIF_ETH_LINK_MODE_100M_FDX
@ NETMAN_NETIF_ETH_LINK_STATE_UP
@ NETMAN_NETIF_IOCTL_ETH_GET_LINK_MODE
@ NETMAN_NETIF_IOCTL_GET_LINK_STATUS
#define NETMAN_NETIF_ETH_LINK_DISABLE_PAUSE
void dns_setserver(u8 numdns, ip_addr_t *dnsserver)
const ip_addr_t * dns_getserver(u8 numdns)
int NetManSetLinkMode(int mode)
int main(int argc, char *argv[])
unsigned char NETMAN_irx[]
unsigned int size_DEV9_irx
static void ethPrintIPConfig(void)
static void EthStatusCheckCb(s32 alarm_id, u16 time, void *common)
static int ethApplyIPConfig(int use_dhcp, const struct ip4_addr *ip, const struct ip4_addr *netmask, const struct ip4_addr *gateway, const struct ip4_addr *dns)
static int ethWaitValidNetIFLinkState(void)
unsigned int size_SMAP_irx
static int ethGetNetIFLinkStatus(void)
static void ethPrintLinkStatus(void)
unsigned int size_NETMAN_irx
static int WaitValidNetState(int(*checkingFunction)(void))
static int ethApplyNetIFConfig(int mode)
int sbv_patch_enable_lmb(void)
void SifInitRpc(int mode)
int ps2ipInit(struct ip4_addr *ip_address, struct ip4_addr *subnet_mask, struct ip4_addr *gateway)
int ps2ip_getconfig(char *pszName, t_ip_info *pInfo)
int ps2ip_setconfig(const t_ip_info *pInfo)
#define ip_addr_cmp(addr1, addr2)
#define ip4_addr1(ipaddr)
#define ip_addr_set(dest, src)
#define IP4_ADDR(ipaddr, a, b, c, d)
#define ip4_addr4(ipaddr)
#define ip4_addr3(ipaddr)
#define ip4_addr2(ipaddr)