summaryrefslogtreecommitdiff
path: root/accel-pptpd/ppp/ppp.h
diff options
context:
space:
mode:
authorKozlov Dmitry <dima@server>2010-11-10 18:33:36 +0300
committerKozlov Dmitry <dima@server>2010-11-10 18:33:36 +0300
commit058e7ff66b8fbb1f9494ae5077e5294db288fb1c (patch)
treee5d4c535539681843efb80bb1f06a643cee88904 /accel-pptpd/ppp/ppp.h
parent4d826710d0d30606da88ff3543a4b43521e404df (diff)
downloadaccel-ppp-058e7ff66b8fbb1f9494ae5077e5294db288fb1c.tar.gz
accel-ppp-058e7ff66b8fbb1f9494ae5077e5294db288fb1c.zip
cli: implemented following command list: show stat, show sessions, terminate (sessison)
Diffstat (limited to 'accel-pptpd/ppp/ppp.h')
-rw-r--r--accel-pptpd/ppp/ppp.h24
1 files changed, 19 insertions, 5 deletions
diff --git a/accel-pptpd/ppp/ppp.h b/accel-pptpd/ppp/ppp.h
index b36f0e42..f74351d4 100644
--- a/accel-pptpd/ppp/ppp.h
+++ b/accel-pptpd/ppp/ppp.h
@@ -4,6 +4,7 @@
#include <sys/types.h>
#include <time.h>
#include <netinet/in.h>
+#include <pthread.h>
#include "triton.h"
#include "list.h"
@@ -38,14 +39,13 @@
#define PPP_CBCP 0xc029 /* Callback Control Protocol */
#define PPP_EAP 0xc227 /* Extensible Authentication Protocol */
-#define PPP_LAYER_LCP 1
-#define PPP_LAYER_AUTH 2
-#define PPP_LAYER_CCP 3
-#define PPP_LAYER_IPCP 4
-
#define PPP_SESSIONID_LEN 16
#define PPP_IFNAME_LEN 10
+#define PPP_STATE_STARTING 1
+#define PPP_STATE_ACTIVE 2
+#define PPP_STATE_FINISHING 3
+
#define TERM_USER_REQUEST 1
#define TERM_SESSION_TIMEOUT 2
#define TERM_ADMIN_RESET 3
@@ -75,6 +75,7 @@ struct ppp_pd_t
struct ppp_t
{
+ struct list_head entry;
struct triton_md_handler_t chan_hnd;
struct triton_md_handler_t unit_hnd;
int fd;
@@ -84,6 +85,7 @@ struct ppp_t
int chan_idx;
int unit_idx;
+ int state;
char *chan_name;
char ifname[PPP_IFNAME_LEN];
char sessionid[PPP_SESSIONID_LEN+1];
@@ -142,6 +144,13 @@ struct ppp_handler_t
void (*recv_proto_rej)(struct ppp_handler_t *h);
};
+struct ppp_stat_t
+{
+ uint32_t active;
+ uint32_t starting;
+ uint32_t finishing;
+};
+
struct ppp_t *alloc_ppp(void);
void ppp_init(struct ppp_t *ppp);
int establish_ppp(struct ppp_t *ppp);
@@ -165,5 +174,10 @@ struct ppp_layer_data_t *ppp_find_layer_data(struct ppp_t *, struct ppp_layer_t
extern int conf_ppp_verbose;
+extern pthread_rwlock_t ppp_lock;
+extern struct list_head ppp_list;
+
+extern struct ppp_stat_t ppp_stat;
+
extern int sock_fd; // internet socket for ioctls
#endif