OpenNet
ARP.h
Go to the documentation of this file.
1 
2 // Product OpenNet
3 
7 
8 // TEST COVERAGE 2019-05-03 KMS - Martin Dubois, ing.
9 
10 #pragma once
11 
12 // Constants
14 
21 #define ARP_ETHERNET_TYPE_nh (0x0608)
22 
23 #ifndef _OPEN_NET_NO_FUNCTION_
24 
25 // Functions
27 
40 OPEN_NET_GLOBAL unsigned short * ARP_Destination(OPEN_NET_GLOBAL unsigned char * aData)
41 {
42  return ((OPEN_NET_GLOBAL unsigned short *)(aData + 24));
43 }
44 
55 unsigned short ARP_Protocol(OPEN_NET_GLOBAL unsigned char * aData)
56 {
57  return (*((OPEN_NET_GLOBAL unsigned short *)(aData + 2)));
58 }
59 
72 OPEN_NET_GLOBAL unsigned short * ARP_Source(OPEN_NET_GLOBAL unsigned char * aData)
73 {
74  return ((OPEN_NET_GLOBAL unsigned short *)(aData + 14));
75 }
76 
77 #endif // ! _OPEN_NET_NO_FUNCTION_
OPEN_NET_GLOBAL unsigned short * ARP_Source(OPEN_NET_GLOBAL unsigned char *aData)
This function returns a pointer to the source address.
Definition: ARP.h:72
OPEN_NET_GLOBAL unsigned short * ARP_Destination(OPEN_NET_GLOBAL unsigned char *aData)
This function returns a pointer to the requested address.
Definition: ARP.h:40
unsigned short ARP_Protocol(OPEN_NET_GLOBAL unsigned char *aData)
This function returns the protocol.
Definition: ARP.h:55