Dibbler - a portable DHCPv6  1.0.2RC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
iproute.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <syslog.h>
#include <fcntl.h>
#include <string.h>
#include <time.h>
#include <sys/time.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <arpa/inet.h>
#include <linux/in_route.h>
#include "rt_names.h"
#include "utils.h"
#include "ip_common.h"
+ Include dependency graph for iproute.c:

Macros

#define PRTFL(fl, flname)
#define ROUTE_FLUSH_PATH   "/proc/sys/net/ipv4/route/flush"
#define RTAX_RTTVAR   RTAX_HOPS

Functions

int do_iproute (int argc, char **argv)
static int flush_update (void)
static int iproute_flush_cache (void)
int iproute_get (int argc, char **argv)
static int iproute_list_or_flush (int argc, char **argv, int flush)
int iproute_modify (int cmd, unsigned flags, int argc, char **argv)
void iproute_reset_filter ()
int parse_nexthops (struct nlmsghdr *n, struct rtmsg *r, int argc, char **argv)
int parse_one_nh (struct rtattr *rta, struct rtnexthop *rtnh, int *argcp, char ***argvp)
int print_route (const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
static int rtnl_rtcache_request (struct rtnl_handle *rth, int family)
static void usage (void)

Variables

struct {
   char *   flushb
   int   flushe
   int   flushed
   int   flushp
   int   iif
   int   iifmask
   inet_prefix   mdst
   inet_prefix   msrc
   int   oif
   int   oifmask
   int   protocol
   int   protocolmask
   inet_prefix   rdst
   int   realm
   int   realmmask
   inet_prefix   rprefsrc
   inet_prefix   rsrc
   inet_prefix   rvia
   int   scope
   int   scopemask
   int   tb
   int   tos
   int   tosmask
   int   type
   int   typemask
filter

Macro Definition Documentation

#define PRTFL (   fl,
  flname 
)
Value:
if (flags&RTCF_##fl) { \
flags &= ~RTCF_##fl; \
fprintf(fp, "%s" flname "%s", first ? "<" : "", flags ? "," : "> "); \
first = 0; }
#define ROUTE_FLUSH_PATH   "/proc/sys/net/ipv4/route/flush"
#define RTAX_RTTVAR   RTAX_HOPS

Function Documentation

int do_iproute ( int  argc,
char **  argv 
)
static int flush_update ( void  )
static
static int iproute_flush_cache ( void  )
static
int iproute_get ( int  argc,
char **  argv 
)
static int iproute_list_or_flush ( int  argc,
char **  argv,
int  flush 
)
static
int iproute_modify ( int  cmd,
unsigned  flags,
int  argc,
char **  argv 
)
void iproute_reset_filter ( void  )
int parse_nexthops ( struct nlmsghdr *  n,
struct rtmsg *  r,
int  argc,
char **  argv 
)
int parse_one_nh ( struct rtattr *  rta,
struct rtnexthop *  rtnh,
int *  argcp,
char ***  argvp 
)
int print_route ( const struct sockaddr_nl *  who,
struct nlmsghdr *  n,
void *  arg 
)
static int rtnl_rtcache_request ( struct rtnl_handle rth,
int  family 
)
static
static void usage ( void  )
static

Variable Documentation

struct { ... } filter
char* flushb
int flushe
int flushed
int flushp
int iif
int iifmask
int oif
int oifmask
int protocol
int protocolmask
int realm
int realmmask
inet_prefix rprefsrc
int scope
int scopemask
int tb
int tos
int tosmask
int type
int typemask