NetBurner 3.5.0
PDF Version
 
arpinternal.h
1/*NB_REVISION*/
2
3/*NB_COPYRIGHT*/
4
5#ifndef _ARP_INTERNAL_H
6#define _ARP_INTERNAL_H
7
8#include <basictypes.h>
9#include <buffers.h>
10#include <nettypes.h>
11
12/*-----------------------------------------------------------------------------**
13 ** The following structure defines the **
14 ** data records in the arp cache. **
15 ** The fields are: **
16 ** **
17 ** mac -> The hardware MAC address associated with this record. **
18 ** This value is NULL when the entry has not yet been **
19 ** processed. **
20 ** **
21 ** ip -> The IP address associated with this record. **
22 ** **
23 ** life_limit ->The seconds count when this entry should be deleted. **
24 ** **
25 ** pPendingSend ->The buffer pool pointer, this buffer should be sent when the **
26 ** mac address is finally resolved. **
27 **-----------------------------------------------------------------------------*/
28#define ARP_STATIC_LIFETIME (0xFFFFFFFF)
29typedef struct
30{
31 MACADR mac;
32 IPADDR4 ip;
33 uint32_t life_limit;
34 PoolPtr pPendingSend;
35 uint16_t pvtData;
36 uint16_t interface;
37 OS_SEM *pPendingSem;
38 inline uint32_t SetLife(uint32_t newLife)
39 {
40 if (life_limit != ARP_STATIC_LIFETIME) { life_limit = newLife; }
41 return life_limit;
42 }
43} ArpRecord;
44
45BOOL IsNull(ArpRecord *ar);
46ArpRecord *FindArp(IPADDR4 ip);
47ArpRecord *FindAddArp(IPADDR4 ip);
48BOOL MacEqual(MACADR a1, MACADR a2);
49void RawSendArp(ArpRecord *pa, IPADDR4 fromaddr, int ifout);
50
51#endif /* ----- #ifndef _ARP_INTERNAL_H_INC ----- */
NetBurner Buffers API.
Used to store and manipulate IPv4 addresses in dual stack mode.
Definition nettypes.h:208
Used to store and manipulate MAC addresses.
Definition nettypes.h:69
NetBurner IPADDR4 Class. See the IPADDR4 Class page for complete documentation.
Semaphores are used to control access to shared resources or or to communicate between tasks in a mul...
Definition nbrtos.h:386