|
|
@ -391,12 +391,10 @@ void read_debug_socket() { |
|
|
|
} |
|
|
|
|
|
|
|
void write_debug_ack(const struct arguments *args, int epoll_fd, uint32_t seq_num) { |
|
|
|
// TODO: This function is modelled after write_pcap_ret so I made |
|
|
|
// parameters for this function the same since we basically want to do the same thing. |
|
|
|
// Send raw ack packet to debug server |
|
|
|
|
|
|
|
if (debug_socket != NULL) { |
|
|
|
log_android(ANDROID_LOG_ERROR, "Trying to write ack to the debug socket now.."); |
|
|
|
//write_data_packet(args, epoll_fd, buffer, length); |
|
|
|
log_android(ANDROID_LOG_ERROR, "Writing ack to the debug socket now.."); |
|
|
|
|
|
|
|
char* packet; |
|
|
|
int packet_len; |
|
|
@ -408,15 +406,24 @@ void write_debug_ack(const struct arguments *args, int epoll_fd, uint32_t seq_nu |
|
|
|
|
|
|
|
|
|
|
|
void write_debug_socket(const struct arguments *args, int epoll_fd, const uint8_t *buffer, size_t length) { |
|
|
|
// TODO: This function is modelled after write_pcap_ret so I made |
|
|
|
// parameters for this function the same since we basically want to do the same thing. |
|
|
|
// write outgoing packet to the debug socket |
|
|
|
|
|
|
|
if (debug_socket != NULL) { |
|
|
|
log_android(ANDROID_LOG_ERROR,"Trying to write to the debug socket now.."); |
|
|
|
log_android(ANDROID_LOG_ERROR,"Writing to the debug socket now.."); |
|
|
|
write_data_packet(args, epoll_fd, buffer, length); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void handle_debug_packet(const struct arguments *args, int epoll_fd, const uint8_t *buffer, size_t length) { |
|
|
|
// handle incoming debug packet payload as an IP packet |
|
|
|
|
|
|
|
if (debug_socket != NULL) { |
|
|
|
log_android(ANDROID_LOG_ERROR,"Handling some debug packet now.."); |
|
|
|
handle_ip(args, buffer, length, epoll_fd, 10, 200); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|