1 /*
2  * Copyright (C) 2022 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef FILLP_H
17 #define FILLP_H
18 
19 #include "fillpinc.h"
20 #include "fillp_os.h"
21 #include "hlist.h"
22 #include "lf_ring.h"
23 #include "queue.h"
24 #include "log.h"
25 #include "opt.h"
26 #include "skiplist.h"
27 #include "fillp_pcb.h"
28 #include "fillp_cookie.h"
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 #define FILLP_PROTOCOL_VERSION_NUMBER 0
35 #define FILLP_INITIAL_COOKIE_LIFETIME (10 * 1000 * 1000)
36 #define NACK_HISTORY_BY_TIME_INDEX 0
37 
38 #define FILLP_LM_TRACE_SEND_MSG(traceFlag, traceObjType, traceHandle, len, sock, traceDesc, traceMsg) do { \
39     if ((g_traceInfo.fillpTraceSend != FILLP_NULL_PTR) \
40         && ((traceFlag) >= (traceObjType))) { \
41         (traceDesc).traceDirection = FILLP_TRACE_DIRECT_SEND; \
42         (*g_traceInfo.fillpTraceSend) (traceObjType, traceHandle, len, (FILLP_UINT32)(sock), \
43             (FILLP_UINT8 *)(void *)&(traceDesc), traceMsg); \
44     } \
45 } while (0)
46 
47 /* Message indication */
48 #define FILLP_LM_FILLPMSGTRACE_OUTPUT(traceFlag, traceObjType, traceHandle, len, sock, pTracedesc, traceMsg) do { \
49     if ((g_traceInfo.fillpTraceSend != FILLP_NULL_PTR) \
50         && ((traceFlag) >= (traceObjType))) { \
51         (*g_traceInfo.fillpTraceSend) (traceObjType, traceHandle, len, (FILLP_UINT32)(sock), \
52             pTracedesc, traceMsg); \
53     } \
54 } while (0)
55 
56 #define FILLP_LM_FILLPMSGTRACE_OUTPUT_WITHOUT_FT_TRACE_ENABLE_FLAG(traceObjType, traceHandle, len, sock, \
57     traceDesc, traceMsg) do { \
58     if (g_traceInfo.fillpTraceSend != FILLP_NULL_PTR) { \
59         (traceDesc).traceDirection = FILLP_TRACE_DIRECT_RECV; \
60         (*g_traceInfo.fillpTraceSend) (traceObjType, traceHandle, len, (FILLP_UINT32)(sock), \
61             (FILLP_UINT8 *)(void *)&(traceDesc), traceMsg); \
62     } \
63 } while (0)
64 
65 #define FILLP_ITEM_RESEND_TRIGGER_NACK 0X01 /* item resend triggered by nack */
66 #define FILLP_ITEM_RESEND_TRIGGER_PACK 0X02 /* item resend triggered by pack */
67 #define FILLP_ITEM_RESEND_TRIGGER_TP 0X03 /* item resend triggered by tail protect */
68 #define FILLP_ITEM_RESEND_TRIGGER_HNACK 0X04 /* item resend triggered by history nack */
69 
70 /* these flags is also used in the bitMap of the data option */
71 #define FILLP_ITEM_FLAGS_FRAME_OPT_BITMAP_MASK 0xFFu
72 #define FILLP_ITEM_FLAGS_FRAME_FIRST_FRAG_START 0x00000001u /* mark the item is the 1st pkt
73                                                                of the 1st fragment of the frame */
74 #define FILLP_ITEM_FLAGS_FRAME_LAST_FRAG_START 0x00000002u /* mark the item is the 1st pkt
75                                                               of the last fragment of the frame */
76 
77 #define FILLP_ITEM_FLAGS_APP_LIMITED 0x00000100
78 #define FILLP_ITEM_FLAGS_FIRST_PKT 0x00000200
79 #define FILLP_ITEM_FLAGS_LAST_PKT 0x00000400
80 #define FILLP_ITEM_FLAGS_APP_LARGE_DATA 0x00000800
81 #define FILLP_ITEM_FLAGS_REDUNDANT 0x00001000
82 
83 #define FILLP_ITEM_FLAGS_FIRST_PKT_FOR_CAL_COST (FILLP_ITEM_FLAGS_APP_LARGE_DATA | FILLP_ITEM_FLAGS_FIRST_PKT)
84 #define FILLP_ITEM_FLAGS_LAST_PKT_FOR_CAL_COST (FILLP_ITEM_FLAGS_APP_LARGE_DATA | FILLP_ITEM_FLAGS_LAST_PKT)
85 
86 struct FillpPcbItem {
87     struct NetBuf buf; /* Data -- This has to be the first node in the structure. */
88     struct HlistNode node;
89     struct HlistNode unsendNode;
90     struct HlistNode pktSeqMapNode;
91     struct SkipListNode skipListNode;
92     void *netconn;
93     void *fpcb;
94     FILLP_UINT32 seqNum;
95     FILLP_UINT32 pktNum;
96     FILLP_UINT16 dataLen;    /* Data Len */
97     FILLP_UINT16 dataOptLen; /* Data option Len */
98     FILLP_UINT32 dataOptFlag;
99     FILLP_UINT8 sendCount;
100     FILLP_UINT8 resendTrigger;
101     FILLP_UINT32 flags;
102     FILLP_UINT32 infCount; /* send success and flight in cap count */
103     FILLP_LLONG firstSendTimestamp;
104     FILLP_LLONG lastSendTimestamp;
105     FILLP_LLONG appSendTimestamp;
106     FILLP_UINT32 appSendSize;
107 
108     FILLP_LLONG rxTimeStamp;
109     struct FillpFrameItem *frame;
110 };
111 
FillpPcbEntry(struct HlistNode * node)112 static __inline struct FillpPcbItem *FillpPcbEntry(struct HlistNode *node)
113 {
114     return (struct FillpPcbItem *)((char *)(node) - (uintptr_t)(&(((struct FillpPcbItem *)0)->node)));
115 }
116 
FillpPcbPktSeqMapNodeEntry(struct HlistNode * node)117 static __inline struct FillpPcbItem *FillpPcbPktSeqMapNodeEntry(struct HlistNode *node)
118 {
119     return (struct FillpPcbItem *)((char *)(node) - (uintptr_t)(&(((struct FillpPcbItem *)0)->pktSeqMapNode)));
120 }
121 
FillpPcbUnsendNodeEntry(struct HlistNode * node)122 static __inline struct FillpPcbItem *FillpPcbUnsendNodeEntry(struct HlistNode *node)
123 {
124     return (struct FillpPcbItem *)((char *)(node) - (uintptr_t)(&(((struct FillpPcbItem *)0)->unsendNode)));
125 }
126 
FillpPcbNetbufNodeEntry(char * p)127 static __inline struct NetBuf *FillpPcbNetbufNodeEntry(char *p)
128 {
129     return (struct NetBuf *)((char *)(p) - (uintptr_t)(&(((struct NetBuf *)0)->p)));
130 }
131 
132 /* Below structures are exchanged over network, so there should be no padding, so use pack 1 */
133 #pragma pack(1)
134 
135 /* To support extension of header is future.
136     1. Each message has parameter optLen which indicates if opt parameter present or not.
137     2. Whenever extension are added then special care need to be taken care such that total packet
138        doesn't spilt in 2 MSS. Current design do not support.
139     3. Data pkt type can't carry any new extension, should use existing MSG or define new MSG type.
140     4. All existing message can be extended at end not in between of current header values.
141     5. some capabilities which both node to agree up on, should use CONN_REQ, CONN_REQ_ACK and CONN_CONFIRM
142        message to exchange.
143     6. extension header should be of format: tag, length, value.  Size of extension can be found in first byte
144        after each message type.
145 */
146 struct FillpPktHead {
147     FILLP_UINT16 flag; /* from MSB [0-3]Version [4-7] Pkt type [8]Ext Flag [9-15] Not used */
148     FILLP_UINT16 dataLen;
149     FILLP_UINT32 pktNum;
150     FILLP_UINT32 seqNum;
151 };
152 
153 /*
154  * define fillp pack options
155  */
156 #define FILLP_PACK_OPT_HLEN 3
157 #define FILLP_PACK_OPT_HRBB 0x01
158 
159 typedef struct InnerfillpPackOption {
160     FILLP_UINT8 type;
161     FILLP_UINT16 len;
162     FILLP_UINT8 value[1];
163 } FillpPackOption;
164 
165 typedef struct {
166     FILLP_UINT16 seq;
167     FILLP_UINT16 totalMean;
168     FILLP_UINT32 jitter;
169     FILLP_UINT16 rsv;
170     FILLP_UINT16 windowMean;
171     FILLP_UINT32 windowVar;
172 } FillpPackOptionPktIvarData;
173 
174 #define FILLP_PACK_FLAG_WITH_RTT 0x0001
175 #define FILLP_PACK_FLAG_REQURE_RTT 0x0002
176 #define FILLP_PACK_FLAG_WITH_RATE_LIMIT 0x0004
177 #define FILLP_PACK_FLAG_NO_DATA_SEND 0x0008
178 #define FILLP_PACK_FLAG_ADHOC 0x0010
179 #define FILLP_PACK_FLAG_PKT_NUM_SEG 0x0020
180 #define FILLP_PACK_FLAG_OPTS 0x0040
181 #define FILLP_PACK_FLAG_RCV_LIST_BYTES 0x0080
182 #define FILLP_PACK_FLAG_OWD 0x0100
183 #define FILLP_PACK_FLAG_CAL_COST 0x0200U
184 #define FILLP_PACK_FLAG_POWER_SAVE 0x0400
185 
186 #define FILLP_PACK_MIN_LEN 32
187 #define FILLP_PACK_NUM_SEG_LEN 40
188 #define FILLP_PACK_OPTS_OFFSET_LEN 42
189 #define FILLP_PACK_RCV_LIST_BYTES_LEN 46
190 #define FILLP_PACK_OWD_LEN 58
191 
192 struct FillpPktPack {
193     char head[FILLP_HLEN];
194     FILLP_UINT16 flag;
195     FILLP_UINT16 pktLoss;
196     FILLP_UINT32 rate;
197     FILLP_UINT32 oppositeSetRate;
198     /* recv 0~999,2000~2999, lost 1000~1999, fillp_dataHead->seqNum = 999, lostSeq = 1999.
199        if no packet lost, lostSeq and seqNum will be same */
200     FILLP_UINT32 lostSeq;
201     union {
202         FILLP_UINT32 rtt;
203         FILLP_UINT32 timestamp;
204     } reserved;
205     FILLP_UINT32 bgnPktNum;     /* use in appLimited */
206     FILLP_UINT32 endPktNum;     /* use in appLimited */
207     FILLP_UINT16 optsOffset;    /* options start address relative to the first byte of pack packet */
208     FILLP_UINT32 rcvListBytes;  /* data size in recvList */
209     FILLP_UINT32 owdPktSendTs;  /* low 32bit send timestamp of the packet which has min owd, calculate minRtt */
210     FILLP_UINT32 owdPackDelay;  /* the delta time between min owd packet received and next PACK send */
211     FILLP_UINT32 queueingDelay; /* report current "queueing delay", queueingDelay: current_owd - minOwd */
212 };
213 
214 struct FillpPktConnReq {
215     char head[FILLP_HLEN];
216     FILLP_UINT32 cookiePreserveTime; /* for align to 8 bytes */
217     FILLP_UINT32 sendCache;          /* client send to server cache , same as server recv cache */
218     FILLP_UINT32 recvCache;          /* client recv from server cache, same as server send cache */
219 
220     FILLP_ULLONG timestamp; /* Time stamp used for rtt Detective */
221 };
222 
223 struct FillpPktFin {
224     char head[FILLP_HLEN];
225     FILLP_UINT16 flag;
226 };
227 
228 struct FillpPktNack {
229     char head[FILLP_HLEN];
230     FILLP_UINT32 lastPktNum;
231 };
232 
233 
234 struct FillpPktNackWithRandnum {
235     struct FillpPktNack nack;
236     FILLP_ULLONG randomNum;
237 };
238 
239 struct FillpSeqPktNum {
240     FILLP_UINT32 beginPktNum;
241     FILLP_UINT32 beginSeqNum;
242     FILLP_UINT32 endPktNum;
243 };
244 
245 /* define flow control algorithm */
246 #define FILLP_SUPPORT_ALG_BASE 0X00u
247 #define FILLP_SUPPORT_ALG_N(_n)   (0X01u << ((_n)-1))
248 #define FILLP_SUPPORT_ALG_1   0X01
249 #define FILLP_SUPPORT_ALG_2   0X02
250 #define FILLP_SUPPORT_ALG_3    0X04
251 #define FILLP_SUPPORT_ALG_MSG    0X08
252 #define FILLP_SUPPORT_ALG_HIGHEST_INDEX 3
253 #define FILLP_SUPPORT_ALG_HIGHEST FILLP_SUPPORT_ALG_N(FILLP_SUPPORT_ALG_HIGHEST_INDEX)
254 #define FILLP_SUPPORT_ALGS FILLP_SUPPORT_ALG_3
255 
256 struct FillpPktConnReqAck {
257     char head[FILLP_HLEN];
258     FILLP_UINT16 tagCookie;     /* for align to 8 bytes */
259     FILLP_UINT16 cookieLength;   /* client send to server cache , same as server recv cache */
260 
261     FillpCookieContent cookieContent;
262     FILLP_ULLONG timestamp;    /* The same as conn_req->timestamp */
263 };
264 
265 struct FillpConnReqAckClient {
266     FILLP_CHAR *cookieContent;
267     FILLP_ULLONG timestamp;    /* The same as conn_req->timestamp */
268     FILLP_UINT16 tagCookie;    /* for align to 8 bytes */
269     FILLP_UINT16 cookieLength; /* client send to server cache , same as server recv cache */
270     FILLP_UINT16 fcAlgs;
271     FILLP_UINT32 peerCharacters;
272 };
273 
274 /* each ext para need value(1 bit) and length(1 bit), so totally need 2 bits */
275 #define FILLP_ONE_EXT_PARA_LENGTH 2
276 
277 enum FillpPacketExt {
278     FILLP_PKT_EXT_START,
279     FILLP_PKT_EXT_CONNECT_CONFIRM_CARRY_RTT = 1,
280     FILLP_PKT_EXT_CONNECT_CONFIRM_CARRY_PKT_SIZE,
281     FILLP_PKT_EXT_CONNECT_CARRY_CHARACTER,
282     FILLP_PKT_EXT_CONNECT_CARRY_FC_ALG,
283     FILLP_PKT_EXT_BUTT = 0xff
284 };
285 
286 struct FillpPktConnConfirm {
287     char head[FILLP_HLEN];
288     FILLP_UINT16 tagCookie;    /* for align to 8 bytes */
289     FILLP_UINT16 cookieLength; /* client send to server cache , same as server recv cache */
290     FillpCookieContent cookieContent;
291     struct sockaddr_in6 remoteAddr; /* 28bytes */ /* Not used, kept because of backward compatibility */
292 };
293 
294 struct FillpPktConnConfirmAck {
295     char head[FILLP_HLEN];
296     FILLP_UINT32 sendCache;
297     FILLP_UINT32 recvCache;
298     FILLP_UINT32 pktSize;           /* mtu , from server */
299     struct sockaddr_in6 remoteAddr; /* 28bytes */
300 };
301 
302 typedef struct InnerfillpDataOption {
303     FILLP_UINT8 type;
304     FILLP_UINT8 len;
305     FILLP_UINT8 value[1];
306 } FillpDataOption;
307 
308 #pragma pack()
309 
310 #define FILLP_PKT_TYPE_DATA 0x1
311 #define FILLP_PKT_TYPE_NACK 0x3
312 #define FILLP_PKT_TYPE_PACK 0x5
313 #define FILLP_PKT_TYPE_CONN_REQ 0X2
314 #define FILLP_PKT_TYPE_FIN 0x6
315 #define FILLP_PKT_TYPE_CONN_REQ_ACK 0XA
316 #define FILLP_PKT_TYPE_CONN_CONFIRM 0XB
317 #define FILLP_PKT_TYPE_CONN_CONFIRM_ACK 0XC
318 #define FILLP_PKT_TYPE_HISTORY_NACK 0xD
319 
320 /*
321  * define fillp data option
322  */
323 #define FILLP_DATA_OFFSET_LEN 2
324 #define FILLP_DATA_OPT_HLEN 2
325 
326 /*
327  * define fillp data options
328  */
329 #define FILLP_OPT_TIMESTAMP 0x01
330 #define FILLP_OPT_FRAME_INFO 0x02
331 
332 #define FILLP_OPT_FLAG_TIMESTAMP 0x0001
333 #define FILLP_OPT_FLAG_FRAME_INFO 0x0002
334 
335 #define FILLP_OPT_TIMESTAMP_LEN 8
336 #define FILLP_OPT_FRAME_INFO_LEN sizeof(struct FillpFrameDataOption)
337 
338 #define FILLP_COOKIE_TAG 0X1
339 
340 typedef enum InnerfillpClientfourhandshakestateEnum {
341     FILLP_CLIENT_FOUR_HANDSHAKE_STATE_INITIAL = 0,
342     FILLP_CLIENT_FOUR_HANDSHAKE_STATE_REQSENT = 1,
343     FILLP_CLIENT_FOUR_HANDSHAKE_STATE_REQACK_RCVED = 2,
344     FILLP_CLIENT_FOUR_HANDSHAKE_STATE_CONFIRM_SENT = 3,
345     FILLP_CLIENT_FOUR_HANDSHAKE_STATE_CONFIRMACK_RCVED = 4,
346     FILLP_CLIENT_FOUR_HANDSHAKE_STATE_BUTT
347 } FillpClientfourhandshakestateEnum;
348 
349 #define FILLP_HEADER_SET_PKT_TYPE(flag, type) ((flag) |= ((FILLP_UINT16)((type)&0x0f) << 8))
350 #define FILLP_PKT_GET_TYPE(flag) (((flag)&0x0f00) >> 8)
351 #define FILLP_PKT_GET_FLAG(flag) ((flag) & 0x00ff)
352 
353 #define FILLP_HEADER_SET_PROTOCOL_VERSION(flag, ver) ((flag) |= ((FILLP_UINT16)((ver)&0x0f) << 12))
354 #define FILLP_PKT_GET_PROTCOL_VERSION(flag) (((flag)&0xf000) >> 12)
355 
356 /*
357  * PKT_DATA with option or not flag, 1 bit
358  */
359 #define FILLP_HEADER_SET_DAT_WITH_OPTION(flag) ((flag) |= 0x80) // 0x80 -> 0000 0000 1000 0000
360 #define FILLP_PKT_GET_DAT_WITH_OPTION(flag) ((flag)&0x80)       // 0x80 -> 0000 0000 1000 0000
361 
362 /*
363  * PKT_DATA with flag indicating the last pkt, 1 bit
364  */
365 #define FILLP_HEADER_SET_DAT_WITH_LAST_FLAG(flag) ((flag) |= 0x40) // 0x40 -> 0000 0000 0100 0000
366 #define FILLP_PKT_GET_DAT_WITH_LAST_FLAG(flag) ((flag)&0x40)
367 
368 /*
369 * PKT_DATA with flag indicating the first pkt, 1 bit
370 */
371 #define FILLP_HEADER_SET_DAT_WITH_FIRST_FLAG(flag) ((flag) |= 0x20) // 0x40 -> 0000 0000 0010 0000
372 #define FILLP_PKT_GET_DAT_WITH_FIRST_FLAG(flag) ((flag) & 0x20)
373 
374 #define FILLP_PKT_DISCONN_MSG_FLAG_WR 0x0001  /* Not send anymore data */
375 #define FILLP_PKT_DISCONN_MSG_FLAG_RD 0x0002  /* Won't read anymore data */
376 #define FILLP_PKT_DISCONN_MSG_FLAG_ACK 0x0004 /* It is an ACK for disconnect message */
377 #define FILLP_PKT_DISCONN_MSG_FLAG_VER 0x0008 /* version imcompatible */
378 
379 #define FILLP_PKT_DISCONN_MSG_FLAG_SET_WR(_flag) ((_flag) |= FILLP_PKT_DISCONN_MSG_FLAG_WR)
380 #define FILLP_PKT_DISCONN_MSG_FLAG_SET_RD(_flag) ((_flag) |= FILLP_PKT_DISCONN_MSG_FLAG_RD)
381 #define FILLP_PKT_DISCONN_MSG_FLAG_SET_ACK(_flag) ((_flag) |= FILLP_PKT_DISCONN_MSG_FLAG_ACK)
382 #define FILLP_PKT_DISCONN_MSG_FLAG_SET_VER(_flag) ((_flag) |= FILLP_PKT_DISCONN_MSG_FLAG_VER)
383 
384 #define FILLP_PKT_DISCONN_MSG_FLAG_IS_WR(_flag) ((_flag)&FILLP_PKT_DISCONN_MSG_FLAG_WR)
385 #define FILLP_PKT_DISCONN_MSG_FLAG_IS_RD(_flag) ((_flag)&FILLP_PKT_DISCONN_MSG_FLAG_RD)
386 #define FILLP_PKT_DISCONN_MSG_FLAG_IS_ACK(_flag) ((_flag)&FILLP_PKT_DISCONN_MSG_FLAG_ACK)
387 #define FILLP_PKT_DISCONN_MSG_FLAG_IS_VER(_flag) ((_flag) & FILLP_PKT_DISCONN_MSG_FLAG_VER)
388 
389 #define IGNORE_OVERFLOW __attribute__((no_sanitize("unsigned-integer-overflow")))
FillpNumIsbigger(FILLP_UINT32 value1,FILLP_UINT32 value2)390 IGNORE_OVERFLOW static __inline FILLP_INT FillpNumIsbigger(FILLP_UINT32 value1, FILLP_UINT32 value2)
391 {
392     return ((FILLP_INT32)(value1 - value2)) > 0;
393 }
394 
395 void FillpSendConnConfirmAck(struct FillpPcb *pcb);
396 FILLP_INT FillpSendConnReq(struct FillpPcb *pcb);
397 void FillpSendFin(struct FillpPcb *pcb);
398 void FillpSendFinAck(struct FillpPcb *pcb, struct sockaddr *remoteAddr);
399 void FillpSendRst(struct FillpPcb *pcb, struct sockaddr *remoteAddr);
400 void FillpSendRstWithVersionImcompatible(struct FillpPcb *pcb, struct sockaddr *remoteAddr);
401 
402 void FillpGenerateCookie(IN FILLP_CONST struct FillpPcb *pcb, IN struct FillpPktConnReq *req,
403     IN FILLP_CONST struct sockaddr_in6 *remoteAddr, IN FILLP_UINT16 serverPort, OUT FillpCookieContent *stateCookie);
404 
405 FILLP_INT FillpValidateCookie(IN FILLP_CONST struct FillpPcb *pcb, IN FILLP_UINT16 serverPort,
406     IN FILLP_CONST struct sockaddr_in6 *clientAddr, IN FILLP_CONST FillpCookieContent *stateCookie);
407 
408 void FillpSendConnReqAck(struct FillpPcb *pcb, FILLP_CONST FillpCookieContent *stateCookie, FILLP_ULLONG timestamp);
409 
410 void FillpSendConnConfirm(struct FillpPcb *pcb, FILLP_CONST struct FillpConnReqAckClient *reqAck);
411 
412 void FillpPackTimerCb(void *argPcb);
413 void FillpFcTimerCb(void *argPcb);
414 void FillpSendTimerCb(void *argPcb);
415 
416 void FillpEnableSendTimer(struct FillpPcb *pcb);
417 void FillpDisableSendTimer(struct FillpPcb *pcb);
418 void FillpEnablePackTimer(struct FillpPcb *pcb);
419 void FillpDisablePackTimer(struct FillpPcb *pcb);
420 void FillpEnableFcTimer(struct FillpPcb *pcb);
421 void FillpDisableFcTimer(struct FillpPcb *pcb);
422 void FillpEnableKeepAliveTimer(struct FillpPcb *pcb);
423 void FillpDisableKeepAliveTimer(struct FillpPcb *pcb);
424 void FillpEnableDelayNackTimer(struct FillpPcb *pcb);
425 void FillpDisableDelayNackTimer(struct FillpPcb *pcb);
426 void FillpEnableDataBurstTimer(struct FillpPcb *pcb);
427 void FillpDisableDataBurstTimer(struct FillpPcb *pcb);
428 void FillpEnableConnRetryCheckTimer(struct FillpPcb *pcb);
429 void FillpDisableConnRetryCheckTimer(struct FillpPcb *pcb);
430 void FillpEnableFinCheckTimer(struct FillpPcb *pcb);
431 void FillpDisableFinCheckTimer(struct FillpPcb *pcb);
432 
433 void FillpConnReqInput(struct FillpPcb *pcb, FILLP_CONST struct NetBuf *p);
434 void FillpConnReqAckInput(struct FillpPcb *pcb, FILLP_CONST struct NetBuf *p);
435 void FillpConnConnectionEstFailure(struct FillpPcb *pcb, FILLP_CONST struct NetBuf *p);
436 void FillpConnConfirmAckInput(struct FillpPcb *pcb, FILLP_CONST struct NetBuf *p);
437 
438 void FillpFinInput(struct FillpPcb *pcb, FILLP_CONST struct NetBuf *p, FILLP_BOOL *pcbFreed);
439 
440 struct FtNetconn;
441 
442 FILLP_INT32 FillpDecodeExtPara(FILLP_CONST FILLP_UCHAR *buf, FILLP_INT bufLen, struct FtNetconn *conn);
443 
444 #ifdef __cplusplus
445 }
446 #endif
447 
448 #endif /* FILLP_H */
449