1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-31 20:09:02 +00:00
Files
nmap/libdnet-stripped/include/dnet/route.h
dmiller 210d6c0847 Upgrade libdnet to 1.18.0, plus Nmap's changes
Nmap's changes have been moved from the NMAP_MODIFICATIONS file to the
Github repo at https://github.com/nmap/libdnet

The NMAP_MODIFICATIONS file instead will document only the changes made
to strip unused parts of the libdnet source prior to inclusion in Nmap.
2025-03-31 19:30:47 +00:00

41 lines
1.1 KiB
C

/*
* route.c
*
* Kernel route table operations.
*
* Copyright (c) 2000 Dug Song <dugsong@monkey.org>
*
* $Id$
*/
#ifndef DNET_ROUTE_H
#define DNET_ROUTE_H
/*
* Routing table entry
*/
struct route_entry {
char intf_name[INTF_NAME_LEN]; /* interface name */
struct addr route_dst; /* destination address */
struct addr route_gw; /* gateway address */
int metric; /* per-route metric */
};
typedef struct route_handle route_t;
typedef int (*route_handler)(const struct route_entry *entry, void *arg);
__BEGIN_DECLS
route_t *route_open(void);
int route_add(route_t *r, const struct route_entry *entry);
int route_add_dev(route_t *r, const struct route_entry *entry, const char* dev);
int route6_add(route_t *r, const struct route_entry *entry, int intf_index);
int route_delete(route_t *r, const struct route_entry *entry);
int route6_delete(route_t *r, const struct route_entry *entry, int intf_index);
int route_get(route_t *r, struct route_entry *entry);
int route_loop(route_t *r, route_handler callback, void *arg);
route_t *route_close(route_t *r);
__END_DECLS
#endif /* DNET_ROUTE_H */