// L2TPNS Global Stuff
-// $Id: l2tpns.h,v 1.56 2005/02/09 02:39:05 bodea Exp $
+// $Id: l2tpns.h,v 1.61 2005/03/10 06:18:47 bodea Exp $
#ifndef __L2TPNS_H__
#define __L2TPNS_H__
#define MAXCONTROL 1000 // max length control message we ever send...
#define MAXETHER (1500+18) // max packet we try sending to tun
#define MAXTEL 96 // telephone number
+#define MAXUSER 128 // username
+#define MAXPASS 128 // password
#define MAXPLUGINS 20 // maximum number of plugins to load
#define MAXRADSERVER 10 // max radius servers
#define MAXROUTE 10 // max static routes per session
#define CLI_TUN_KILL 0x01
-// dump header: update number if internal format changes
-#define DUMP_MAGIC "L2TPNS#" VERSION "#"
-
// structures
typedef struct // route
{
uint8_t flags1; // additional flags (currently unused);
char random_vector[MAXTEL];
int random_vector_length;
- char user[129]; // user (needed in seesion for radius stop messages) (can we reduce this? --mo)
+ char user[MAXUSER]; // user (needed in seesion for radius stop messages)
char called[MAXTEL]; // called number
char calling[MAXTEL]; // calling number
uint32_t tx_connect_speed;
sessionidt sessionbyipv6(struct in6_addr ip);
sessionidt sessionbyuser(char *username);
void random_data(uint8_t *buf, int len);
-void sessionshutdown(sessionidt s, char *reason);
+void sessionkill(sessionidt s, char *reason);
+void sessionshutdown(sessionidt s, char *reason, int result, int error);
void send_garp(in_addr_t ip);
void tunnelsend(uint8_t *buf, uint16_t l, tunnelidt t);
void sendipcp(tunnelidt t, sessionidt s);