File: ndisc.h

package info (click to toggle)
libdumbnet 1.18.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,084 kB
  • sloc: ansic: 11,563; sh: 4,732; python: 226; makefile: 92
file content (35 lines) | stat: -rw-r--r-- 804 bytes parent folder | download | duplicates (12)
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
/*
 * ndisc.c
 *
 * Kernel arp/ndisc table operations.
 *
 * Copyright (c) 2000 Dug Song <dugsong@monkey.org>
 *
 */

#ifndef DNET_NDISC_H
#define DNET_NDISC_H

/*
 * NDISC cache entry
 */
struct ndisc_entry {
    int    intf_index;
	struct addr	ndisc_pa;			/* protocol address */
	struct addr	ndisc_ha;			/* hardware address */
};

typedef struct ndisc_handle ndisc_t;

typedef int (*ndisc_handler)(const struct ndisc_entry *entry, void *arg);

__BEGIN_DECLS
ndisc_t	*ndisc_open(void);
int	 ndisc_add(ndisc_t *n, const struct ndisc_entry *entry);
int	 ndisc_delete(ndisc_t *n, const struct ndisc_entry *entry);
int	 ndisc_get(ndisc_t *n, struct ndisc_entry *entry);
int	 ndisc_loop(ndisc_t *n, ndisc_handler callback, void *arg);
ndisc_t	*ndisc_close(ndisc_t *r);
__END_DECLS

#endif /* DNET_NDISC_H */