[insert project logo here (125x200px max)]

Navigator

Mailinglists

Please report any errors or ommissions you find to our `Help' mailinglist, or post a message in the Forums.

Copyright and Licensing Information

Snap is (c) Jonathan T. Moore, 1999-2002 and licensed under the GNU General Public License (GPL).

All other parts of Splash are (c) Willem de Bruijn, 2002-2003 and licensed under the BSD Open Source License.

All sourcecode is made publicly available.

Acknowledgement

Splash and the Splash website are hosted by SourceForge.net

SourceForge.net Logo

osi-open source certified logo

Splash - Documentation

SNMP Plus a Lightweight API for SNAP Handling

Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

snap_svc/snap_svc_route.c File Reference

#include <sys/ioctl.h>
#include <sys/socket.h>
#include <asm/types.h>
#include <netinet/in.h>
#include <net/route.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <unistd.h>
#include "d_printf.h"
#include "snap_svc.h"
#include "snap_svc_route.h"

Include dependency graph for snap_svc_route.c:

Include dependency graph

Go to the source code of this file.


Functions

void snap_external_svclib_init ()
void snap_external_svclib_done ()
void snap_external_svclib_getnextfunc (char **snapsvc_name, snapsvc_func_proto *snapsvc_func, int *snapsvc_args, int *snapsvc_rets)
__u32 ip_to__u32 (__u8 ip1, __u8 ip2, __u8 ip3, __u8 ip4)
void printip (__u32 ip, int dLevel)
void make_sockaddr_in (__u32 ip_in, struct sockaddr *outaddr)
int handle_request (short action, __u32 ip_dest, __u32 ip_mask, __u32 ip_gateway, char *device)
int route_add (__u32 ip_dest, __u32 ip_mask, __u32 ip_gateway, char *device)
int route_del (__u32 ip_dest, __u32 ip_mask, __u32 ip_gateway, char *device)

Function Documentation

int handle_request short    action,
__u32    ip_dest,
__u32    ip_mask,
__u32    ip_gateway,
char *    device
 

Definition at line 84 of file snap_svc_route.c.

References d_printf(), make_sockaddr_in(), printip(), rtentry::rt_dev, rtentry::rt_dst, rtentry::rt_flags, rtentry::rt_gateway, and rtentry::rt_genmask.

Referenced by route_add(), and route_del().

__u32 ip_to__u32 __u8    ip1,
__u8    ip2,
__u8    ip3,
__u8    ip4
 

Definition at line 61 of file snap_svc_route.c.

void make_sockaddr_in __u32    ip_in,
struct sockaddr *    outaddr
 

Definition at line 70 of file snap_svc_route.c.

Referenced by handle_request().

void printip __u32    ip,
int    dLevel
 

Definition at line 66 of file snap_svc_route.c.

References d_printf().

Referenced by handle_request().

int route_add __u32    ip_dest,
__u32    ip_mask,
__u32    ip_gateway,
char *    device
 

Definition at line 146 of file snap_svc_route.c.

References handle_request().

Referenced by snap_external_svclib_getnextfunc().

int route_del __u32    ip_dest,
__u32    ip_mask,
__u32    ip_gateway,
char *    device
 

Definition at line 150 of file snap_svc_route.c.

References handle_request().

Referenced by snap_external_svclib_getnextfunc().

void snap_external_svclib_done  
 

Definition at line 30 of file snap_svc_route.c.

References d_printf().

void snap_external_svclib_getnextfunc char **    snapsvc_name,
snapsvc_func_proto   snapsvc_func,
int *    snapsvc_args,
int *    snapsvc_rets
 

Definition at line 35 of file snap_svc_route.c.

References route_add(), route_del(), snapsvc_func_proto, svc_fun_counter, and SVC_SNMP_TYPE_NULL.

void snap_external_svclib_init  
 

Definition at line 26 of file snap_svc_route.c.

References d_printf().