CNDP
22.08.0
|
#include <cne_inet.h>
#include <stdint.h>
#include <string.h>
#include "cne_common.h"
#include "cne_log.h"
#include "cne_vec.h"
#include "cnet_const.h"
#include "cnet_stk.h"
#include "mempool.h"
Go to the source code of this file.
Functions | |
CNDP_API struct pcb_entry * | cnet_pcb_lookup (struct pcb_hd *hd, struct pcb_key *key, int32_t flags) |
CNDP_API void | cnet_pcb_dump (stk_t *stk) |
Dump out the PCB information. More... | |
CNDP_API void | cnet_pcb_show (struct pcb_entry *pcb) |
static struct pcb_entry * | cnet_pcb_locate (struct pcb_hd *hd, struct in_caddr *faddr, struct in_caddr *laddr) |
Return the PCB entry matching the given information. More... | |
Variables | |
struct in_caddr | faddr |
struct in_caddr | laddr |
CNET PCB routines.
Definition in file cnet_pcb.h.
CNDP_API struct pcb_entry* cnet_pcb_lookup | ( | struct pcb_hd * | hd, |
struct pcb_key * | key, | ||
int32_t | flags | ||
) |
Lookup a PCB in the given list to locate the matching PCB or near matching PCB. The flag value denotes is the match is EXACT or a best match. With the local (laddr) and foreign address (faddr) locate the matching or best matching PCB data.
Find a matching local, foreign and port address in the PCB list given. A local copy of the local and foreign address is created for the compare when not doing a exact match, but looking for the best match.
Parameters:
hd | A pointer to the PCB list head. |
key | Pointer to key information to PCB list. |
flags | Flags for the compare EXACT or BEST match |
PCB laddr | laddr | Type --------—+--------—+-----— non-Zero | non-Zero | Exact non-Zero | Zero | Best Zero | non-Zero | Best Zero | Zero | Invalid
PCB faddr | faddr | Type --------—+--------—+-----— non-Zero | non-Zero | Exact non-Zero | Zero | Best Zero | non-Zero | Best Zero | Zero | Invalid
CNDP_API void cnet_pcb_dump | ( | stk_t * | stk | ) |
Dump out the PCB information.
stk | The stack instance pointer to use for dumping the data. |
CNDP_API void cnet_pcb_show | ( | struct pcb_entry * | pcb | ) |
Print out the given PCB entry.
pcb | The PCB entry to dump out |
|
inlinestatic |
Return the PCB entry matching the given information.
hd | A pointer to the PCB list head. |
faddr | The foreign address entry to look for in the list. |
laddr | The local address entyr to look for in the list. |
Definition at line 163 of file cnet_pcb.h.
struct in_caddr faddr |
foreign IP address
Definition at line 163 of file cnet_pcb.h.
struct in_caddr laddr |
local IP address
Definition at line 163 of file cnet_pcb.h.