summaryrefslogtreecommitdiff
path: root/accel-pppd/extra
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd/extra')
-rw-r--r--accel-pppd/extra/chap-secrets.c60
-rw-r--r--accel-pppd/extra/connlimit.c20
-rw-r--r--accel-pppd/extra/ippool.c34
-rw-r--r--accel-pppd/extra/ipv6pool.c24
-rw-r--r--accel-pppd/extra/net-snmp/agent.c12
-rw-r--r--accel-pppd/extra/net-snmp/exec_cli.c4
-rw-r--r--accel-pppd/extra/net-snmp/sessionTable.c16
-rw-r--r--accel-pppd/extra/net-snmp/sessionTable.h6
-rw-r--r--accel-pppd/extra/net-snmp/sessionTable_data_access.c10
-rw-r--r--accel-pppd/extra/net-snmp/sessionTable_data_get.c8
-rw-r--r--accel-pppd/extra/net-snmp/sessionTable_data_set.c2
-rw-r--r--accel-pppd/extra/net-snmp/sessionTable_data_set.h2
-rw-r--r--accel-pppd/extra/net-snmp/sessionTable_enums.h34
-rw-r--r--accel-pppd/extra/net-snmp/sessionTable_interface.c46
-rw-r--r--accel-pppd/extra/net-snmp/sessionTable_interface.h2
-rw-r--r--accel-pppd/extra/net-snmp/sessionTable_oids.h20
-rw-r--r--accel-pppd/extra/net-snmp/shutdown.c2
-rw-r--r--accel-pppd/extra/net-snmp/statCore.c8
-rw-r--r--accel-pppd/extra/net-snmp/statIPOE.c6
-rw-r--r--accel-pppd/extra/net-snmp/statL2TP.c6
-rw-r--r--accel-pppd/extra/net-snmp/statPPP.c6
-rw-r--r--accel-pppd/extra/net-snmp/statPPPOE.c6
-rw-r--r--accel-pppd/extra/net-snmp/statPPTP.c6
-rw-r--r--accel-pppd/extra/net-snmp/terminate.c10
-rw-r--r--accel-pppd/extra/pppd_compat.c34
-rw-r--r--accel-pppd/extra/sigchld.c2
26 files changed, 193 insertions, 193 deletions
diff --git a/accel-pppd/extra/chap-secrets.c b/accel-pppd/extra/chap-secrets.c
index d48ecf6b..b693a326 100644
--- a/accel-pppd/extra/chap-secrets.c
+++ b/accel-pppd/extra/chap-secrets.c
@@ -71,7 +71,7 @@ static char *skip_word(char *ptr)
*ptr = ' ';
break;
}
- } else if (*ptr == ' ' || *ptr == '\t' || *ptr == '\n')
+ } else if (*ptr == ' ' || *ptr == '\t' || *ptr == '\n')
break;
}
@@ -95,9 +95,9 @@ static int split(char *buf, char **ptr)
buf = skip_word(buf);
if (!*buf)
return i;
-
+
*buf = 0;
-
+
buf = skip_space(buf + 1);
if (!*buf)
return i;
@@ -135,7 +135,7 @@ static struct cs_pd_t *create_pd(struct ap_session *ses, const char *username)
if (!conf_chap_secrets)
return NULL;
-
+
#ifdef CRYPTO_OPENSSL
if (conf_encrypted && !list_empty(&hash_chain)) {
unsigned int size = 0;
@@ -153,7 +153,7 @@ static struct cs_pd_t *create_pd(struct ap_session *ses, const char *username)
username = username_hash;
}
#endif
-
+
f = fopen(conf_chap_secrets, "r");
if (!f) {
log_error("chap-secrets: open '%s': %s\n", conf_chap_secrets, strerror(errno));
@@ -166,7 +166,7 @@ static struct cs_pd_t *create_pd(struct ap_session *ses, const char *username)
fclose(f);
return NULL;
}
-
+
while (fgets(buf, 4096, f)) {
if (buf[0] == '#')
continue;
@@ -209,14 +209,14 @@ found:
_free(pd);
goto out;
}
-
+
for (i = 0; i < 16; i++) {
c = ptr[1][i*2 + 2];
ptr[1][i*2 + 2] = 0;
pd->passwd[i] = strtol(ptr[1] + i*2, NULL, 16);
ptr[1][i*2 + 2] = c;
}
- } else
+ } else
#endif
{
pd->passwd = _strdup(ptr[1]);
@@ -290,7 +290,7 @@ static void ev_ses_pre_up(struct ap_session *ses)
static struct ipv4db_item_t *get_ip(struct ap_session *ses)
{
struct cs_pd_t *pd;
-
+
if (!conf_gw_ip_address && ses->ctrl->ppp)
return NULL;
@@ -319,10 +319,10 @@ static char* get_passwd(struct pwdb_t *pwdb, struct ap_session *ses, const char
if (!pd)
pd = create_pd(ses, username);
-
+
if (!pd)
return NULL;
-
+
return _strdup(pd->passwd);
}
@@ -353,7 +353,7 @@ static void des_encrypt(const uint8_t *input, const uint8_t *key, uint8_t *outpu
DES_set_key_checked(&cb, &ks);
memcpy(cb, input, 8);
DES_ecb_encrypt(&cb, &res, &ks, DES_ENCRYPT);
- memcpy(output, res, 8);
+ memcpy(output, res, 8);
}
static int auth_pap(struct cs_pd_t *pd, const char *username, va_list args)
@@ -363,7 +363,7 @@ static int auth_pap(struct cs_pd_t *pd, const char *username, va_list args)
unsigned char z_hash[21];
char *u_passwd;
int i, len = strlen(passwd);
-
+
u_passwd = _malloc(len * 2);
for (i = 0; i< len; i++) {
u_passwd[i * 2] = passwd[i];
@@ -380,10 +380,10 @@ static int auth_pap(struct cs_pd_t *pd, const char *username, va_list args)
/*des_encrypt(ad->val, z_hash, nt_hash);
des_encrypt(ad->val, z_hash + 7, nt_hash + 8);
des_encrypt(ad->val, z_hash + 14, nt_hash + 16);*/
-
+
if (memcmp(z_hash, pd->passwd, 16))
return PWDB_DENIED;
-
+
return PWDB_SUCCESS;
}
@@ -421,7 +421,7 @@ static void derive_mppe_keys_mschap_v1(struct ap_session *ses, const uint8_t *z_
SHA1_Update(&sha_ctx, digest, 16);
SHA1_Update(&sha_ctx, digest, 16);
SHA1_Update(&sha_ctx, challenge, challenge_len);
- SHA1_Final(digest, &sha_ctx);
+ SHA1_Final(digest, &sha_ctx);
triton_event_fire(EV_MPPE_KEYS, &ev_mppe);
}
@@ -439,7 +439,7 @@ int auth_mschap_v1(struct ap_session *ses, struct cs_pd_t *pd, const char *usern
memcpy(z_hash, pd->passwd, 16);
memset(z_hash + 16, 0, sizeof(z_hash) - 16);
-
+
des_encrypt(challenge, z_hash, nt_hash);
des_encrypt(challenge, z_hash + 7, nt_hash + 8);
des_encrypt(challenge, z_hash + 14, nt_hash + 16);
@@ -460,7 +460,7 @@ static void generate_mschap_response(const uint8_t *nt_response, const uint8_t *
uint8_t pw_hash[MD4_DIGEST_LENGTH];
uint8_t response[SHA_DIGEST_LENGTH];
int i;
-
+
uint8_t magic1[39] =
{0x4D, 0x61, 0x67, 0x69, 0x63, 0x20, 0x73, 0x65, 0x72, 0x76,
0x65, 0x72, 0x20, 0x74, 0x6F, 0x20, 0x63, 0x6C, 0x69, 0x65,
@@ -489,7 +489,7 @@ static void generate_mschap_response(const uint8_t *nt_response, const uint8_t *
SHA1_Update(&sha_ctx, c_hash, 8);
SHA1_Update(&sha_ctx, magic2, 41);
SHA1_Final(response, &sha_ctx);
-
+
for (i = 0; i < 20; i++)
sprintf(authenticator + i*2, "%02X", response[i]);
}
@@ -502,7 +502,7 @@ static void derive_mppe_keys_mschap_v2(struct ap_session *ses, const uint8_t *z_
uint8_t digest[20];
uint8_t send_key[20];
uint8_t recv_key[20];
-
+
uint8_t pad1[40] =
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -548,7 +548,7 @@ static void derive_mppe_keys_mschap_v2(struct ap_session *ses, const uint8_t *z_
.recv_key = recv_key,
.send_key = send_key,
};
-
+
//NtPasswordHashHash
MD4_Init(&md4_ctx);
MD4_Update(&md4_ctx, z_hash, 16);
@@ -602,7 +602,7 @@ int auth_mschap_v2(struct ap_session *ses, struct cs_pd_t *pd, const char *usern
memcpy(z_hash, pd->passwd, 16);
memset(z_hash + 16, 0, sizeof(z_hash) - 16);
-
+
des_encrypt(c_hash, z_hash, nt_hash);
des_encrypt(c_hash, z_hash + 7, nt_hash + 8);
des_encrypt(c_hash, z_hash + 14, nt_hash + 16);
@@ -613,7 +613,7 @@ int auth_mschap_v2(struct ap_session *ses, struct cs_pd_t *pd, const char *usern
if (ses->ctrl->ppp)
derive_mppe_keys_mschap_v2(ses, z_hash, response);
- generate_mschap_response(response, c_hash, z_hash, authenticator);
+ generate_mschap_response(response, c_hash, z_hash, authenticator);
return PWDB_SUCCESS;
}
@@ -626,7 +626,7 @@ static int check_passwd(struct pwdb_t *pwdb, struct ap_session *ses, pwdb_callba
if (!conf_encrypted)
return PWDB_NO_IMPL;
-
+
pd = find_pd(ses);
if (!pd)
@@ -634,7 +634,7 @@ static int check_passwd(struct pwdb_t *pwdb, struct ap_session *ses, pwdb_callba
if (!pd)
return PWDB_NO_IMPL;
-
+
va_copy(args, _args);
switch (type) {
@@ -656,7 +656,7 @@ static int check_passwd(struct pwdb_t *pwdb, struct ap_session *ses, pwdb_callba
}
break;
}
-
+
va_end(args);
return r;
@@ -692,7 +692,7 @@ static void parse_hash_chain(const char *opt)
char *ptr1 = str, *ptr2;
struct hash_chain *hc;
int f = 0;
-
+
while (!f) {
for (ptr2 = ptr1 + 1; *ptr2 && *ptr2 != ','; ptr2++);
f = *ptr2 == 0;
@@ -748,13 +748,13 @@ static void load_config(void)
else {
conf_gw_ip_address = 0;
}
-
+
opt = conf_get_opt("chap-secrets", "encrypted");
if (opt)
conf_encrypted = atoi(opt);
else
conf_encrypted = 0;
-
+
#ifdef CRYPTO_OPENSSL
clear_hash_chain();
opt = conf_get_opt("chap-secrets", "username-hash");
@@ -769,7 +769,7 @@ static void init(void)
pwdb_register(&pwdb);
ipdb_register(&ipdb);
-
+
triton_event_register_handler(EV_SES_FINISHED, (triton_event_func)ev_ses_finished);
triton_event_register_handler(EV_SES_PRE_UP, (triton_event_func)ev_ses_pre_up);
triton_event_register_handler(EV_CONFIG_RELOAD, (triton_event_func)load_config);
diff --git a/accel-pppd/extra/connlimit.c b/accel-pppd/extra/connlimit.c
index fd7c952b..49871dd8 100644
--- a/accel-pppd/extra/connlimit.c
+++ b/accel-pppd/extra/connlimit.c
@@ -35,7 +35,7 @@ int __export connlimit_check(uint64_t key)
LIST_HEAD(tmp_list);
int r = 1;
-
+
clock_gettime(CLOCK_MONOTONIC, &ts);
pthread_mutex_lock(&lock);
@@ -87,13 +87,13 @@ int __export connlimit_check(uint64_t key)
r = 0;
}
-
+
if (r == 0)
log_debug("connlimit: accept %" PRIu64 "\n", key);
else
log_debug("connlimit: drop %" PRIu64 "\n", key);
-
+
while (!list_empty(&tmp_list)) {
it = list_entry(tmp_list.next, typeof(*it), entry);
list_del(&it->entry);
@@ -113,10 +113,10 @@ static int parse_limit(const char *opt, int *limit, int *time)
*time = 1;
return 0;
}
-
+
if (*endptr != '/')
goto out_err;
-
+
opt = endptr + 1;
*time = strtol(opt, &endptr, 10);
@@ -125,18 +125,18 @@ static int parse_limit(const char *opt, int *limit, int *time)
if (*endptr == 's')
return 0;
-
+
if (*endptr == 'm') {
*time *= 60;
return 0;
}
-
+
if (*endptr == 'h') {
*time *= 3600;
return 0;
}
-
-out_err:
+
+out_err:
log_error("connlimit: failed to parse '%s'\n", opt);
return -1;
}
@@ -156,7 +156,7 @@ static void load_config()
opt = conf_get_opt("connlimit", "burst");
if (opt)
conf_burst = atoi(opt);
-
+
opt = conf_get_opt("connlimit", "timeout");
if (opt)
conf_burst_timeout = atoi(opt) * 1000;
diff --git a/accel-pppd/extra/ippool.c b/accel-pppd/extra/ippool.c
index 15238025..c192e8d4 100644
--- a/accel-pppd/extra/ippool.c
+++ b/accel-pppd/extra/ippool.c
@@ -87,7 +87,7 @@ struct ippool_t *find_pool(const char *name, int create)
if (create)
return create_pool(name);
-
+
return NULL;
}
@@ -95,7 +95,7 @@ static void parse_gw_ip_address(const char *val)
{
if (!val)
return;
-
+
conf_gw_ip_address = inet_addr(val);
}
@@ -103,7 +103,7 @@ static void parse_gw_ip_address(const char *val)
static int parse1(const char *str, uint32_t *begin, uint32_t *end)
{
int n, f1, f2, f3, f4, m, mask = 0;
-
+
n = sscanf(str, "%u.%u.%u.%u/%u",&f1, &f2, &f3, &f4, &m);
if (n != 5)
return -1;
@@ -117,7 +117,7 @@ static int parse1(const char *str, uint32_t *begin, uint32_t *end)
return -1;
if (m == 0 || m > 32)
return -1;
-
+
*begin = (f4 << 24) | (f3 << 16) | (f2 << 8) | f1;
mask = htonl(~((1 << (32 - m)) - 1));
@@ -145,7 +145,7 @@ static int parse2(const char *str, uint32_t *begin, uint32_t *end)
return -1;
if (m < f4 || m > 255)
return -1;
-
+
*begin = ntohl((f4 << 24) | (f3 << 16) | (f2 << 8) | f1);
*end = ntohl((m << 24) | (f3 << 16) | (f2 << 8) | f1);
@@ -184,12 +184,12 @@ static uint8_t get_random()
if (pos == 0)
read(urandom_fd, buf, 128);
-
+
r = buf[pos++];
if (pos == 128)
pos = 0;
-
+
return r;
}
@@ -224,17 +224,17 @@ static void generate_pool_p2p(struct ippool_t *p)
pos1 = pos1->next;
pos2 = pos2->prev;
-
+
if (r >= 64)
continue;
-
+
peer_addr = list_entry(pos, typeof(*peer_addr), entry);
if (pos == pos1)
pos1 = pos1->next;
-
+
if (pos == pos2)
pos2 = pos2->prev;
-
+
list_del(&peer_addr->entry);
t = 0;
} else {
@@ -304,13 +304,13 @@ static void generate_pool_net30(struct ippool_t *p)
it->it.peer_addr = addr[2]->addr;
list_add_tail(&it->entry, &p->items);
-
+
for (i = 0; i < 4; i++) {
if (addr[i])
free(addr[i]);
}
}
-
+
for (i = 0; i < 4; i++) {
if (addr[i])
free(addr[i]);
@@ -514,7 +514,7 @@ static int parse_vendor_opt(const char *opt)
vendor = rad_dict_find_vendor_name(opt);
if (vendor)
return vendor->id;
-
+
return atoi(opt);
}
#endif
@@ -568,7 +568,7 @@ static void ippool_init2(void)
char *pool_name = NULL;
char *allocator = NULL;
void (*generate)(struct ippool_t *pool);
-
+
if (!s)
return;
@@ -581,7 +581,7 @@ static void ippool_init2(void)
conf_vendor = parse_vendor_opt(opt->val);
continue;
}
-
+
if (!strcmp(opt->name, "attr")) {
conf_attr = parse_attr_opt(opt->val);
continue;
@@ -625,7 +625,7 @@ static void ippool_init2(void)
_free(allocator);
}
}
-
+
if (def_pool->generate)
def_pool->generate(def_pool);
diff --git a/accel-pppd/extra/ipv6pool.c b/accel-pppd/extra/ipv6pool.c
index 0ca270c0..6887ea32 100644
--- a/accel-pppd/extra/ipv6pool.c
+++ b/accel-pppd/extra/ipv6pool.c
@@ -79,7 +79,7 @@ static void generate_ippool(struct in6_addr *addr, int mask, int prefix_len)
*(uint64_t *)(step.s6_addr + 8) = htobe64(1llu << (128 - prefix_len));
else
*(uint64_t *)step.s6_addr = htobe64(1llu << (64 - prefix_len));
-
+
while (in6_addr_cmp(&ip, &end) <= 0) {
it = malloc(sizeof(*it));
it->it.owner = &ipdb;
@@ -115,7 +115,7 @@ static void generate_dppool(struct in6_addr *addr, int mask, int prefix_len)
*(uint64_t *)(step.s6_addr + 8) = htobe64(1llu << (128 - prefix_len));
else
*(uint64_t *)step.s6_addr = htobe64(1llu << (64 - prefix_len));
-
+
while (in6_addr_cmp(&ip, &end) <= 0) {
it = malloc(sizeof(*it));
it->it.owner = &ipdb;
@@ -138,34 +138,34 @@ static void add_prefix(int type, const char *_val)
struct in6_addr addr;
int prefix_len;
int mask;
-
+
ptr1 = strchr(val, '/');
if (!ptr1)
goto err;
-
+
*ptr1 = 0;
ptr2 = strchr(ptr1 + 1, ',');
if (!ptr2)
goto err;
-
+
*ptr2 = 0;
if (inet_pton(AF_INET6, val, &addr) == 0)
goto err;
-
+
if (sscanf(ptr1 + 1, "%i", &mask) != 1)
goto err;
-
+
if (mask < 7 || mask > 127)
goto err;
-
+
if (sscanf(ptr2 + 1, "%i", &prefix_len) != 1)
goto err;
-
+
if (prefix_len > 128 || prefix_len < mask)
goto err;
-
+
if (type)
generate_dppool(&addr, mask, prefix_len);
else
@@ -173,7 +173,7 @@ static void add_prefix(int type, const char *_val)
_free(val);
return;
-
+
err:
log_error("ipv6_pool: failed to parse '%s'\n", _val);
_free(val);
@@ -245,7 +245,7 @@ static void ippool_init(void)
if (!s)
return;
-
+
list_for_each_entry(opt, &s->items, entry) {
if (!strcmp(opt->name, "delegate"))
add_prefix(1, opt->val);
diff --git a/accel-pppd/extra/net-snmp/agent.c b/accel-pppd/extra/net-snmp/agent.c
index 9f8b1a74..162cdbc0 100644
--- a/accel-pppd/extra/net-snmp/agent.c
+++ b/accel-pppd/extra/net-snmp/agent.c
@@ -45,7 +45,7 @@ static int snmp_term = 0;
static int agent_log(int major, int minor, void *serv_arg, void *cl_arg)
{
struct snmp_log_message *m = serv_arg;
-
+
switch (m->priority) {
case LOG_EMERG:
log_emerg("net-snmp: %s", m->msg);
@@ -96,7 +96,7 @@ static void *snmp_thread(void *a)
snmp_enable_calllog();
//snmp_set_do_debugging(1);
//netsnmp_ds_set_boolean(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_ROLE, 1);
-
+
if (!conf_master)
netsnmp_enable_subagent();
@@ -117,11 +117,11 @@ static void *snmp_thread(void *a)
if (conf_master)
init_master_agent();
-
+
while (!snmp_term) {
agent_check_and_process(1);
}
-
+
snmp_shutdown(conf_agent_name);
SOCK_CLEANUP;
@@ -152,11 +152,11 @@ static void init(void)
opt = conf_get_opt("snmp", "agent-name");
if (opt)
conf_agent_name = opt;
-
+
/*opt = conf_get_opt("snmp", "oid-prefix")
if (opt)
conf_oid_prefix = opt;*/
-
+
pthread_create(&snmp_thr, NULL, snmp_thread, NULL);
triton_context_register(&ctx, NULL);
triton_context_wakeup(&ctx);
diff --git a/accel-pppd/extra/net-snmp/exec_cli.c b/accel-pppd/extra/net-snmp/exec_cli.c
index 63a89587..28e53383 100644
--- a/accel-pppd/extra/net-snmp/exec_cli.c
+++ b/accel-pppd/extra/net-snmp/exec_cli.c
@@ -36,7 +36,7 @@ static void set_action(const char *cmd, size_t len)
memcpy(cc.cmdline, cmd, len);
cc.cmdline[len] = 0;
-
+
cli_process_cmd(&cc);
_free(cc.cmdline);
@@ -69,7 +69,7 @@ handle_cli(netsnmp_mib_handler *handler,
/* a instance handler also only hands us one request at a time, so
we don't need to loop over a list of requests; we'll only get one. */
-
+
switch(reqinfo->mode) {
case MODE_GET:
diff --git a/accel-pppd/extra/net-snmp/sessionTable.c b/accel-pppd/extra/net-snmp/sessionTable.c
index dc7d62bd..954ca1e3 100644
--- a/accel-pppd/extra/net-snmp/sessionTable.c
+++ b/accel-pppd/extra/net-snmp/sessionTable.c
@@ -1,6 +1,6 @@
/*
* Note: this file originally auto-generated by mib2c using
- * version : 14170 $ of $
+ * version : 14170 $ of $
*
* $Id:$
*/
@@ -42,7 +42,7 @@ init_sessionTable(void)
/*
* TODO:300:o: Perform sessionTable one-time module initialization.
*/
-
+
/*
* here we initialize all the tables we're planning on supporting
*/
@@ -63,7 +63,7 @@ shutdown_sessionTable(void)
}
/**
- * Initialize the table sessionTable
+ * Initialize the table sessionTable
* (Define its contents and how it's structured)
*/
void
@@ -88,13 +88,13 @@ initialize_table_sessionTable(void)
* string token is used to add, find or remove pointers.
*/
user_context = netsnmp_create_data_list("sessionTable", NULL, NULL);
-
+
/*
* No support for any flags yet, but in the future you would
* set any flags here.
*/
flags = 0;
-
+
/*
* call interface initialization code
*/
@@ -102,7 +102,7 @@ initialize_table_sessionTable(void)
} /* initialize_table_sessionTable */
/**
- * Shutdown the table sessionTable
+ * Shutdown the table sessionTable
*/
void
shutdown_table_sessionTable(void)
@@ -129,7 +129,7 @@ sessionTable_rowreq_ctx_init(sessionTable_rowreq_ctx *rowreq_ctx,
DEBUGMSGTL(("verbose:sessionTable:sessionTable_rowreq_ctx_init","called\n"));
netsnmp_assert(NULL != rowreq_ctx);
-
+
/*
* TODO:210:o: |-> Perform extra sessionTable rowreq initialization. (eg DEFVALS)
*/
@@ -146,7 +146,7 @@ void sessionTable_rowreq_ctx_cleanup(sessionTable_rowreq_ctx *rowreq_ctx)
DEBUGMSGTL(("verbose:sessionTable:sessionTable_rowreq_ctx_cleanup","called\n"));
netsnmp_assert(NULL != rowreq_ctx);
-
+
/*
* TODO:211:o: |-> Perform extra sessionTable rowreq cleanup.
*/
diff --git a/accel-pppd/extra/net-snmp/sessionTable.h b/accel-pppd/extra/net-snmp/sessionTable.h
index 645ddd35..2635f21c 100644
--- a/accel-pppd/extra/net-snmp/sessionTable.h
+++ b/accel-pppd/extra/net-snmp/sessionTable.h
@@ -124,9 +124,9 @@ typedef struct sessionTable_rowreq_ctx_s {
/** this must be first for container compare to work */
netsnmp_index oid_idx;
oid oid_tmp[MAX_sessionTable_IDX_LEN];
-
+
sessionTable_mib_index tbl_idx;
-
+
sessionTable_data * data;
/*
@@ -138,7 +138,7 @@ typedef struct sessionTable_rowreq_ctx_s {
/*
* TODO:131:o: | |-> Add useful data to sessionTable rowreq context.
*/
-
+
/*
* storage for future expansion
*/
diff --git a/accel-pppd/extra/net-snmp/sessionTable_data_access.c b/accel-pppd/extra/net-snmp/sessionTable_data_access.c
index ac7e94af..edc5e6b2 100644
--- a/accel-pppd/extra/net-snmp/sessionTable_data_access.c
+++ b/accel-pppd/extra/net-snmp/sessionTable_data_access.c
@@ -1,6 +1,6 @@
/*
* Note: this file originally auto-generated by mib2c using
- * version : 14170 $ of $
+ * version : 14170 $ of $
*
* $Id:$
*/
@@ -24,7 +24,7 @@
*
* These routines are used to locate the data used to satisfy
* requests.
- *
+ *
* @{
*/
/**********************************************************************
@@ -107,7 +107,7 @@ sessionTable_container_init(netsnmp_container **container_ptr_ptr,
netsnmp_cache *cache)
{
DEBUGMSGTL(("verbose:sessionTable:sessionTable_container_init","called\n"));
-
+
if (NULL == container_ptr_ptr) {
snmp_log(LOG_ERR,"bad container param to sessionTable_container_init\n");
return;
@@ -155,7 +155,7 @@ void
sessionTable_container_shutdown(netsnmp_container *container_ptr)
{
DEBUGMSGTL(("verbose:sessionTable:sessionTable_container_shutdown","called\n"));
-
+
if (NULL == container_ptr) {
snmp_log(LOG_ERR,"bad params to sessionTable_container_shutdown\n");
return;
@@ -218,7 +218,7 @@ sessionTable_container_load(netsnmp_container *container)
sessionTable_release_rowreq_ctx(rowreq_ctx);
continue;
}
-
+
strcpy(rowreq_ctx->data->ifname, ses->ifname);
if (ses->username)
diff --git a/accel-pppd/extra/net-snmp/sessionTable_data_get.c b/accel-pppd/extra/net-snmp/sessionTable_data_get.c
index d467ad05..e2b1cbc6 100644
--- a/accel-pppd/extra/net-snmp/sessionTable_data_get.c
+++ b/accel-pppd/extra/net-snmp/sessionTable_data_get.c
@@ -1,6 +1,6 @@
/*
* Note: this file originally auto-generated by mib2c using
- * version : 12088 $ of $
+ * version : 12088 $ of $
*
* $Id:$
*/
@@ -121,7 +121,7 @@ sessionTable_indexes_set_tbl_idx(sessionTable_mib_index *tbl_idx, char *sesSID_v
}
tbl_idx->sesSID_len = sesSID_val_ptr_len;
memcpy( tbl_idx->sesSID, sesSID_val_ptr, sesSID_val_ptr_len* sizeof(sesSID_val_ptr[0]) );
-
+
return MFD_SUCCESS;
} /* sessionTable_indexes_set_tbl_idx */
@@ -314,7 +314,7 @@ sesUsername_get( sessionTable_rowreq_ctx *rowreq_ctx, char **sesUsername_val_ptr
}
(* sesUsername_val_ptr_len_ptr ) = len;
memcpy( (* sesUsername_val_ptr_ptr ), rowreq_ctx->data->username, len);
-
+
return MFD_SUCCESS;
} /* sesUsername_get */
@@ -484,7 +484,7 @@ sesState_get( sessionTable_rowreq_ctx *rowreq_ctx, u_long * sesState_val_ptr )
DEBUGMSGTL(("verbose:sessionTable:sesState_get","called\n"));
netsnmp_assert(NULL != rowreq_ctx);
-
+
(* sesState_val_ptr ) = rowreq_ctx->data->state;
return MFD_SUCCESS;
diff --git a/accel-pppd/extra/net-snmp/sessionTable_data_set.c b/accel-pppd/extra/net-snmp/sessionTable_data_set.c
index ebfeeeaa..2f3bfa02 100644
--- a/accel-pppd/extra/net-snmp/sessionTable_data_set.c
+++ b/accel-pppd/extra/net-snmp/sessionTable_data_set.c
@@ -18,7 +18,7 @@
*
* These routines are used to set the value for individual objects. The
* row context is passed, along with the new value.
- *
+ *
* @{
*/
/** @} */
diff --git a/accel-pppd/extra/net-snmp/sessionTable_data_set.h b/accel-pppd/extra/net-snmp/sessionTable_data_set.h
index 70534baa..c77b466c 100644
--- a/accel-pppd/extra/net-snmp/sessionTable_data_set.h
+++ b/accel-pppd/extra/net-snmp/sessionTable_data_set.h
@@ -1,6 +1,6 @@
/*
* Note: this file originally auto-generated by mib2c using
- * version : 12077 $ of $
+ * version : 12077 $ of $
*
* $Id:$
*/
diff --git a/accel-pppd/extra/net-snmp/sessionTable_enums.h b/accel-pppd/extra/net-snmp/sessionTable_enums.h
index c7ce8450..7897ff02 100644
--- a/accel-pppd/extra/net-snmp/sessionTable_enums.h
+++ b/accel-pppd/extra/net-snmp/sessionTable_enums.h
@@ -41,20 +41,20 @@ extern "C" {
#ifndef IANATUNNELTYPE_ENUMS
#define IANATUNNELTYPE_ENUMS
-#define IANATUNNELTYPE_OTHER 1
-#define IANATUNNELTYPE_DIRECT 2
-#define IANATUNNELTYPE_GRE 3
-#define IANATUNNELTYPE_MINIMAL 4
-#define IANATUNNELTYPE_L2TP 5
-#define IANATUNNELTYPE_PPTP 6
-#define IANATUNNELTYPE_L2F 7
-#define IANATUNNELTYPE_UDP 8
-#define IANATUNNELTYPE_ATMP 9
-#define IANATUNNELTYPE_MSDP 10
-#define IANATUNNELTYPE_SIXTOFOUR 11
-#define IANATUNNELTYPE_SIXOVERFOUR 12
-#define IANATUNNELTYPE_ISATAP 13
-#define IANATUNNELTYPE_TEREDO 14
+#define IANATUNNELTYPE_OTHER 1
+#define IANATUNNELTYPE_DIRECT 2
+#define IANATUNNELTYPE_GRE 3
+#define IANATUNNELTYPE_MINIMAL 4
+#define IANATUNNELTYPE_L2TP 5
+#define IANATUNNELTYPE_PPTP 6
+#define IANATUNNELTYPE_L2F 7
+#define IANATUNNELTYPE_UDP 8
+#define IANATUNNELTYPE_ATMP 9
+#define IANATUNNELTYPE_MSDP 10
+#define IANATUNNELTYPE_SIXTOFOUR 11
+#define IANATUNNELTYPE_SIXOVERFOUR 12
+#define IANATUNNELTYPE_ISATAP 13
+#define IANATUNNELTYPE_TEREDO 14
#endif /* IANATUNNELTYPE_ENUMS */
@@ -69,9 +69,9 @@ extern "C" {
#ifndef SESSTATE_ENUMS
#define SESSTATE_ENUMS
-#define SESSTATE_STARTING 1
-#define SESSTATE_ACTIVE 2
-#define SESSTATE_FINISHING 3
+#define SESSTATE_STARTING 1
+#define SESSTATE_ACTIVE 2
+#define SESSTATE_FINISHING 3
#endif /* SESSTATE_ENUMS */
diff --git a/accel-pppd/extra/net-snmp/sessionTable_interface.c b/accel-pppd/extra/net-snmp/sessionTable_interface.c
index cf60f910..420336da 100644
--- a/accel-pppd/extra/net-snmp/sessionTable_interface.c
+++ b/accel-pppd/extra/net-snmp/sessionTable_interface.c
@@ -1,6 +1,6 @@
/*
* Note: this file originally auto-generated by mib2c using
- * version : 15899 $ of $
+ * version : 15899 $ of $
*
* $Id:$
*/
@@ -60,7 +60,7 @@ typedef struct sessionTable_interface_ctx_s {
netsnmp_cache *cache;
sessionTable_registration * user_ctx;
-
+
netsnmp_table_registration_info tbl_info;
netsnmp_baby_steps_access_methods access_multiplexer;
@@ -110,7 +110,7 @@ static Netsnmp_Node_Handler _mfd_sessionTable_object_lookup;
static Netsnmp_Node_Handler _mfd_sessionTable_get_values;
/**
* @internal
- * Initialize the table sessionTable
+ * Initialize the table sessionTable
* (Define its contents and how it's structured)
*/
void
@@ -160,7 +160,7 @@ _sessionTable_initialize_interface(sessionTable_registration * reg_ptr, u_long
snmp_log(LOG_ERR,"could not initialize container for sessionTable\n");
return;
}
-
+
/*
* access_multiplexer: REQUIRED wrapper for get request handling
*/
@@ -179,7 +179,7 @@ _sessionTable_initialize_interface(sessionTable_registration * reg_ptr, u_long
* Create a registration, save our reg data, register table.
*/
DEBUGMSGTL(("sessionTable:init_sessionTable",
- "Registering sessionTable as a mibs-for-dummies table.\n"));
+ "Registering sessionTable as a mibs-for-dummies table.\n"));
handler = netsnmp_baby_steps_access_multiplexer_get(access_multiplexer);
reginfo = netsnmp_handler_registration_create("sessionTable", handler,
sessionTable_oid,
@@ -210,14 +210,14 @@ _sessionTable_initialize_interface(sessionTable_registration * reg_ptr, u_long
mfd_modes |= BABY_STEP_PRE_REQUEST;
if( access_multiplexer->post_request )
mfd_modes |= BABY_STEP_POST_REQUEST;
-
+
if( access_multiplexer->undo_setup )
mfd_modes |= BABY_STEP_UNDO_SETUP;
if( access_multiplexer->undo_cleanup )
mfd_modes |= BABY_STEP_UNDO_CLEANUP;
if( access_multiplexer->undo_sets )
mfd_modes |= BABY_STEP_UNDO_SETS;
-
+
if( access_multiplexer->row_creation )
mfd_modes |= BABY_STEP_ROW_CREATE;
if( access_multiplexer->consistency_checks )
@@ -226,7 +226,7 @@ _sessionTable_initialize_interface(sessionTable_registration * reg_ptr, u_long
mfd_modes |= BABY_STEP_COMMIT;
if( access_multiplexer->undo_commit )
mfd_modes |= BABY_STEP_UNDO_COMMIT;
-
+
handler = netsnmp_baby_steps_handler_get(mfd_modes);
netsnmp_inject_handler(reginfo, handler);
@@ -291,7 +291,7 @@ sessionTable_index_to_oid(netsnmp_index *oid_idx,
sessionTable_mib_index *mib_idx)
{
int err = SNMP_ERR_NOERROR;
-
+
/*
* temp storage for parsing indexes
*/
@@ -343,7 +343,7 @@ sessionTable_index_from_oid(netsnmp_index *oid_idx,
sessionTable_mib_index *mib_idx)
{
int err = SNMP_ERR_NOERROR;
-
+
/*
* temp storage for parsing indexes
*/
@@ -460,7 +460,7 @@ sessionTable_release_rowreq_ctx(sessionTable_rowreq_ctx *rowreq_ctx)
DEBUGMSGTL(("internal:sessionTable:sessionTable_release_rowreq_ctx","called\n"));
netsnmp_assert(NULL != rowreq_ctx);
-
+
sessionTable_rowreq_ctx_cleanup(rowreq_ctx);
/*
@@ -469,7 +469,7 @@ sessionTable_release_rowreq_ctx(sessionTable_rowreq_ctx *rowreq_ctx)
if ((rowreq_ctx->data) &&
!(rowreq_ctx->rowreq_flags & MFD_ROW_DATA_FROM_USER))
sessionTable_release_data(rowreq_ctx->data);
-
+
/*
* free index oid pointer
*/
@@ -493,13 +493,13 @@ _mfd_sessionTable_pre_request(netsnmp_mib_handler *handler,
DEBUGMSGTL(("internal:sessionTable:_mfd_sessionTable_pre_request",
"called\n"));
-
+
if (1 != netsnmp_row_merge_status_first(reginfo, agtreq_info)) {
DEBUGMSGTL(("internal:sessionTable",
"skipping additional pre_request\n"));
return SNMP_ERR_NOERROR;
}
-
+
rc = sessionTable_pre_request(sessionTable_if_ctx.user_ctx);
if (MFD_SUCCESS != rc) {
/*
@@ -509,7 +509,7 @@ _mfd_sessionTable_pre_request(netsnmp_mib_handler *handler,
"sessionTable_pre_request\n", rc));
netsnmp_request_set_error_all(requests, SNMP_VALIDATE_ERR(rc));
}
-
+
return SNMP_ERR_NOERROR;
} /* _mfd_sessionTable_pre_request */
@@ -544,7 +544,7 @@ _mfd_sessionTable_post_request(netsnmp_mib_handler *handler,
"waiting for last post_request\n"));
return SNMP_ERR_NOERROR;
}
-
+
packet_rc = netsnmp_check_all_requests_error(agtreq_info->asp, 0);
rc = sessionTable_post_request(sessionTable_if_ctx.user_ctx,packet_rc);
if (MFD_SUCCESS != rc) {
@@ -554,7 +554,7 @@ _mfd_sessionTable_post_request(netsnmp_mib_handler *handler,
DEBUGMSGTL(("sessionTable","error %d from "
"sessionTable_post_request\n", rc));
}
-
+
return SNMP_ERR_NOERROR;
} /* _mfd_sessionTable_post_request */
@@ -571,7 +571,7 @@ _mfd_sessionTable_object_lookup(netsnmp_mib_handler *handler,
int rc = SNMP_ERR_NOERROR;
sessionTable_rowreq_ctx *rowreq_ctx =
netsnmp_container_table_row_extract(requests);
-
+
DEBUGMSGTL(("internal:sessionTable:_mfd_sessionTable_object_lookup","called\n"));
/*
@@ -606,7 +606,7 @@ _sessionTable_get_column( sessionTable_rowreq_ctx *rowreq_ctx,
netsnmp_variable_list *var, int column )
{
int rc = SNMPERR_SUCCESS;
-
+
DEBUGMSGTL(("internal:sessionTable:_mfd_sessionTable_get_column",
"called for %d\n", column));
@@ -712,7 +712,7 @@ _mfd_sessionTable_get_values(netsnmp_mib_handler *handler,
DEBUGMSGTL(("internal:sessionTable:_mfd_sessionTable_get_values","called\n"));
netsnmp_assert(NULL != rowreq_ctx);
-
+
for(;requests; requests = requests->next) {
/*
* save old pointer, so we can free it if replaced
@@ -734,7 +734,7 @@ _mfd_sessionTable_get_values(netsnmp_mib_handler *handler,
tri = netsnmp_extract_table_info(requests);
if(NULL == tri)
continue;
-
+
rc = _sessionTable_get_column(rowreq_ctx, requests->requestvb, tri->colnum);
if(rc) {
if(MFD_SKIP == rc) {
@@ -798,7 +798,7 @@ _cache_load(netsnmp_cache *cache, void *vmagic)
/** should only be called for an invalid or expired cache */
netsnmp_assert((0 == cache->valid) || (1 == cache->expired));
-
+
/*
* call user code
*/
@@ -856,7 +856,7 @@ _container_free(netsnmp_container *container)
* call user code
*/
sessionTable_container_free(container);
-
+
/*
* free all items. inefficient, but easy.
*/
diff --git a/accel-pppd/extra/net-snmp/sessionTable_interface.h b/accel-pppd/extra/net-snmp/sessionTable_interface.h
index ebd1143d..2b99dde6 100644
--- a/accel-pppd/extra/net-snmp/sessionTable_interface.h
+++ b/accel-pppd/extra/net-snmp/sessionTable_interface.h
@@ -9,7 +9,7 @@
* \warning This code should not be modified, called directly,
* or used to interpret functionality. It is subject to
* change at any time.
- *
+ *
* @{
*/
/*
diff --git a/accel-pppd/extra/net-snmp/sessionTable_oids.h b/accel-pppd/extra/net-snmp/sessionTable_oids.h
index 42ec6e53..0fc5c284 100644
--- a/accel-pppd/extra/net-snmp/sessionTable_oids.h
+++ b/accel-pppd/extra/net-snmp/sessionTable_oids.h
@@ -16,27 +16,27 @@ extern "C" {
#define SESSIONTABLE_OID 1,3,6,1,4,1,8072,100,2,1
#define COLUMN_SESSID 1
-
+
#define COLUMN_SESIFNAME 2
-
+
#define COLUMN_SESUSERNAME 3
-
+
#define COLUMN_SESIP 4
-
+
#define COLUMN_SESTYPE 5
-
+
#define COLUMN_SESSTATE 6
-
+
#define COLUMN_SESUPTIME 7
-
+
#define COLUMN_SESCALLINGSID 8
-
+
#define COLUMN_SESCALLEDSID 9
-
+
#define SESSIONTABLE_MIN_COL COLUMN_SESSID
#define SESSIONTABLE_MAX_COL COLUMN_SESCALLEDSID
-
+
#ifdef __cplusplus
diff --git a/accel-pppd/extra/net-snmp/shutdown.c b/accel-pppd/extra/net-snmp/shutdown.c
index 82f85407..06c87c51 100644
--- a/accel-pppd/extra/net-snmp/shutdown.c
+++ b/accel-pppd/extra/net-snmp/shutdown.c
@@ -35,7 +35,7 @@ handle_shutdown(netsnmp_mib_handler *handler,
/* a instance handler also only hands us one request at a time, so
we don't need to loop over a list of requests; we'll only get one. */
-
+
switch(reqinfo->mode) {
case MODE_GET:
diff --git a/accel-pppd/extra/net-snmp/statCore.c b/accel-pppd/extra/net-snmp/statCore.c
index 74a6b35b..55109f6a 100644
--- a/accel-pppd/extra/net-snmp/statCore.c
+++ b/accel-pppd/extra/net-snmp/statCore.c
@@ -55,7 +55,7 @@ handle_statCoreUpTime(netsnmp_mib_handler *handler,
/* a instance handler also only hands us one request at a time, so
we don't need to loop over a list of requests; we'll only get one. */
-
+
switch(reqinfo->mode) {
case MODE_GET:
@@ -84,7 +84,7 @@ handle_statCoreCPU(netsnmp_mib_handler *handler,
/* a instance handler also only hands us one request at a time, so
we don't need to loop over a list of requests; we'll only get one. */
-
+
switch(reqinfo->mode) {
case MODE_GET:
@@ -119,7 +119,7 @@ handle_statCoreMemRss(netsnmp_mib_handler *handler,
fscanf(f, "%lu %lu", &vmsize, &vmrss);
fclose(f);
}
-
+
vmrss *= page_size;
/* We are never called for a GETNEXT if it's registered as a
@@ -127,7 +127,7 @@ handle_statCoreMemRss(netsnmp_mib_handler *handler,
/* a instance handler also only hands us one request at a time, so
we don't need to loop over a list of requests; we'll only get one. */
-
+
switch(reqinfo->mode) {
case MODE_GET:
diff --git a/accel-pppd/extra/net-snmp/statIPOE.c b/accel-pppd/extra/net-snmp/statIPOE.c
index be41085e..24f154fd 100644
--- a/accel-pppd/extra/net-snmp/statIPOE.c
+++ b/accel-pppd/extra/net-snmp/statIPOE.c
@@ -22,8 +22,8 @@ static unsigned int *stat_starting;
static unsigned int *stat_active;
/*
- * Our initialization routine, called automatically by the agent
- * (Note that the function name must match init_FILENAME())
+ * Our initialization routine, called automatically by the agent
+ * (Note that the function name must match init_FILENAME())
*/
void
init_statIPOE(void)
@@ -36,7 +36,7 @@ init_statIPOE(void)
/*
* a debugging statement. Run the agent with -DstatIPOE to see
- * the output of this debugging statement.
+ * the output of this debugging statement.
*/
DEBUGMSGTL(("statIPOE", "Initializing the statIPOE module\n"));
diff --git a/accel-pppd/extra/net-snmp/statL2TP.c b/accel-pppd/extra/net-snmp/statL2TP.c
index a91d336a..59998386 100644
--- a/accel-pppd/extra/net-snmp/statL2TP.c
+++ b/accel-pppd/extra/net-snmp/statL2TP.c
@@ -23,8 +23,8 @@ static unsigned int *stat_starting;
static unsigned int *stat_active;
/*
- * Our initialization routine, called automatically by the agent
- * (Note that the function name must match init_FILENAME())
+ * Our initialization routine, called automatically by the agent
+ * (Note that the function name must match init_FILENAME())
*/
void
init_statL2TP(void)
@@ -37,7 +37,7 @@ init_statL2TP(void)
/*
* a debugging statement. Run the agent with -DstatL2TP to see
- * the output of this debugging statement.
+ * the output of this debugging statement.
*/
DEBUGMSGTL(("statL2TP", "Initializing the statL2TP module\n"));
diff --git a/accel-pppd/extra/net-snmp/statPPP.c b/accel-pppd/extra/net-snmp/statPPP.c
index db8918b7..37e4630c 100644
--- a/accel-pppd/extra/net-snmp/statPPP.c
+++ b/accel-pppd/extra/net-snmp/statPPP.c
@@ -11,8 +11,8 @@
#include "ppp.h"
/*
- * Our initialization routine, called automatically by the agent
- * (Note that the function name must match init_FILENAME())
+ * Our initialization routine, called automatically by the agent
+ * (Note that the function name must match init_FILENAME())
*/
void
init_statPPP(void)
@@ -26,7 +26,7 @@ init_statPPP(void)
/*
* a debugging statement. Run the agent with -DstatPPP to see
- * the output of this debugging statement.
+ * the output of this debugging statement.
*/
DEBUGMSGTL(("statPPP", "Initializing the statPPP module\n"));
diff --git a/accel-pppd/extra/net-snmp/statPPPOE.c b/accel-pppd/extra/net-snmp/statPPPOE.c
index 0ca2dd86..6042dc5b 100644
--- a/accel-pppd/extra/net-snmp/statPPPOE.c
+++ b/accel-pppd/extra/net-snmp/statPPPOE.c
@@ -22,8 +22,8 @@ static unsigned int *stat_starting;
static unsigned int *stat_active;
/*
- * Our initialization routine, called automatically by the agent
- * (Note that the function name must match init_FILENAME())
+ * Our initialization routine, called automatically by the agent
+ * (Note that the function name must match init_FILENAME())
*/
void
init_statPPPOE(void)
@@ -36,7 +36,7 @@ init_statPPPOE(void)
/*
* a debugging statement. Run the agent with -DstatPPPOE to see
- * the output of this debugging statement.
+ * the output of this debugging statement.
*/
DEBUGMSGTL(("statPPPOE", "Initializing the statPPPOE module\n"));
diff --git a/accel-pppd/extra/net-snmp/statPPTP.c b/accel-pppd/extra/net-snmp/statPPTP.c
index 1a13ad06..48642202 100644
--- a/accel-pppd/extra/net-snmp/statPPTP.c
+++ b/accel-pppd/extra/net-snmp/statPPTP.c
@@ -22,8 +22,8 @@ static unsigned int *stat_starting;
static unsigned int *stat_active;
/*
- * Our initialization routine, called automatically by the agent
- * (Note that the function name must match init_FILENAME())
+ * Our initialization routine, called automatically by the agent
+ * (Note that the function name must match init_FILENAME())
*/
void
init_statPPTP(void)
@@ -36,7 +36,7 @@ init_statPPTP(void)
/*
* a debugging statement. Run the agent with -DstatPPTP to see
- * the output of this debugging statement.
+ * the output of this debugging statement.
*/
DEBUGMSGTL(("statPPTP", "Initializing the statPPTP module\n"));
diff --git a/accel-pppd/extra/net-snmp/terminate.c b/accel-pppd/extra/net-snmp/terminate.c
index 23d355a2..e7e5d12c 100644
--- a/accel-pppd/extra/net-snmp/terminate.c
+++ b/accel-pppd/extra/net-snmp/terminate.c
@@ -63,7 +63,7 @@ static void terminate_by_ip(const char *val, size_t len)
str[len] = 0;
addr = inet_addr(str);
-
+
pthread_rwlock_rdlock(&ses_lock);
list_for_each_entry(ses, &ses_list, entry) {
if (!ses->ipv4 || ses->ipv4->peer_addr != addr)
@@ -139,7 +139,7 @@ handle_termBySID(netsnmp_mib_handler *handler,
/* a instance handler also only hands us one request at a time, so
we don't need to loop over a list of requests; we'll only get one. */
-
+
switch(reqinfo->mode) {
case MODE_GET:
@@ -200,7 +200,7 @@ handle_termByIfName(netsnmp_mib_handler *handler,
/* a instance handler also only hands us one request at a time, so
we don't need to loop over a list of requests; we'll only get one. */
-
+
switch(reqinfo->mode) {
case MODE_GET:
@@ -262,7 +262,7 @@ handle_termByIP(netsnmp_mib_handler *handler,
/* a instance handler also only hands us one request at a time, so
we don't need to loop over a list of requests; we'll only get one. */
-
+
switch(reqinfo->mode) {
case MODE_GET:
@@ -326,7 +326,7 @@ handle_termByUsername(netsnmp_mib_handler *handler,
/* a instance handler also only hands us one request at a time, so
we don't need to loop over a list of requests; we'll only get one. */
-
+
switch(reqinfo->mode) {
case MODE_GET:
diff --git a/accel-pppd/extra/pppd_compat.c b/accel-pppd/extra/pppd_compat.c
index e48029bb..482a7080 100644
--- a/accel-pppd/extra/pppd_compat.c
+++ b/accel-pppd/extra/pppd_compat.c
@@ -113,7 +113,7 @@ static void ip_change_handler(struct sigchld_handler_t *h, int status)
static void ev_ses_starting(struct ap_session *ses)
{
struct pppd_compat_pd *pd;
-
+
pd = _malloc(sizeof(*pd));
if (!pd) {
log_emerg("pppd_compat: out of memory\n");
@@ -139,7 +139,7 @@ static void ev_ses_pre_up(struct ap_session *ses)
char ipaddr[17];
char peer_ipaddr[17];
struct pppd_compat_pd *pd = find_pd(ses);
-
+
if (!pd)
return;
@@ -169,7 +169,7 @@ static void ev_ses_pre_up(struct ap_session *ses)
argv[4] = ipaddr;
argv[5] = peer_ipaddr;
fill_argv(argv, pd, conf_ip_up);
-
+
fill_env(env, env_mem, pd);
if (conf_ip_pre_up) {
@@ -210,14 +210,14 @@ static void ev_ses_started(struct ap_session *ses)
char ipaddr[17];
char peer_ipaddr[17];
struct pppd_compat_pd *pd = find_pd(ses);
-
+
if (!pd)
return;
-
+
argv[4] = ipaddr;
argv[5] = peer_ipaddr;
fill_argv(argv, pd, conf_ip_up);
-
+
fill_env(env, env_mem, pd);
if (conf_ip_up) {
@@ -240,7 +240,7 @@ static void ev_ses_started(struct ap_session *ses)
} else
log_error("pppd_compat: fork: %s\n", strerror(errno));
}
-
+
pd->started = 1;
}
@@ -253,10 +253,10 @@ static void ev_ses_finished(struct ap_session *ses)
char ipaddr[17];
char peer_ipaddr[17];
struct pppd_compat_pd *pd = find_pd(ses);
-
+
if (!pd)
return;
-
+
if (!pd->started)
goto skip;
@@ -312,7 +312,7 @@ skip:
if (pd->radattr_saved)
remove_radattr(pd);
#endif
-
+
list_del(&pd->pd.entry);
_free(pd);
}
@@ -339,7 +339,7 @@ static void ev_radius_coa(struct ev_radius_t *ev)
char ipaddr[17];
char peer_ipaddr[17];
struct pppd_compat_pd *pd = find_pd(ev->ses);
-
+
if (!pd)
return;
@@ -373,7 +373,7 @@ static void ev_radius_coa(struct ev_radius_t *ev)
static void remove_radattr(struct pppd_compat_pd *pd)
{
char *fname;
-
+
if (pd->tmp_fname) {
unlink(pd->tmp_fname);
_free(pd->tmp_fname);
@@ -464,7 +464,7 @@ static void write_radattr(struct pppd_compat_pd *pd, struct rad_packet_t *pack)
fclose(f);
} else
log_ppp_warn("pppd_compat: failed to create '%s': %s\n", fname1, strerror(errno));
-
+
if (ses->state == AP_STATE_ACTIVE) {
_free(fname1);
_free(fname2);
@@ -484,7 +484,7 @@ static struct pppd_compat_pd *find_pd(struct ap_session *ses)
return cpd;
}
}
-
+
//log_ppp_warn("pppd_compat: pd not found\n");
return NULL;
}
@@ -516,10 +516,10 @@ static void fill_env(char **env, char *mem, struct pppd_compat_pd *pd)
struct ap_session *ses = pd->ses;
uint64_t tx_bytes, rx_bytes;
int n = 0;
-
+
tx_bytes = (uint64_t)ses->acct_tx_bytes + 4294967296llu*ses->acct_output_gigawords;
rx_bytes = (uint64_t)ses->acct_rx_bytes + 4294967296llu*ses->acct_input_gigawords;
-
+
env[n++] = mem;
mem += sprintf(mem, "PEERNAME=%s", pd->ses->username) + 1;
env[n++] = mem;
@@ -546,7 +546,7 @@ static void fill_env(char **env, char *mem, struct pppd_compat_pd *pd)
inet_ntop(AF_INET6, &a->addr, mem, ENV_MEM); mem = strchr(mem, 0);
mem += sprintf(mem, "/%i", a->prefix_len) + 1;
}
-
+
if (pd->ses->stop_time) {
env[n++] = mem;
mem += sprintf(mem, "CONNECT_TIME=%lu", pd->ses->stop_time - pd->ses->start_time) + 1;
diff --git a/accel-pppd/extra/sigchld.c b/accel-pppd/extra/sigchld.c
index d6b0df5f..cfce2cd2 100644
--- a/accel-pppd/extra/sigchld.c
+++ b/accel-pppd/extra/sigchld.c
@@ -34,7 +34,7 @@ static void* sigchld_thread(void *arg)
sigaddset(&set, SIGCHLD);
sigaddset(&set, SIGQUIT);
- while (1) {
+ while (1) {
pid = waitpid(-1, &status, 0);
if (pid < 0) {
if (errno == EINTR)