|
CNDP 22.08.0
|
#include <cnet/cnet.h>#include <net/cne_arp.h>#include <net/cne_ip.h>#include <net/ethernet.h>#include <stdint.h>#include "cne_inet.h"#include "pktmbuf.h"Go to the source code of this file.
Enumerations | |
| enum | { ARP_STATIC_FLAG = 0x01 , ARP_SEND_GRATUITOUS = 0x02 } |
Functions | |
| CNDP_API struct arp_entry * | cnet_arp_alloc (void) |
| CNDP_API void | cnet_arp_free (struct arp_entry *entry) |
| CNDP_API int | cnet_arp_create (struct cnet *_cnet, uint32_t num_entries, uint32_t num_tbl8s) |
| CNDP_API int | cnet_arp_destroy (struct cnet *cnet) |
| CNDP_API struct arp_entry * | cnet_arp_add (int netif_idx, struct in_addr *addr, struct ether_addr *mac, int perm) |
| CNDP_API int | cnet_arp_delete (struct in_addr *addr) |
| CNDP_API int | cnet_arp_show (void) |
CNET ARP routines.
Definition in file cnet_arp.h.
| anonymous enum |
| Enumerator | |
|---|---|
| ARP_STATIC_FLAG | This entry does not timeout |
| ARP_SEND_GRATUITOUS | Send a gratuitous ARP packet |
Definition at line 34 of file cnet_arp.h.
| CNDP_API struct arp_entry * cnet_arp_alloc | ( | void | ) |
Allocate an ARP entry
| CNDP_API void cnet_arp_free | ( | struct arp_entry * | entry | ) |
Free an ARP entry
| entry | The ARP entry to free. |
| CNDP_API int cnet_arp_create | ( | struct cnet * | _cnet, |
| uint32_t | num_entries, | ||
| uint32_t | num_tbl8s ) |
Create the ARP table and structure to hold ARP information.
| _cnet | The pointer to the current CNET structure. |
| num_entries | The number of entries to allocate in ARP table, if zero use ARP_FIB_DEFAULT_ENTRIES. |
| num_tbl8s | The number of table entries to allocate in ARP table, if zero use ARP_FIB_DEFAULT_NUM_TBLS8. |
| CNDP_API int cnet_arp_destroy | ( | struct cnet * | cnet | ) |
Destroy the ARP table and structure to hold ARP information.
| cnet | The pointer to the current CNET structure. |
| CNDP_API struct arp_entry * cnet_arp_add | ( | int | netif_idx, |
| struct in_addr * | addr, | ||
| struct ether_addr * | mac, | ||
| int | perm ) |
Add an ARP entry to the ARP table. If perm is set then create a static entry.
| netif_idx | The netif structure index to assign the ARP entry. |
| addr | The IP address to add to the ARP table |
| mac | The MAC address to add to the ARP table |
| perm | If non-zero then add the entry to the ARP table as a static entry. |
| CNDP_API int cnet_arp_delete | ( | struct in_addr * | addr | ) |
Delete an ARP entry
| addr | The IP address to delete |
| CNDP_API int cnet_arp_show | ( | void | ) |
Show the stack entry ARP table, each stack has an ARP table