-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathL2_ARP.cpp
More file actions
52 lines (40 loc) · 897 Bytes
/
L2_ARP.cpp
File metadata and controls
52 lines (40 loc) · 897 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#include "L2_ARP.h"
#include "NIC.h"
using namespace std;
/**
* Implemented for you
*/
L2_ARP::L2_ARP(bool debug) : debug(debug){ }
L2_ARP::~L2_ARP()
{
/* ADD YOUR IMPLEMENTATION HERE, DONT FORGET TO FREE THE ARP TABLE! */
}
/**
* Implemented for you
*/
void L2_ARP::setNIC(NIC* nic){ this->nic = nic; }
int L2_ARP::arprequest(string ip_addr)
{
/* ADD YOUR IMPLEMENTATION HERE */
return 0;
}
string L2_ARP::arpresolve(string ip_addr, byte *sendData, size_t sendDataLen)
{
/* ADD YOUR IMPLEMENTATION HERE */
return "";
}
void* L2_ARP::arplookup(string ip_addr, bool create)
{
/* ADD YOUR IMPLEMENTATION HERE */
return NULL;
}
int L2_ARP::in_arpinput(byte *recvData, size_t recvDataLen)
{
/* ADD YOUR IMPLEMENTATION HERE */
return 0;
}
void* L2_ARP::SendArpReply(string itaddr, string isaddr, string hw_tgt, string hw_snd)
{
/* ADD YOUR IMPLEMENTATION HERE */
return NULL;
}