-unsigned long long send_count , recv_count ;
-unsigned long long spkt , rpkt ;
-unsigned int dropped;
-unsigned long sbytes , rbytes ;
+long long send_count, recv_count;
+long long spkt, rpkt ;
+int dropped;
+long sbytes, rbytes ;
u32 avp_get_32(control_message *c, int id);
u16 avp_get_16(control_message *c, int id);
char *avp_get_s(control_message *c, int id);
u32 avp_get_32(control_message *c, int id);
u16 avp_get_16(control_message *c, int id);
char *avp_get_s(control_message *c, int id);
void skip_zlb();
void cm_free(control_message *m);
controlt *ppp_new(u16 session, int protocol);
void skip_zlb();
void cm_free(control_message *m);
controlt *ppp_new(u16 session, int protocol);
int numsessions = NUM_SESSIONS;
int packet_length = PACKET_LENGTH;
int target_pps = TARGET_PPS;
int numsessions = NUM_SESSIONS;
int packet_length = PACKET_LENGTH;
int target_pps = TARGET_PPS;
ss = (sharedt*) mmap(NULL, sizeof(*ss), PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, 0, 0);
ss = (sharedt*) mmap(NULL, sizeof(*ss), PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, 0, 0);
gatewayaddr.sin_family = AF_INET;
gatewayaddr.sin_port = htons(1701);
inet_aton(gwaddr, &gatewayaddr.sin_addr);
gatewayaddr.sin_family = AF_INET;
gatewayaddr.sin_port = htons(1701);
inet_aton(gwaddr, &gatewayaddr.sin_addr);
l = recvfrom(udpfd, packet, 4096, 0, (void *) &addr, &alen);
if (l < 0)
l = recvfrom(udpfd, packet, 4096, 0, (void *) &addr, &alen);
if (l < 0)
*(u16 *)(c->buf + 4) = htons(ss->sessions[i].remote_session); // Session ID
iph->saddr = ss->sessions[i].addr;
iph->check = 0;
*(u16 *)(c->buf + 4) = htons(ss->sessions[i].remote_session); // Session ID
iph->saddr = ss->sessions[i].addr;
iph->check = 0;
{
static unsigned long long last_rpkts[AVG_SIZE], last_spkts[AVG_SIZE];
static int last = 0, avg_count = 0;
{
static unsigned long long last_rpkts[AVG_SIZE], last_spkts[AVG_SIZE];
static int last = 0, avg_count = 0;
float loss;
last_rpkts[last] = ss->rpkt;
last_spkts[last] = ss->spkt;
last = (last + 1) % AVG_SIZE;
float loss;
last_rpkts[last] = ss->rpkt;
last_spkts[last] = ss->spkt;
last = (last + 1) % AVG_SIZE;
char buf[1024];
int l;
l = recvfrom(udpfd, buf, 1024, MSG_PEEK, (void *) &addr, &alen);
char buf[1024];
int l;
l = recvfrom(udpfd, buf, 1024, MSG_PEEK, (void *) &addr, &alen);