Disabling auto-refresh of game list by default, as it is causing bugs sometimes
[open-ps2-loader.git] / modules / wip / lanman / arp.h
blob74e7dc7302db9b3e57db33d51501ae577155c6e6
1 /*
2 Copyright (c) 2010 jimmikaelkael <jimmikaelkael@wanadoo.fr>
3 Licenced under Academic Free License version 3.0
4 */
6 #ifndef ARP_H
7 #define ARP_H
9 #include <tamtypes.h>
11 #include "lanman.h"
12 #include "eth.h"
13 #include "ip.h"
15 #define ARP_REQUEST 0x01
16 #define ARP_REPLY 0x02
18 typedef struct {
19 // Ethernet (14)
20 eth_hdr_t eth;
22 // ARP (28)
23 u16 arp_hwtype;
24 u16 arp_protocoltype;
25 u8 arp_hwsize;
26 u8 arp_protocolsize;
27 u16 arp_opcode;
28 u8 arp_sender_eth_addr[6];
29 ip_addr_t arp_sender_ip_addr;
30 u8 arp_target_eth_addr[6];
31 ip_addr_t arp_target_ip_addr;
32 } arp_pkt_t __attribute__((packed));
34 void arp_init(g_param_t *gparam);
35 void arp_input(void *buf, int size);
36 void arp_request(void);
38 #endif /* ARP_H */