#include "config.h"
#include <sys/param.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <net/route.h>
#include <netinet/in.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "dnet.h"
Go to the source code of this file.
Defines | |
#define | route_t oroute_t |
#define | ROUNDUP(a) ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long)) |
#define | NEXTSA(s) ((struct sockaddr *)((u_char *)(s) + ROUNDUP(sizeof(*(s))))) |
Functions | |
static int | route_msg (route_t *r, int type, struct addr *dst, struct addr *gw) |
route_t * | route_open (void) |
int | route_add (route_t *r, const struct route_entry *entry) |
int | route_delete (route_t *r, const struct route_entry *entry) |
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) |
|
Definition at line 53 of file route-bsd.c. Referenced by route_msg(). |
|
Definition at line 46 of file route-bsd.c. |
|
Definition at line 32 of file route-bsd.c. |
|
Definition at line 179 of file route-bsd.c. References memcpy, and route_msg(). |
|
Definition at line 496 of file route-bsd.c. References route_handle::fd, and NULL. |
|
Definition at line 192 of file route-bsd.c. References memcpy, route_get(), and route_msg(). |
|
Definition at line 208 of file route-bsd.c. References route_entry::route_dst, route_entry::route_gw, and route_msg(). |
|
Definition at line 488 of file route-bsd.c. References errno. |
|
Definition at line 76 of file route-bsd.c. References addr_btos(), addr_net(), addr_ntos(), addr_ston(), addr::addr_type, ADDR_TYPE_IP, errno, route_handle::fd, IP_ADDR_ANY, IP_ADDR_BITS, memset, NEXTSA, NULL, and route_handle::seq. Referenced by route_add(), route_delete(), and route_get(). |
|
Definition at line 158 of file route-bsd.c. References NULL, and route_close(). |