repo.or.cz
/
rofl0r-proxychains-ng.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
core: use string instead of compound literal
[rofl0r-proxychains-ng.git]
/
src
/
ip_type.h
blob
c09400b542dffd9d16628afe962e2a8c4f7593fd
1
#ifndef IP_TYPE_H
2
#define IP_TYPE_H
3
4
#include <stdint.h>
5
6
typedef
union
{
7
unsigned char
octet
[
4
];
8
uint32_t
as_int
;
9
}
ip_type4
;
10
11
typedef
struct
{
12
union
{
13
ip_type4 v4
;
14
unsigned char
v6
[
16
];
15
}
addr
;
16
char
is_v6
;
17
}
ip_type
;
18
19
#define IPT4_INT(X) (ip_type4){.as_int = (X)}
20
#define IPT4_INVALID IPT4_INT(-1)
21
22
#define IPT4_BYTES(A,B,C,D) (ip_type4){.octet = {(A), (B), (C), (D)} }
23
#define IPT4_LOCALHOST IPT4_BYTES(127,0,0,1)
24
25
#endif