Disabling auto-refresh of game list by default, as it is causing bugs sometimes
[open-ps2-loader.git] / modules / wip / lanman / lanman.c
blob15e6ebfcb8ea93c3173ea1a68356d367a9d29dbd
1 /*
2 Copyright (c) 2010 jimmikaelkael <jimmikaelkael@wanadoo.fr>
3 Licenced under Academic Free License version 3.0
4 */
6 #include <tamtypes.h>
7 #include <stdio.h>
8 #include <loadcore.h>
10 #include "lanman.h"
11 #include "arp.h"
12 #include "tcp.h"
13 #include "smap.h"
14 #include "udptty.h"
16 #define MODNAME "lanman"
17 IRX_ID(MODNAME, 1, 1);
19 static g_param_t g_param = {
20 { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, // needed for broadcast
21 { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
22 IP_ADDR(192, 168, 0, 2),
23 IP_ADDR(192, 168, 0, 10),
24 IP_PORT(445),
25 IP_PORT(0x4712)
28 //-------------------------------------------------------------------------
29 int _start(int argc, char *argv[])
31 // Init SMAP
32 if (smap_init(&g_param.eth_addr_src[0]) != 0)
33 return MODULE_NO_RESIDENT_END;
35 // Does ARP request and wait reply to get server MAC address
36 arp_init(&g_param);
38 #ifdef UDPTTY
39 // Init UDP tty
40 ttyInit(&g_param);
41 #endif
43 // Init TCPIP layer
44 tcp_init(&g_param);
46 tcp_connect();
48 return MODULE_RESIDENT_END;