WvStreams
debian/libwvstreams-dev/usr/include/wvstreams/wviproute.h
1/* -*- Mode: C++ -*-
2 * Worldvisions Weaver Software:
3 * Copyright (C) 1997-2002 Net Integration Technologies, Inc.
4 *
5 * The WvIPRoute and WvIPRouteList classes, which can manipulate the kernel
6 * routing table in useful ways.
7 */
8#ifndef __WVIPROUTE_H
9#define __WVIPROUTE_H
10
11#include "wvaddr.h"
12#include "wvlinklist.h"
13#include "wvlog.h"
14
17{
18public:
19 WvIPRoute(WvStringParm _ifc, const WvIPNet &_net, const WvIPAddr &_gate,
20 int _metric, WvStringParm _table);
21 operator WvString() const;
22 bool operator== (const WvIPRoute &r2) const;
23
24 WvString ifc;
25 WvIPNet ip;
26 WvIPAddr gateway;
27 int metric;
28 WvString table; // "advanced ip routing" table name
29 WvIPAddr src;
30};
31
32
33DeclareWvList2(WvIPRouteListBase, WvIPRoute);
34
36class WvIPRouteList : public WvIPRouteListBase
37{
38public:
39 WvLog log;
40
42
44 void get_kernel();
45
47 void set_kernel();
48
50 WvIPRoute *find(const WvIPAddr &addr);
51};
52
53
54#endif // __WVIPROUTE_H
A WvFastString acts exactly like a WvString, but can take (const char *) strings without needing to a...
An IP address is made up of a "dotted quad" – four decimal numbers in the form www....
An IP network comprises two WvIPAddr structures: an address and a netmask.
List of IP Routes currently in effect.
void set_kernel()
automatically set the kernel to the values in the RouteList
Definition wviproute.cc:202
WvIPRoute * find(const WvIPAddr &addr)
find the routing entry that matches 'addr'
Definition wviproute.cc:253
void get_kernel()
automatically fill the list with appropriate data from the kernel
Definition wviproute.cc:60
Manipulate the kernel routing table in strange and interesting ways ;)
A WvLog stream accepts log messages from applications and forwards them to all registered WvLogRcv's.
WvString is an implementation of a simple and efficient printable-string class.