NetBurner 3.5.8
PDF Version
Toggle main menu visibility
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)
29
typedef
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
45
BOOL IsNull(ArpRecord *ar);
46
ArpRecord *FindArp(
IPADDR4
ip);
47
ArpRecord *FindAddArp(
IPADDR4
ip);
48
BOOL MacEqual(
MACADR
a1,
MACADR
a2);
49
void
RawSendArp(ArpRecord *pa,
IPADDR4
fromaddr,
int
ifout);
50
51
#endif
/* ----- #ifndef _ARP_INTERNAL_H_INC ----- */
IPADDR4
Used to store and manipulate IPv4 addresses in dual stack mode.
Definition
nettypes.h:225
MACADR
Used to store and manipulate MAC addresses.
Definition
nettypes.h:69
OS_SEM
Semaphores are used to control access to shared resources or or to communicate between tasks in a mul...
Definition
nbrtos.h:407
nbrtos
include
arpinternal.h
Generated by
1.18.0