File: neigh.h

package info (click to toggle)
rdma-core 33.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 13,844 kB
  • sloc: ansic: 145,804; python: 5,688; sh: 2,761; perl: 1,465; makefile: 73
file content (41 lines) | stat: -rw-r--r-- 1,324 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/* Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md
 */

#ifndef _NEIGH_H_
#define _NEIGH_H_

#include <stddef.h>
#include <stdint.h>
#include "config.h"
#include <netlink/object-api.h>

struct get_neigh_handler {
	struct nl_sock *sock;
	struct nl_cache *link_cache;
	struct nl_cache	*neigh_cache;
	struct nl_cache *route_cache;
	int32_t oif;
	int vid;
	struct rtnl_neigh *filter_neigh;
	struct nl_addr *found_ll_addr;
	struct nl_addr *dst;
	struct nl_addr *src;
	uint64_t timeout;
};

int process_get_neigh(struct get_neigh_handler *neigh_handler);
void neigh_free_resources(struct get_neigh_handler *neigh_handler);
void neigh_set_vlan_id(struct get_neigh_handler *neigh_handler, uint16_t vid);
uint16_t neigh_get_vlan_id_from_dev(struct get_neigh_handler *neigh_handler);
int neigh_init_resources(struct get_neigh_handler *neigh_handler, int timeout);

int neigh_set_src(struct get_neigh_handler *neigh_handler,
		  int family, void *buf, size_t size);
void neigh_set_oif(struct get_neigh_handler *neigh_handler, int oif);
int neigh_set_dst(struct get_neigh_handler *neigh_handler,
		  int family, void *buf, size_t size);
int neigh_get_oif_from_src(struct get_neigh_handler *neigh_handler);
int neigh_get_ll(struct get_neigh_handler *neigh_handler, void *addr_buf,
		 int addr_size);

#endif