代码拉取完成,页面将自动刷新
同步操作将从 OpenHarmony-SIG/third_party_xl2tpd 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
/*
* 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.
*
* Handle a call as a separate thread (header file)
*/
#include <sys/time.h>
#include "misc.h"
#include "common.h"
#include "ipsecmast.h"
#define CALL_CACHE_SIZE 256
struct call
{
/* int rbit; Set the "R" bit on the next packet? */
int lbit; /* Should we send length field? */
/* int throttle; Throttle the connection? */
int seq_reqd; /* Sequencing required? */
int tx_pkts; /* Transmitted packets */
int rx_pkts; /* Received packets */
int tx_bytes; /* transmitted bytes */
int rx_bytes; /* received bytes */
struct schedule_entry *zlb_xmit;
/* Scheduled ZLB transmission */
/* struct schedule_entry *dethrottle; */
/* Scheduled dethrottling (overrun) */
/* int timeout; Has our timeout expired? If so, we'll go ahead
and transmit, full window or not, and set the
R-bit on this packet. */
int prx; /* What was the last packet we sent
as an Nr? Used to manage payload ZLB's */
int state; /* Current state */
int frame; /* Framing being used */
struct call *next; /* Next call, for linking */
int debug;
int msgtype; /* What kind of message are we
working with right now? */
int ourcid; /* Our call number */
int cid; /* Their call number */
int qcid; /* Quitting CID */
int bearer; /* Bearer type of call */
unsigned int serno; /* Call serial number */
unsigned int addr; /* Address reserved for this call */
int txspeed; /* Transmit speed */
int rxspeed; /* Receive speed */
int ppd; /* Packet processing delay (of peer) */
int physchan; /* Physical channel ID */
char dialed[MAXSTRLEN]; /* Number dialed for call */
char dialing[MAXSTRLEN]; /* Original caller ID */
char subaddy[MAXSTRLEN]; /* Sub address */
int needclose; /* Do we need to close this call? */
int closing; /* Are we actually in the process of closing? */
/*
needclose closing state
========= ======= =====
0 0 Running
1 0 Send Closing notice
1 1 Waiting for closing notice
0 1 Closing ZLB received, actulaly close
*/
struct tunnel *container; /* Tunnel we belong to */
int fd; /* File descriptor for pty */
unsigned char rbuf[MAX_RECV_SIZE]; /* pty read buffer */
int rbuf_pos; /* Read buffer position */
int rbuf_max; /* Read buffer data length */
struct buffer *ppp_buf; /* Packet readed from pty */
struct termios *oldptyconf;
int die;
int nego; /* Show negotiation? */
int pppd; /* PID of pppd */
int result; /* Result code */
int error; /* Error code */
int fbit; /* Use sequence numbers? */
int ourfbit; /* Do we want sequence numbers? */
/* int ourrws; Our RWS for the call */
int cnu; /* Do we need to send updated Ns, Nr values? */
int pnu; /* ditto for payload packet */
char errormsg[MAXSTRLEN]; /* Error message */
/* int rws; Receive window size, or -1 for none */
struct timeval lastsent; /* When did we last send something? */
_u16 data_seq_num; /* Sequence for next payload packet */
_u16 data_rec_seq_num; /* Sequence for next received payload packet */
_u16 closeSs; /* What number was in Ns when we started to
close? */
int pLr; /* Last packet received by peer */
struct lns *lns; /* LNS that owns us */
struct lac *lac; /* LAC that owns us */
char dial_no[128]; /* jz: dialing number for outgoing call */
};
extern void push_handler (int);
extern void toss (struct buffer *);
extern struct call *get_call (int tunnel, int call, struct in_addr addr,
int port,
IPsecSAref_t refme, IPsecSAref_t refhim);
extern struct call *get_tunnel (int, unsigned int, int);
extern void destroy_call (struct call *);
extern struct call *new_call (struct tunnel *);
extern void set_error (struct call *, int, const char *, ...);
void *call_thread_init (void *);
void call_close (struct call *);
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。