mirror of https://github.com/M66B/NetGuard.git
Native refactoring
This commit is contained in:
parent
215480e79e
commit
5f79b291e5
|
@ -731,7 +731,7 @@ void handle_tcp(const struct arguments *args, const uint8_t *buffer, uint16_t le
|
||||||
dest, ntohs(tcphdr->dest), datalen);
|
dest, ntohs(tcphdr->dest), datalen);
|
||||||
|
|
||||||
// Open socket
|
// Open socket
|
||||||
syn->socket = open_socket(syn, args);
|
syn->socket = open_tcp(syn, args);
|
||||||
if (syn->socket < 0) {
|
if (syn->socket < 0) {
|
||||||
syn->state = TCP_TIME_WAIT;
|
syn->state = TCP_TIME_WAIT;
|
||||||
// Remote might retry
|
// Remote might retry
|
||||||
|
@ -946,7 +946,7 @@ void handle_tcp(const struct arguments *args, const uint8_t *buffer, uint16_t le
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int open_socket(const struct session *cur, const struct arguments *args) {
|
int open_tcp(const struct session *cur, const struct arguments *args) {
|
||||||
int sock = -1;
|
int sock = -1;
|
||||||
|
|
||||||
// Build target address
|
// Build target address
|
||||||
|
|
|
@ -77,7 +77,7 @@ void handle_ip(const struct arguments *args, const uint8_t *buffer, const uint16
|
||||||
|
|
||||||
void handle_tcp(const struct arguments *args, const uint8_t *buffer, uint16_t length, int uid);
|
void handle_tcp(const struct arguments *args, const uint8_t *buffer, uint16_t length, int uid);
|
||||||
|
|
||||||
int open_socket(const struct session *cur, const struct arguments *args);
|
int open_tcp(const struct session *cur, const struct arguments *args);
|
||||||
|
|
||||||
int get_local_port(const int sock);
|
int get_local_port(const int sock);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue