[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_if.c File Reference

#include <sys/ioctl.h>
#include <sys/socket.h>
#include <asm/types.h>
#include <netinet/in.h>
#include <net/if.h>
#include <string.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include "d_printf.h"
#include "snap_svc.h"
#include "snap_svc_if.h"

Include dependency graph for snap_svc_if.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)
int snap_svc_ifip_init ()
int if_get_interface_count (void *useless)
char * if_get_interface_name (int dIfNo)
int if_getiface (const char *strIfName, int flag)
int if_getiface_up (const char *strIfName)
int if_setiface (const char *strIfName, int flag, int state)
int if_setiface_up (const char *strIfName, int state)
unsigned int if_getnextiface (unsigned int iface_idx)
unsigned int if_getifaceidx (uint32_t ip)
char * if_getoutiface (uint32_t incoming_ip)
uint32_t if_gethopfromiface (char *if_outname)
uint32_t if_getnexthop (uint32_t incoming_ip)
void if_getallneighbours (uint32_t incoming_ip)

Variables

unsigned int snap_svc_if_count = 0
unsigned int snap_svc_if_maxidx = 0
snap_svc_ifip_itemiface_list = NULL

Function Documentation

int if_get_interface_count void *    useless
 

Definition at line 174 of file snap_svc_if.c.

References d_printf().

Referenced by snap_external_svclib_getnextfunc().

char* if_get_interface_name int    dIfNo
 

Definition at line 201 of file snap_svc_if.c.

References d_printf().

Referenced by snap_external_svclib_getnextfunc().

void if_getallneighbours uint32_t    incoming_ip
 

Definition at line 401 of file snap_svc_if.c.

References snap_svc_ifip_item::addr, d_printf(), svc_returnitem::data, if_gethopfromiface(), if_getifaceidx(), if_getnextiface(), svc_returnstruct::length, svc_returnstruct::list, snap_external_svclib_free_local_returnstruct(), svc_return, SVC_SNMP_TYPE_ADDR, and svc_returnitem::type.

Referenced by snap_external_svclib_getnextfunc().

uint32_t if_gethopfromiface char *    if_outname
 

Definition at line 356 of file snap_svc_if.c.

References d_printf().

Referenced by if_getallneighbours(), and if_getnexthop().

int if_getiface const char *    strIfName,
int    flag
 

Definition at line 225 of file snap_svc_if.c.

References d_printf().

Referenced by if_getiface_up(), and snap_external_svclib_getnextfunc().

int if_getiface_up const char *    strIfName
 

Definition at line 242 of file snap_svc_if.c.

References if_getiface().

Referenced by if_setiface(), and snap_external_svclib_getnextfunc().

unsigned int if_getifaceidx uint32_t    ip
 

Definition at line 319 of file snap_svc_if.c.

References snap_svc_ifip_item::addr, d_printf(), snap_svc_ifip_item::if_index, and snap_svc_if_maxidx.

Referenced by if_getallneighbours(), and if_getoutiface().

uint32_t if_getnexthop uint32_t    incoming_ip
 

Definition at line 392 of file snap_svc_if.c.

References if_gethopfromiface(), and if_getoutiface().

Referenced by snap_external_svclib_getnextfunc().

unsigned int if_getnextiface unsigned int    iface_idx
 

Definition at line 295 of file snap_svc_if.c.

References snap_svc_ifip_item::addr, d_printf(), and snap_svc_if_maxidx.

Referenced by if_getallneighbours(), and if_getoutiface().

char* if_getoutiface uint32_t    incoming_ip
 

Definition at line 334 of file snap_svc_if.c.

References d_printf(), if_getifaceidx(), if_getnextiface(), snap_svc_ifip_item::if_name, and snap_svc_ifip_init().

Referenced by if_getnexthop().

int if_setiface const char *    strIfName,
int    flag,
int    state
 

Definition at line 248 of file snap_svc_if.c.

References d_printf(), and if_getiface_up().

Referenced by if_setiface_up(), and snap_external_svclib_getnextfunc().

int if_setiface_up const char *    strIfName,
int    state
 

Definition at line 273 of file snap_svc_if.c.

References if_setiface().

Referenced by snap_external_svclib_getnextfunc().

void snap_external_svclib_done  
 

Definition at line 39 of file snap_svc_if.c.

References d_printf(), snap_svc_ifip_item::if_name, and snap_svc_if_maxidx.

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

Definition at line 53 of file snap_svc_if.c.

References if_get_interface_count(), if_get_interface_name(), if_getallneighbours(), if_getiface(), if_getiface_up(), if_getnexthop(), if_setiface(), if_setiface_up(), snapsvc_func_proto, svc_fun_counter, SVC_SNMP_TYPE_ADDR, SVC_SNMP_TYPE_INT, SVC_SNMP_TYPE_NULL, and SVC_SNMP_TYPE_STRING.

void snap_external_svclib_init  
 

Definition at line 31 of file snap_svc_if.c.

References d_printf(), and snap_svc_ifip_init().

int snap_svc_ifip_init  
 

Definition at line 109 of file snap_svc_if.c.

References d_printf(), snap_svc_ifip_item::if_index, snap_svc_if_count, and snap_svc_if_maxidx.

Referenced by if_getoutiface(), and snap_external_svclib_init().


Variable Documentation

struct snap_svc_ifip_item* iface_list = NULL
 

Definition at line 28 of file snap_svc_if.c.

unsigned int snap_svc_if_count = 0
 

Definition at line 26 of file snap_svc_if.c.

Referenced by snap_svc_ifip_init().

unsigned int snap_svc_if_maxidx = 0
 

Definition at line 27 of file snap_svc_if.c.

Referenced by if_getifaceidx(), if_getnextiface(), snap_external_svclib_done(), and snap_svc_ifip_init().