usb: getting string descriptors, minor improvements
[quarnos.git] / resources / net / ipv4.h
blob45d9a034e7a36bef39f6575e2d9ff10ee9945a77
1 #ifndef _IPV4_H_
2 #define _IPV4_H_
4 #include "link_layer.h"
5 #include "arp.h"
7 namespace net {
8 class ipv4 : public internet_layer {
9 private:
10 arp arp_prot;
12 ipv4_addr my_ip;
13 ipv4_addr mask;
14 ipv4_addr gateway;
16 protected:
17 // void receive_data(void *buf, int length);
19 public:
20 void set_link_layer(p<link_layer> x);
22 void configure_ipv4(const ipv4_addr &ip, const ipv4_addr &netmask, const ipv4_addr &gate) {
23 my_ip = ip;
24 mask = netmask;
25 gateway = gate;
28 ipv4_addr get_my_ip() {
29 return my_ip;
32 void send_data(const ipv4_addr &addr, int prot, const buffer &x);
33 void receive_data(const buffer&);
37 #endif