1
0
mirror of https://code.semirocket.science/wrapsix synced 2024-11-10 00:01:01 +02:00

Corrected headers of UDP and TCP functions

This commit is contained in:
Michal Zima 2012-04-26 13:11:40 +02:00
parent 0f0816953c
commit 32deb4f0ee
4 changed files with 10 additions and 10 deletions

View File

@ -44,7 +44,7 @@
* @return 0 for success * @return 0 for success
* @return 1 for failure * @return 1 for failure
*/ */
int tcp_ipv4(struct s_ethernet *eth, struct s_ipv4 *ip4, char *payload, int tcp_ipv4(struct s_ethernet *eth4, struct s_ipv4 *ip4, char *payload,
unsigned short payload_size) unsigned short payload_size)
{ {
struct s_tcp *tcp; struct s_tcp *tcp;
@ -141,7 +141,7 @@ int tcp_ipv4(struct s_ethernet *eth, struct s_ipv4 *ip4, char *payload,
* @return 0 for success * @return 0 for success
* @return 1 for failure * @return 1 for failure
*/ */
int tcp_ipv6(struct s_ethernet *eth, struct s_ipv6 *ip6, char *payload) int tcp_ipv6(struct s_ethernet *eth6, struct s_ipv6 *ip6, char *payload)
{ {
struct s_tcp *tcp; struct s_tcp *tcp;
struct s_nat *connection; struct s_nat *connection;
@ -167,7 +167,7 @@ int tcp_ipv6(struct s_ethernet *eth, struct s_ipv6 *ip6, char *payload)
} }
/* find connection in NAT */ /* find connection in NAT */
connection = nat_out(nat6_tcp, nat4_tcp, eth->src, connection = nat_out(nat6_tcp, nat4_tcp, eth6->src,
ip6->ip_src, ip6->ip_dest, ip6->ip_src, ip6->ip_dest,
tcp->port_src, tcp->port_dest); tcp->port_src, tcp->port_dest);

View File

@ -33,8 +33,8 @@ struct s_tcp {
unsigned short urgent_ptr; /* 16 b; ptr to last urgent data byte */ unsigned short urgent_ptr; /* 16 b; ptr to last urgent data byte */
} __attribute__ ((__packed__)); } __attribute__ ((__packed__));
int tcp_ipv4(struct s_ethernet *eth, struct s_ipv4 *ip4, char *payload, int tcp_ipv4(struct s_ethernet *eth4, struct s_ipv4 *ip4, char *payload,
unsigned short payload_size); unsigned short payload_size);
int tcp_ipv6(struct s_ethernet *eth, struct s_ipv6 *ip6, char *payload); int tcp_ipv6(struct s_ethernet *eth6, struct s_ipv6 *ip6, char *payload);
#endif /* TCP_H */ #endif /* TCP_H */

View File

@ -44,7 +44,7 @@
* @return 0 for success * @return 0 for success
* @return 1 for failure * @return 1 for failure
*/ */
int udp_ipv4(struct s_ethernet *eth, struct s_ipv4 *ip4, char *payload, int udp_ipv4(struct s_ethernet *eth4, struct s_ipv4 *ip4, char *payload,
unsigned short payload_size) unsigned short payload_size)
{ {
struct s_udp *udp; struct s_udp *udp;
@ -147,7 +147,7 @@ int udp_ipv4(struct s_ethernet *eth, struct s_ipv4 *ip4, char *payload,
* @return 0 for success * @return 0 for success
* @return 1 for failure * @return 1 for failure
*/ */
int udp_ipv6(struct s_ethernet *eth, struct s_ipv6 *ip6, char *payload) int udp_ipv6(struct s_ethernet *eth6, struct s_ipv6 *ip6, char *payload)
{ {
struct s_udp *udp; struct s_udp *udp;
struct s_nat *connection; struct s_nat *connection;
@ -173,7 +173,7 @@ int udp_ipv6(struct s_ethernet *eth, struct s_ipv6 *ip6, char *payload)
} }
/* find connection in NAT */ /* find connection in NAT */
connection = nat_out(nat6_udp, nat4_udp, eth->src, connection = nat_out(nat6_udp, nat4_udp, eth6->src,
ip6->ip_src, ip6->ip_dest, ip6->ip_src, ip6->ip_dest,
udp->port_src, udp->port_dest); udp->port_src, udp->port_dest);

View File

@ -27,8 +27,8 @@ struct s_udp {
unsigned short checksum; /* 16 b; optional checksum */ unsigned short checksum; /* 16 b; optional checksum */
} __attribute__ ((__packed__)); } __attribute__ ((__packed__));
int udp_ipv4(struct s_ethernet *eth, struct s_ipv4 *ip4, char *payload, int udp_ipv4(struct s_ethernet *eth4, struct s_ipv4 *ip4, char *payload,
unsigned short payload_size); unsigned short payload_size);
int udp_ipv6(struct s_ethernet *eth, struct s_ipv6 *ip6, char *payload); int udp_ipv6(struct s_ethernet *eth6, struct s_ipv6 *ip6, char *payload);
#endif /* UDP_H */ #endif /* UDP_H */