summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/bundle.h
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1998-10-22 02:32:50 +0000
committerbrian <brian@FreeBSD.org>1998-10-22 02:32:50 +0000
commit7056e6ac4753567be17baa0d7f36a6a96248c938 (patch)
treeed29a04b61431af78f3f8071d0b9c17ed8fe4471 /usr.sbin/ppp/bundle.h
parentb8a68d9fd9fa6c7e3cbfc74355e2d40ea475df06 (diff)
downloadFreeBSD-src-7056e6ac4753567be17baa0d7f36a6a96248c938.zip
FreeBSD-src-7056e6ac4753567be17baa0d7f36a6a96248c938.tar.gz
Solve the ``first connection'' problem that occurs on
demand-dial links with dynamic IP numbers where the program that causes the dial bind()s to an interface address that is subsequently changed after ppp negotiation. The problem is defeated by adding negotiated addresses to the tun interface as additional alias addresses and providing a set of ``iface'' commands for managing the interface. Libalias is also required (and what a name clash!) - it happily IP-aliases the address so that the source is that of the primary (negotiated) interface and un-IP-aliases it on the way back. An ``enable iface-alias'' is done implicitly by the -alias command line switch. If -alias isn't given, iface-aliasing is disabled by default and can't be enabled 'till an ``alias enable yes'' is done. ``alias enable no'' silently disables iface-alias. So, for dynamic-IP-type-connections, running ``ppp -alias -auto blah'' will work for the first connection, although existing bindings will not survive a disconnect/connect as the TCP peer will be trying to send to the old IP address - the packets won't route. It's now a lot easier to add IPXCP to ppp with minor updates to the new iface.[ch] (if anyone ever gets 'round to it). It's also now possible to manually add interface aliases with something like ``iface add 1.2.3.4/24 5.6.7.8''. This allows multi-homed ppp links :-)
Diffstat (limited to 'usr.sbin/ppp/bundle.h')
-rw-r--r--usr.sbin/ppp/bundle.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.sbin/ppp/bundle.h b/usr.sbin/ppp/bundle.h
index aee0cc2..2f24b18 100644
--- a/usr.sbin/ppp/bundle.h
+++ b/usr.sbin/ppp/bundle.h
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: bundle.h,v 1.12 1998/08/07 18:42:47 brian Exp $
+ * $Id: bundle.h,v 1.13 1998/08/25 17:48:42 brian Exp $
*/
#define PHASE_DEAD 0 /* Link is dead */
@@ -40,6 +40,7 @@
#define OPT_SROUTES 0x10
#define OPT_THROUGHPUT 0x20
#define OPT_UTMP 0x40
+#define OPT_IFACEALIAS 0x80
#define MAX_ENDDISC_CLASS 5
@@ -51,6 +52,7 @@ struct physical;
struct link;
struct server;
struct prompt;
+struct iface;
struct bundle {
struct descriptor desc; /* really all our datalinks */
@@ -62,11 +64,15 @@ struct bundle {
int fd; /* The /dev/XXXX descriptor */
} dev;
+#if 0
struct {
- u_long Speed; /* struct tuninfo speed */
int Index; /* The interface index */
char *Name; /* The interface name */
} ifp;
+#endif
+
+ u_long ifSpeed; /* struct tuninfo speed */
+ struct iface *iface; /* Interface information */
int routing_seq; /* The current routing sequence number */
u_int phase; /* Curent phase */
OpenPOWER on IntegriCloud