aboutsummaryrefslogtreecommitdiff
path: root/pdesc.h
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2017-12-18 14:50:34 +0100
committerToni Uhlig <matzeton@googlemail.com>2017-12-18 14:50:34 +0100
commitb28291e23ea09b55f564acef9e265395e23bd2c1 (patch)
tree61f95c3caed8446397c895d321b33f286d153b02 /pdesc.h
parent6e8b336c950fa0af7d45e0d3933fd3d74e7c246b (diff)
ptunnel-ng:
* source refactoring * moved functions to modules
Diffstat (limited to 'pdesc.h')
-rw-r--r--pdesc.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/pdesc.h b/pdesc.h
index f486062..18751b7 100644
--- a/pdesc.h
+++ b/pdesc.h
@@ -24,7 +24,7 @@
* The same procedure is followed in proxy-to-client communication. Just replace
* proxy with client and vice versa in the list above.
*/
-typedef struct {
+typedef struct forward_desc_t {
/** ping_tunnel_pkt_t seq_no */
int seq_no;
/** length of data */
@@ -40,7 +40,7 @@ typedef struct {
* it will be removed from the send-ring, freeing up space for more outgoing
* ICMP packets.
*/
-typedef struct {
+typedef struct icmp_desc_t {
/** total length of ICMP packet, including ICMP header and ptunnel data. */
int pkt_len;
double last_resend;
@@ -125,6 +125,12 @@ void remove_proxy_desc(proxy_desc_t *cur, proxy_desc_t *prev);
forward_desc_t* create_fwd_desc(uint16_t seq_no, uint32_t data_len, char *data);
+int queue_packet(int icmp_sock, uint8_t type, char *buf, int num_bytes,
+ uint16_t id_no, uint16_t icmp_id, uint16_t *seq, icmp_desc_t ring[],
+ int *insert_idx, int *await_send, uint32_t ip, uint32_t port,
+ uint32_t state, struct sockaddr_in *dest_addr, uint16_t next_expected_seq,
+ int *first_ack, uint16_t *ping_seq);
+
uint32_t send_packets(forward_desc_t *ring[], int *xfer_idx, int *await_send, int *sock);
#endif