1 /* pptp_gre.h -- encapsulate PPP in PPTP-GRE.
2 * Handle the IP Protocol 47 portion of PPTP.
3 * C. Scott Ananian <cananian@alumni.princeton.edu>
5 * $Id: pptp_gre.h,v 1.5 2004/06/09 00:13:32 quozl Exp $
8 int pptp_gre_bind(struct in_addr inetaddr
);
9 void pptp_gre_copy(u_int16_t call_id
, u_int16_t peer_call_id
,
10 int pty_fd
, int gre_fd
);
13 extern int disable_buffer
;
15 typedef struct pack_track
{
16 uint32_t seq
; // seq no of this tracked packet
17 uint64_t time
; // time when this tracked packet was sent (in usecs)
20 typedef struct gre_stats
{
21 /* statistics for GRE receive */
23 uint32_t rx_accepted
; // data packet was passed to pppd
24 uint32_t rx_lost
; // data packet did not arrive before timeout
25 uint32_t rx_underwin
; // data packet was under window (arrived too late
26 // or duplicate packet)
27 uint32_t rx_overwin
; // data packet was over window
28 // (too many packets lost?)
29 uint32_t rx_buffered
; // data packet arrived earlier than expected,
30 // packet(s) before it were lost or reordered
31 uint32_t rx_errors
; // OS error on receive
32 uint32_t rx_truncated
; // truncated packet
33 uint32_t rx_invalid
; // wrong protocol or invalid flags
34 uint32_t rx_acks
; // acknowledgement only
36 /* statistics for GRE transmit */
38 uint32_t tx_sent
; // data packet write() to GRE socket succeeded
39 uint32_t tx_failed
; // data packet write() to GRE socket returned error
40 uint32_t tx_short
; // data packet write() to GRE socket underflowed
41 uint32_t tx_acks
; // sent packet with just ACK
42 uint32_t tx_oversize
; // data packet dropped because it was too large
44 /* statistics for packet tracking, for RTT calculation */
46 pack_track_t pt
; // last data packet seq/time
47 int rtt
; // estimated round-trip time in us
51 extern gre_stats_t stats
;