/* 
 * veth_i.h
 *
 * x-kernel v3.3
 *
 * Copyright (c) 1993,1991,1990,1996  Arizona Board of Regents
 *
 * $Revision: 1.2 $
 * $Date: 1996/01/29 22:42:33 $
 */


#ifndef vnet_h
#include "vnet.h"
#endif

typedef struct {
    IPhost	host;
    IPhost	mask;
    Protl	llp;
    Protl	arp;
    int		subnet;	 /* does this interface use subnetting? */
} Interface;

#define VNET_MAX_INTERFACES 	10
#define VNET_MAX_PARTS	 	5

typedef struct {
    Map		activeMap;
    Map 	passiveMap;
    Map		bcastMap;
    Interface	ifc[VNET_MAX_INTERFACES];
    Protl	llpList[VNET_MAX_INTERFACES+1];
    u_int	numIfc;
} PState;

typedef enum { VNET_BCAST_SESSN, VNET_NORMAL_SESSN } VnetSessnType;

typedef struct {
    VnetSessnType	type;
    struct {
	Interface	*ifc;
	int		active;
    } ifcs[VNET_MAX_INTERFACES];
    	/* 
     	 * There may be more than one interface for a broadcast session
     	 */
    Map			map;	/* Which map am I bound in */
} SState;

typedef	Protl	PassiveKey;
typedef Sessn	ActiveKey;

#define VNET_BCAST_MAP_SZ	11
#define VNET_ACTIVE_MAP_SZ	23
#define VNET_PASSIVE_MAP_SZ	11

