|
OpenVPN
|
struct used to extract packets encapsulated in streams into a buffer, in this case OpenVPN packets (data or control) embedded in a TCP stream. More...
#include <socket.h>

Data Fields | |
| struct buffer | buf_init |
| struct buffer | residual |
| buffer holding the excess bytes that are not part of the packet. | |
| int | maxlen |
| Maximum length of a packet that we accept. | |
| bool | residual_fully_formed |
| The buffer in buf contains a full packet without a header. | |
| struct buffer | buf |
| Holds the data of the current packet. | |
| int | len |
| -1 if not yet known. | |
| bool | error |
| if true, a fatal TCP error has occurred, requiring that connection be restarted | |
struct used to extract packets encapsulated in streams into a buffer, in this case OpenVPN packets (data or control) embedded in a TCP stream.
This struct is used to packetise the TCP stream into the OpenVPN packet. Each OpenVPN packet has a two-byte header determining the length of the packet.
| struct buffer stream_buf::buf |
Holds the data of the current packet.
This might be a partial packet
Definition at line 124 of file socket.h.
Referenced by stream_buf_added(), stream_buf_get_final(), stream_buf_read_setup_dowork(), and stream_buf_reset().
| struct buffer stream_buf::buf_init |
Definition at line 110 of file socket.h.
Referenced by stream_buf_init(), and stream_buf_reset().
| bool stream_buf::error |
if true, a fatal TCP error has occurred, requiring that connection be restarted
Definition at line 133 of file socket.h.
Referenced by socket_connection_reset(), stream_buf_added(), and stream_buf_init().
| int stream_buf::len |
-1 if not yet known.
Otherwise holds the length of the packet. If >= 0, buf is already moved past the initial size header
Definition at line 129 of file socket.h.
Referenced by stream_buf_added(), and stream_buf_reset().
| int stream_buf::maxlen |
Maximum length of a packet that we accept.
Definition at line 117 of file socket.h.
Referenced by link_socket_write_tcp(), stream_buf_added(), and stream_buf_init().
| struct buffer stream_buf::residual |
buffer holding the excess bytes that are not part of the packet.
Definition at line 114 of file socket.h.
Referenced by phase2_tcp_client(), stream_buf_added(), stream_buf_close(), stream_buf_init(), and stream_buf_read_setup_dowork().
| bool stream_buf::residual_fully_formed |
The buffer in buf contains a full packet without a header.
Any extra data is in residual
Definition at line 121 of file socket.h.
Referenced by link_socket_read_tcp(), sockets_read_residual(), stream_buf_read_setup_dowork(), and stream_buf_reset().