4 #include "arch/low/general.h"
5 #include "libs/buffer.h"
8 #include "internet_layer.h"
9 #include "link_layer.h"
12 class arp
: public osi_layer
{
47 } __attribute__((packed
));
50 volatile bool received
;
54 void receive_data(const buffer
&x
);
56 void set_link_layer(p
<link_layer
> x
) {
58 my_haddr
= x
->get_haddr();
59 my_paddr
= ipv4_addr::from_le(192 << 24 | 168 << 16 | 1 << 8 | 50);
61 x
->add_handler(et_arp
, delegate
<void, const buffer
&>::method(this, &arp::receive_data
));
64 void set_ipv4(const ipv4_addr
&);
66 mac_addr
get_haddr(const ipv4_addr
&ipaddr
);
67 void receive_packet(p
<arp_packet
> pkg
);
69 //static void register_type();