mirror of
https://code.semirocket.science/wrapsix
synced 2024-11-24 14:39:22 +02:00
Corrected headers of UDP and TCP functions
This commit is contained in:
parent
0f0816953c
commit
32deb4f0ee
@ -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);
|
||||||
|
|
||||||
|
@ -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 */
|
||||||
|
@ -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);
|
||||||
|
|
||||||
|
@ -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 */
|
||||||
|
Loading…
Reference in New Issue
Block a user