3 Star 1 Fork 3

Gitee 极速下载 / xl2tpd

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/xelerance/xl2tpd
克隆/下载
misc.h 1.74 KB
一键复制 编辑 原始数据 按行查看 历史
/*
* Layer Two Tunnelling Protocol Daemon
* Copyright (C) 1998 Adtran, Inc.
* Copyright (C) 2002 Jeff McAdams
*
* Mark Spencer
*
* This software is distributed under the terms
* of the GPL, which you should have received
* along with this source.
*
* Misc stuff...
*/
#ifndef _MISC_H
#define _MISC_H
#include <syslog.h>
struct tunnel;
struct buffer
{
int type;
void *rstart;
void *rend;
void *start;
size_t len;
size_t maxlen;
#if 0
unsigned int addr;
int port;
#else
struct sockaddr_in peer;
#endif
struct tunnel *tunnel; /* Who owns this packet, if it's a control */
int retries; /* Again, if a control packet, how many retries? */
};
struct ppp_opts
{
char option[MAXSTRLEN];
struct ppp_opts *next;
};
#define IPADDY(a) inet_ntoa(*((struct in_addr *)&(a)))
#define DEBUG c ? c->debug || t->debug : t->debug
#ifdef USE_SWAPS_INSTEAD
#define SWAPS(a) ((((a) & 0xFF) << 8 ) | (((a) >> 8) & 0xFF))
#ifdef htons
#undef htons
#endif
#ifdef ntohs
#undef htons
#endif
#define htons(a) SWAPS(a)
#define ntohs(a) SWAPS(a)
#endif
#define halt() printf("Halted.\n") ; for(;;)
extern char hostname[];
extern void l2tp_log (int level, const char *fmt, ...);
extern struct buffer *new_buf (int);
extern void udppush_handler (int);
extern int addfcs (struct buffer *buf);
extern void swaps (void *, int);
extern void do_packet_dump (struct buffer *);
extern void status (const char *fmt, ...);
extern int getPtyMaster(char *, int);
extern void do_control (void);
extern void recycle_buf (struct buffer *);
extern void safe_copy (char *, char *, int);
extern void opt_destroy (struct ppp_opts *);
extern struct ppp_opts *add_opt (struct ppp_opts *, char *, ...);
extern void process_signal (void);
#endif
C/C++
1
https://gitee.com/mirrors/xl2tpd.git
git@gitee.com:mirrors/xl2tpd.git
mirrors
xl2tpd
xl2tpd
master

搜索帮助