feature: multithreading wip
This commit is contained in:
@ -2,5 +2,6 @@
|
||||
|
||||
#include <netinet/in.h>
|
||||
|
||||
int dns_lookup(char *ip_addr, char *hostname, struct sockaddr_in *addr_con);
|
||||
int dns_lookup(char *ip_addr, const char *hostname,
|
||||
struct sockaddr_in *addr_con);
|
||||
int reverse_dns_lookup(char *ip_addr, char *host);
|
||||
|
@ -1,5 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "scan.h"
|
||||
|
||||
#define NB_OPTIONS 5
|
||||
|
||||
typedef enum {
|
||||
@ -17,4 +21,6 @@ struct option_lst {
|
||||
};
|
||||
|
||||
struct option_lst *parse_options(int ac, char *const *av);
|
||||
char *get_option_arg(struct option_lst *options, e_flag flag);
|
||||
const char *get_option_arg(const struct option_lst *options, e_flag flag);
|
||||
int parse_ports(const char *arg, uint16_t *start, uint16_t *end);
|
||||
e_scantype parse_type(const char *arg);
|
||||
|
@ -11,7 +11,7 @@ typedef enum {
|
||||
SCAN_FIN,
|
||||
SCAN_XMAS,
|
||||
SCAN_UDP,
|
||||
SCAN_TCP,
|
||||
SCAN_ALL,
|
||||
} e_scantype;
|
||||
|
||||
struct scan {
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#include "host.h"
|
||||
#include "parsing.h"
|
||||
#include "response.h"
|
||||
#include "scan.h"
|
||||
|
||||
@ -16,3 +17,5 @@ struct thread {
|
||||
};
|
||||
|
||||
void *routine(void *p_data);
|
||||
int create_threads(const struct option_lst *options, char *ip_addr,
|
||||
struct response *responses);
|
||||
|
Reference in New Issue
Block a user