OuSob - File: /wwwroot/clipx/usr/include/wvstreams/wvipaliaser.h
/* -*- Mode: C++ -*-
* Worldvisions Weaver Software:
* Copyright (C) 1997-2002 Net Integration Technologies, Inc.
* WvIPAliaser handles IP aliasing in the Linux kernel. Multiple instances
* of the object can be created, and they will share aliases between them.
* Aliased addresses are only removed when all WvIPAliaser objects using
* that address give it up. (ie. the object is destroyed, or the Aliaser
* is reconfigured without including that address)
int index, link_count;
Alias(const WvIPAddr &_ip);
static AliasList all_aliases;
WvIPAliaser::Alias *ipsearch(WvIPAliaser::AliasList &l,
const WvIPAddr &ip);
* you must call start_edit() once, then add() any number of times, then
* done_edit() once, to change your aliases. The addresses add()ed
* during the session become the _only_ ones that are aliases by this
* WvIPAliaser instance.
* Why bother? This way, WvIPAliaser can see all the desired aliases
* when they are being changed, and only delete previously-added ones
* if they are no longer used. This is important, since if eg. Fast
* Forward has an open connection through 22.214.171.124, and we want to add
* 126.96.36.199 and delete 188.8.131.52, Fast Forward need not remember that it
* was using 184.108.40.206 but 220.127.116.11 does not get deleted, even temporarily.
* If that was too confusing, just remember: call these functions in
* the order they appear below, always.
* If add() returns true, then an interface was just created. If it returns
* false, then that call made no changes.
* If done_edit() returns true, then one or more interfaces were just
* destroyed. If it returns false, then that call made no changes.
bool add(const WvIPAddr &ip);
#endif // __WVIPALIASER_H