Blog
Community
Development
Documentation
CNDP
22.08.0
Toggle main menu visibility
Loading...
Searching...
No Matches
cne_arp.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: BSD-3-Clause
2
* Copyright (c) 2021-2022 Intel Corporation
3
* Copyright (c) 2013 6WIND S.A.
4
*/
5
6
#ifndef _CNE_ARP_H_
7
#define _CNE_ARP_H_
8
14
15
// IWYU pragma: no_forward_declare cne_mempool
16
17
#include <stdint.h>
// for uint16_t, uint32_t, uint8_t
18
#include <
net/cne_ether.h
>
// for ether_addr
19
#include <net/ethernet.h>
// for ether_addr
20
21
#ifdef __cplusplus
22
extern
"C"
{
23
#endif
24
28
struct
cne_arp_ipv4
{
29
struct
ether_addr
arp_sha
;
30
uint32_t
arp_sip
;
31
struct
ether_addr
arp_tha
;
32
uint32_t
arp_tip
;
33
}
__cne_packed
__cne_aligned
(2);
34
38
struct
cne_arp_hdr
{
39
uint16_t arp_hardware;
/* format of hardware address */
40
#define CNE_ARP_HRD_ETHER 1
/* ARP Ethernet address format */
41
42
uint16_t arp_protocol;
/* format of protocol address */
43
uint8_t arp_hlen;
/* length of hardware address */
44
uint8_t arp_plen;
/* length of protocol address */
45
uint16_t arp_opcode;
/* ARP opcode (command) */
46
#define CNE_ARP_OP_REQUEST 1
/* request to resolve address */
47
#define CNE_ARP_OP_REPLY 2
/* response to previous request */
48
#define CNE_ARP_OP_REVREQUEST 3
/* request proto addr given hardware */
49
#define CNE_ARP_OP_REVREPLY 4
/* response giving protocol address */
50
#define CNE_ARP_OP_INVREQUEST 8
/* request to identify peer */
51
#define CNE_ARP_OP_INVREPLY 9
/* response identifying peer */
52
53
struct
cne_arp_ipv4
arp_data;
54
}
__cne_packed
__cne_aligned
(2);
55
56
#ifdef __cplusplus
57
}
58
#endif
59
60
#endif
/* _CNE_ARP_H_ */
__cne_packed
#define __cne_packed
Definition
cne_common.h:129
__cne_aligned
#define __cne_aligned(a)
Definition
cne_common.h:124
cne_ether.h
cne_arp_hdr
Definition
cne_arp.h:38
cne_arp_ipv4
Definition
cne_arp.h:28
cne_arp_ipv4::arp_sip
uint32_t arp_sip
Definition
cne_arp.h:30
cne_arp_ipv4::arp_tip
uint32_t arp_tip
Definition
cne_arp.h:32
cne_arp_ipv4::arp_tha
struct ether_addr arp_tha
Definition
cne_arp.h:31
cne_arp_ipv4::arp_sha
struct ether_addr arp_sha
Definition
cne_arp.h:29
ether_addr
Definition
cne_ether.h:52
lib
include
net
cne_arp.h
Generated by
1.18.0