mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-22 16:19:20 +02:00
Formatting: Use tabs for indents
This commit is contained in:
parent
9faaa44787
commit
4b3d6e2962
|
@ -71,7 +71,7 @@ static inline void help(FILE * stream, bool verbose) __attribute__((noreturn));
|
||||||
static void help(FILE *stream, bool verbose)
|
static void help(FILE *stream, bool verbose)
|
||||||
{
|
{
|
||||||
fprintf(stream, "iodine IP over DNS tunneling client\n\n"
|
fprintf(stream, "iodine IP over DNS tunneling client\n\n"
|
||||||
"Usage: %s [-46fhrv] [-u user] [-t chrootdir] [-d device] [-P password]\n"
|
"Usage: %s [-46fhrv] [-u user] [-t chrootdir] [-d device] [-P password]\n"
|
||||||
" [-m maxfragsize] [-M maxlen] [-T type] [-O enc] [-L 0|1] [-I sec]\n"
|
" [-m maxfragsize] [-M maxlen] [-T type] [-O enc] [-L 0|1] [-I sec]\n"
|
||||||
" [-z context] [-F pidfile] [nameserver] topdomain\n", __progname);
|
" [-z context] [-F pidfile] [nameserver] topdomain\n", __progname);
|
||||||
|
|
||||||
|
|
|
@ -2593,15 +2593,15 @@ main(int argc, char **argv)
|
||||||
if (addrfamily == AF_UNSPEC || addrfamily == AF_INET) {
|
if (addrfamily == AF_UNSPEC || addrfamily == AF_INET) {
|
||||||
dns4addr_len = get_addr(listen_ip4, port, AF_INET, AI_PASSIVE | AI_NUMERICHOST, &dns4addr);
|
dns4addr_len = get_addr(listen_ip4, port, AF_INET, AI_PASSIVE | AI_NUMERICHOST, &dns4addr);
|
||||||
if (dns4addr_len < 0) {
|
if (dns4addr_len < 0) {
|
||||||
warnx("Bad IPv4 address to listen on.");
|
warnx("Bad IPv4 address to listen on.");
|
||||||
usage();
|
usage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (addrfamily == AF_UNSPEC || addrfamily == AF_INET6) {
|
if (addrfamily == AF_UNSPEC || addrfamily == AF_INET6) {
|
||||||
dns6addr_len = get_addr(listen_ip6, port, AF_INET6, AI_PASSIVE | AI_NUMERICHOST, &dns6addr);
|
dns6addr_len = get_addr(listen_ip6, port, AF_INET6, AI_PASSIVE | AI_NUMERICHOST, &dns6addr);
|
||||||
if (dns6addr_len < 0) {
|
if (dns6addr_len < 0) {
|
||||||
warnx("Bad IPv6 address to listen on.");
|
warnx("Bad IPv6 address to listen on.");
|
||||||
usage();
|
usage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
44
src/md5.c
44
src/md5.c
|
@ -157,18 +157,18 @@ md5_process(md5_state_t *pms, const md5_byte_t *data /*[64]*/)
|
||||||
#endif
|
#endif
|
||||||
#if BYTE_ORDER <= 0 /* little-endian */
|
#if BYTE_ORDER <= 0 /* little-endian */
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* On little-endian machines, we can process properly aligned
|
* On little-endian machines, we can process properly aligned
|
||||||
* data without copying it.
|
* data without copying it.
|
||||||
*/
|
*/
|
||||||
if (!((data - (const md5_byte_t *)0) & 3)) {
|
if (!((data - (const md5_byte_t *)0) & 3)) {
|
||||||
/* data are properly aligned */
|
/* data are properly aligned */
|
||||||
X = (const md5_word_t *)data;
|
X = (const md5_word_t *)data;
|
||||||
} else {
|
} else {
|
||||||
/* not aligned */
|
/* not aligned */
|
||||||
memcpy(xbuf, data, 64);
|
memcpy(xbuf, data, 64);
|
||||||
X = xbuf;
|
X = xbuf;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if BYTE_ORDER == 0
|
#if BYTE_ORDER == 0
|
||||||
|
@ -176,20 +176,20 @@ md5_process(md5_state_t *pms, const md5_byte_t *data /*[64]*/)
|
||||||
#endif
|
#endif
|
||||||
#if BYTE_ORDER >= 0 /* big-endian */
|
#if BYTE_ORDER >= 0 /* big-endian */
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* On big-endian machines, we must arrange the bytes in the
|
* On big-endian machines, we must arrange the bytes in the
|
||||||
* right order.
|
* right order.
|
||||||
*/
|
*/
|
||||||
const md5_byte_t *xp = data;
|
const md5_byte_t *xp = data;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
# if BYTE_ORDER == 0
|
# if BYTE_ORDER == 0
|
||||||
X = xbuf; /* (dynamic only) */
|
X = xbuf; /* (dynamic only) */
|
||||||
# else
|
# else
|
||||||
# define xbuf X /* (static only) */
|
# define xbuf X /* (static only) */
|
||||||
# endif
|
# endif
|
||||||
for (i = 0; i < 16; ++i, xp += 4)
|
for (i = 0; i < 16; ++i, xp += 4)
|
||||||
xbuf[i] = xp[0] + (xp[1] << 8) + (xp[2] << 16) + (xp[3] << 24);
|
xbuf[i] = xp[0] + (xp[1] << 8) + (xp[2] << 16) + (xp[3] << 24);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -342,7 +342,7 @@ md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes)
|
||||||
|
|
||||||
memcpy(pms->buf + offset, p, copy);
|
memcpy(pms->buf + offset, p, copy);
|
||||||
if (offset + copy < 64)
|
if (offset + copy < 64)
|
||||||
return;
|
return;
|
||||||
p += copy;
|
p += copy;
|
||||||
left -= copy;
|
left -= copy;
|
||||||
md5_process(pms, pms->buf);
|
md5_process(pms, pms->buf);
|
||||||
|
|
Loading…
Reference in New Issue