5 #include "arch/low/general.h"
9 #include "link_layer.h"
11 typedef u32 ipv4_addr
;
14 class arp
/* : public socket*/ {
49 } __attribute__((packed
));
52 volatile bool received
;
56 void receive_data(void *, int);
58 void set_link_layer(p
<link_layer
> x
) {
60 my_haddr
= x
->get_haddr();
61 my_paddr
= 192 << 24 | 168 << 16 | 1 << 8 | 50;
63 delegate
<void, void*, int> rec
;
64 rec
.method(this, &arp::receive_data
);
65 x
->add_handler(et_arp
, rec
);
68 void set_ipv4(ipv4_addr
);
70 mac_addr
get_haddr(ipv4_addr ipaddr
);
71 void receive_packet(arp_packet
*pkg
);
73 //static void register_type();