From 80c32d237e01b1c05663ccfa34003d2f49aa7eee Mon Sep 17 00:00:00 2001 From: Kozlov Dmitry Date: Tue, 10 Jul 2012 18:58:53 +0400 Subject: initial session backup implementation --- accel-pppd/include/ap_session.h | 6 ++++++ accel-pppd/include/ap_session_backup.h | 23 +++++++++++++++++++++++ accel-pppd/include/backup.h | 1 + 3 files changed, 30 insertions(+) create mode 100644 accel-pppd/include/ap_session_backup.h create mode 120000 accel-pppd/include/backup.h (limited to 'accel-pppd/include') diff --git a/accel-pppd/include/ap_session.h b/accel-pppd/include/ap_session.h index b964c80..075058c 100644 --- a/accel-pppd/include/ap_session.h +++ b/accel-pppd/include/ap_session.h @@ -7,6 +7,7 @@ #define AP_STATE_STARTING 1 #define AP_STATE_ACTIVE 2 #define AP_STATE_FINISHING 3 +#define AP_STATE_RESTORE 4 #define TERM_USER_REQUEST 1 #define TERM_SESSION_TIMEOUT 2 @@ -30,6 +31,7 @@ #define MPPE_REQUIRE 2 struct ap_session; +struct backup_data; struct ap_ctrl { @@ -71,6 +73,10 @@ struct ap_session struct ap_ctrl *ctrl; +#ifdef USE_BACKUP + struct backup_data *backup; +#endif + int terminating:1; int terminated:1; int terminate_cause; diff --git a/accel-pppd/include/ap_session_backup.h b/accel-pppd/include/ap_session_backup.h new file mode 100644 index 0000000..e6382ff --- /dev/null +++ b/accel-pppd/include/ap_session_backup.h @@ -0,0 +1,23 @@ +#ifndef __AP_SESSION_BACKUP_H +#define __AP_SESSION_BACKUP_H + +#define SES_TAG_USERNAME 1 +#define SES_TAG_SESSIONID 2 +#define SES_TAG_START_TIME 3 +#define SES_TAG_IPV4_ADDR 4 +#define SES_TAG_IPV4_PEER_ADDR 5 +#define SES_TAG_IPV6_INTFID 6 +#define SES_TAG_IPV6_PEER_INTFID 7 +#define SES_TAG_IPV6_ADDR 8 +#define SES_TAG_IFINDEX 9 +#define SES_TAG_IFNAME 10 + + +struct ses_tag_ipv6 +{ + struct in6_addr addr; + uint8_t prefix_len; +} __attribute__((packed)); + +#endif + diff --git a/accel-pppd/include/backup.h b/accel-pppd/include/backup.h new file mode 120000 index 0000000..0271d05 --- /dev/null +++ b/accel-pppd/include/backup.h @@ -0,0 +1 @@ +../backup/backup.h \ No newline at end of file -- cgit v1.2.3