mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-27 12:05:15 +00:00
consequently use tabs, and no spaces
and wrap lines at 80 characters Signed-off-by: Ralf Ramsauer <ralf@ramses-pyramidenbau.de>
This commit is contained in:
parent
8d4b43e178
commit
79455c380d
@ -34,7 +34,8 @@ void client_set_selecttimeout(int select_timeout);
|
|||||||
void client_set_lazymode(int lazy_mode);
|
void client_set_lazymode(int lazy_mode);
|
||||||
void client_set_hostname_maxlen(int i);
|
void client_set_hostname_maxlen(int i);
|
||||||
|
|
||||||
int client_handshake(int dns_fd, int raw_mode, int autodetect_frag_size, int fragsize);
|
int client_handshake(int dns_fd, int raw_mode, int autodetect_frag_size,
|
||||||
|
int fragsize);
|
||||||
int client_tunnel(int tun_fd, int dns_fd);
|
int client_tunnel(int tun_fd, int dns_fd);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -68,7 +68,8 @@ extern const unsigned char raw_header[RAW_HDR_LEN];
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define T_PRIVATE 65399
|
#define T_PRIVATE 65399
|
||||||
/* Undefined RR type; "private use" range, see http://www.bind9.net/dns-parameters */
|
/* Undefined RR type; "private use" range, see
|
||||||
|
* http://www.bind9.net/dns-parameters */
|
||||||
#define T_UNSET 65432
|
#define T_UNSET 65432
|
||||||
/* Unused RR type, never actually sent */
|
/* Unused RR type, never actually sent */
|
||||||
|
|
||||||
@ -112,7 +113,8 @@ void check_superuser(void);
|
|||||||
char *format_addr(struct sockaddr_storage *sockaddr, int sockaddr_len);
|
char *format_addr(struct sockaddr_storage *sockaddr, int sockaddr_len);
|
||||||
int get_addr(char *, int, int, int, struct sockaddr_storage *);
|
int get_addr(char *, int, int, int, struct sockaddr_storage *);
|
||||||
int open_dns(struct sockaddr_storage *, size_t);
|
int open_dns(struct sockaddr_storage *, size_t);
|
||||||
int open_dns_opt(struct sockaddr_storage *sockaddr, size_t sockaddr_len, int v6only);
|
int open_dns_opt(struct sockaddr_storage *sockaddr, size_t sockaddr_len,
|
||||||
|
int v6only);
|
||||||
int open_dns_from_host(char *host, int port, int addr_family, int flags);
|
int open_dns_from_host(char *host, int port, int addr_family, int flags);
|
||||||
void close_dns(int);
|
void close_dns(int);
|
||||||
|
|
||||||
|
@ -28,7 +28,8 @@ typedef enum {
|
|||||||
extern int dnsc_use_edns0;
|
extern int dnsc_use_edns0;
|
||||||
|
|
||||||
int dns_encode(char *, size_t, struct query *, qr_t, const char *, size_t);
|
int dns_encode(char *, size_t, struct query *, qr_t, const char *, size_t);
|
||||||
int dns_encode_ns_response(char *buf, size_t buflen, struct query *q, char *topdomain);
|
int dns_encode_ns_response(char *buf, size_t buflen, struct query *q,
|
||||||
|
char *topdomain);
|
||||||
int dns_encode_a_response(char *buf, size_t buflen, struct query *q);
|
int dns_encode_a_response(char *buf, size_t buflen, struct query *q);
|
||||||
unsigned short dns_get_id(char *packet, size_t packetlen);
|
unsigned short dns_get_id(char *packet, size_t packetlen);
|
||||||
int dns_decode(char *, size_t, struct query *, qr_t, char *, size_t);
|
int dns_decode(char *, size_t, struct query *, qr_t, char *, size_t);
|
||||||
|
@ -30,7 +30,10 @@
|
|||||||
spreads across multiple encoded chars -> 16 bytes total.
|
spreads across multiple encoded chars -> 16 bytes total.
|
||||||
Followed by 32 bytes from my /dev/random; should be enough.
|
Followed by 32 bytes from my /dev/random; should be enough.
|
||||||
*/
|
*/
|
||||||
#define DOWNCODECCHECK1 "\000\000\000\000\377\377\377\377\125\125\125\125\252\252\252\252\201\143\310\322\307\174\262\027\137\117\316\311\111\055\122\041\141\251\161\040\045\263\006\163\346\330\104\060\171\120\127\277"
|
#define DOWNCODECCHECK1 \
|
||||||
|
"\000\000\000\000\377\377\377\377\125\125\125\125\252\252\252\252" \
|
||||||
|
"\201\143\310\322\307\174\262\027\137\117\316\311\111\055\122\041" \
|
||||||
|
"\141\251\161\040\045\263\006\163\346\330\104\060\171\120\127\277"
|
||||||
#define DOWNCODECCHECK1_LEN 48
|
#define DOWNCODECCHECK1_LEN 48
|
||||||
|
|
||||||
struct encoder {
|
struct encoder {
|
||||||
@ -45,7 +48,8 @@ struct encoder {
|
|||||||
const int blocksize_encoded;
|
const int blocksize_encoded;
|
||||||
};
|
};
|
||||||
|
|
||||||
int build_hostname(char *, size_t, const char *, const size_t, const char *, const struct encoder *, int);
|
int build_hostname(char *, size_t, const char *, const size_t, const char *,
|
||||||
|
const struct encoder *, int);
|
||||||
int unpack_data(char *, size_t, char *, size_t, const struct encoder *);
|
int unpack_data(char *, size_t, char *, size_t, const struct encoder *);
|
||||||
int inline_dotify(char *, size_t);
|
int inline_dotify(char *, size_t);
|
||||||
int inline_undotify(char *, size_t);
|
int inline_undotify(char *, size_t);
|
||||||
|
@ -73,8 +73,7 @@ typedef struct {
|
|||||||
unsigned arcount :16; /* number of resource entries */
|
unsigned arcount :16; /* number of resource entries */
|
||||||
} HEADER;
|
} HEADER;
|
||||||
|
|
||||||
struct ip
|
struct ip {
|
||||||
{
|
|
||||||
unsigned int ip_hl:4; /* header length */
|
unsigned int ip_hl:4; /* header length */
|
||||||
unsigned int ip_v:4; /* version */
|
unsigned int ip_v:4; /* version */
|
||||||
u_char ip_tos; /* type of service */
|
u_char ip_tos; /* type of service */
|
||||||
|
Loading…
Reference in New Issue
Block a user