diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2019-07-04 19:42:07 +0200 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2019-07-04 19:42:07 +0200 |
commit | d0c9e04d128e1696dcff089978cf823e0316389e (patch) | |
tree | 6e6dbb5a3b3b409edf8be4dc5ca68381891c58c0 | |
parent | 8b264b41e57dc9776279f7a88f9792a15e0f211a (diff) |
handle_extended_options should use proxy_desc_t* instead of a incomplete void* as 1st argument
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
-rw-r--r-- | src/pkt.c | 9 | ||||
-rw-r--r-- | src/pkt.h | 3 |
2 files changed, 6 insertions, 6 deletions
@@ -176,9 +176,9 @@ void handle_packet(char *buf, unsigned bytes, int is_pcap, struct sockaddr_in *a init_state = kProto_data; cur = (proxy_desc_t *) create_and_insert_proxy_desc(pt_pkt->id_no, pkt->identifier, 0, - addr, pt_pkt->dst_ip, - ntohl(pt_pkt->dst_port), - init_state, kProxy_flag); + addr, pt_pkt->dst_ip, + ntohl(pt_pkt->dst_port), + init_state, kProxy_flag); if (!cur) { /* if failed, abort. Logging is done in create_insert_proxy_desc */ pt_log(kLog_error, "Failed to create proxy descriptor!\n"); @@ -432,9 +432,8 @@ void handle_data(icmp_echo_packet_t *pkt, int total_len, forward_desc_t *ring[], } } -void handle_extended_options(void *vcur) +void handle_extended_options(proxy_desc_t *cur) { - proxy_desc_t *cur = (proxy_desc_t *)vcur; if (cur->extended_options[0] > 0) { if (cur->extended_options[0] > cur->window_size) { size_t extend = cur->extended_options[0] - cur->window_size; @@ -133,6 +133,7 @@ typedef struct { typedef struct forward_desc_t forward_desc_t; typedef struct icmp_desc_t icmp_desc_t; +typedef struct proxy_desc_t proxy_desc_t; void handle_packet(char *buf, unsigned bytes, int is_pcap, struct sockaddr_in *addr, int icmp_sock); @@ -140,7 +141,7 @@ void handle_packet(char *buf, unsigned bytes, int is_pcap, struct sockaddr_in *a void handle_data(icmp_echo_packet_t *pkt, int total_len, forward_desc_t **ring, int *await_send, int *insert_idx, uint16_t *next_expected_seq, void *vcur, uint16_t window_size); -void handle_extended_options(void *vcur); +void handle_extended_options(proxy_desc_t *cur); void handle_ack(uint16_t seq_no, icmp_desc_t *ring, int *packets_awaiting_ack, int one_ack_only, int insert_idx, int *first_ack, |