xref: /mOS-networking-stack/core/src/include/arp.h (revision 76404edc)
1*76404edcSAsim Jamshed #ifndef __ARP_H_
2*76404edcSAsim Jamshed #define __ARP_H_
3*76404edcSAsim Jamshed 
4*76404edcSAsim Jamshed #include "mos_api.h"
5*76404edcSAsim Jamshed 
6*76404edcSAsim Jamshed #define MAX_ARPENTRY			1024
7*76404edcSAsim Jamshed #define RUN_ARP				1
8*76404edcSAsim Jamshed #define ARP_TIMEOUT_SEC			1
9*76404edcSAsim Jamshed 
10*76404edcSAsim Jamshed int
11*76404edcSAsim Jamshed InitARPTable();
12*76404edcSAsim Jamshed 
13*76404edcSAsim Jamshed unsigned char *
14*76404edcSAsim Jamshed GetHWaddr(uint32_t ip);
15*76404edcSAsim Jamshed 
16*76404edcSAsim Jamshed unsigned char *
17*76404edcSAsim Jamshed GetDestinationHWaddr(uint32_t dip);
18*76404edcSAsim Jamshed 
19*76404edcSAsim Jamshed void
20*76404edcSAsim Jamshed RequestARP(mtcp_manager_t mtcp, uint32_t ip, int nif, uint32_t cur_ts);
21*76404edcSAsim Jamshed 
22*76404edcSAsim Jamshed int
23*76404edcSAsim Jamshed ProcessARPPacket(mtcp_manager_t mtcp, uint32_t cur_ts,
24*76404edcSAsim Jamshed 		const int ifidx, unsigned char* pkt_data, int len);
25*76404edcSAsim Jamshed 
26*76404edcSAsim Jamshed void
27*76404edcSAsim Jamshed PublishARP(mtcp_manager_t mtcp);
28*76404edcSAsim Jamshed 
29*76404edcSAsim Jamshed void
30*76404edcSAsim Jamshed PrintARPTable();
31*76404edcSAsim Jamshed 
32*76404edcSAsim Jamshed void
33*76404edcSAsim Jamshed ForwardARPPacket(mtcp_manager_t mtcp, struct pkt_ctx *pctx);
34*76404edcSAsim Jamshed 
35*76404edcSAsim Jamshed void
36*76404edcSAsim Jamshed ARPTimer(mtcp_manager_t mtcp, uint32_t cur_ts);
37*76404edcSAsim Jamshed 
38*76404edcSAsim Jamshed #endif /* __ARP_H_ */
39