mirror of
https://github.com/rofl0r/proxychains-ng
synced 2025-01-08 22:22:52 +08:00
debug: fix DUMP_PROXY_CHAIN() hack
This commit is contained in:
parent
acf2f4725d
commit
121c582d9c
@ -5,7 +5,7 @@
|
|||||||
# include "debug.h"
|
# include "debug.h"
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
|
|
||||||
void DUMP_PROXY_CHAIN(proxy_data *pchain, unsigned int count) {
|
void dump_proxy_chain(proxy_data *pchain, unsigned int count) {
|
||||||
char ip_buf[INET6_ADDRSTRLEN];
|
char ip_buf[INET6_ADDRSTRLEN];
|
||||||
for (; count; pchain++, count--) {
|
for (; count; pchain++, count--) {
|
||||||
if(!inet_ntop(pchain->ip.is_v6?AF_INET6:AF_INET,pchain->ip.addr.v6,ip_buf,sizeof ip_buf)) {
|
if(!inet_ntop(pchain->ip.is_v6?AF_INET6:AF_INET,pchain->ip.addr.v6,ip_buf,sizeof ip_buf)) {
|
||||||
|
12
src/debug.h
12
src/debug.h
@ -1,15 +1,13 @@
|
|||||||
#ifndef DEBUG_H
|
#ifndef DEBUG_H
|
||||||
#define DEBUG_H
|
#define DEBUG_H
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
# include <stdio.h>
|
# include <stdio.h>
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
# define PSTDERR(fmt, args...) do { dprintf(2,fmt, ## args); } while(0)
|
# define PSTDERR(fmt, args...) do { dprintf(2,fmt, ## args); } while(0)
|
||||||
# define PDEBUG(fmt, args...) PSTDERR("DEBUG:"fmt, ## args)
|
# define PDEBUG(fmt, args...) PSTDERR("DEBUG:"fmt, ## args)
|
||||||
# define DEBUGDECL(args...) args
|
# define DEBUGDECL(args...) args
|
||||||
|
# define DUMP_PROXY_CHAIN(A, B) dump_proxy_chain(A, B)
|
||||||
# include "core.h"
|
|
||||||
void DUMP_PROXY_CHAIN(proxy_data *pchain, unsigned int count);
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
# define PDEBUG(fmt, args...) do {} while (0)
|
# define PDEBUG(fmt, args...) do {} while (0)
|
||||||
# define DEBUGDECL(args...)
|
# define DEBUGDECL(args...)
|
||||||
@ -18,5 +16,9 @@ void DUMP_PROXY_CHAIN(proxy_data *pchain, unsigned int count);
|
|||||||
|
|
||||||
# define PFUNC() do { PDEBUG("pid[%d]:%s\n", getpid(), __FUNCTION__); } while(0)
|
# define PFUNC() do { PDEBUG("pid[%d]:%s\n", getpid(), __FUNCTION__); } while(0)
|
||||||
|
|
||||||
|
#include "core.h"
|
||||||
|
void dump_proxy_chain(proxy_data *pchain, unsigned int count);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user