#ifndef OPM_H
#define OPM_H
-/* Stuff to shut up warnings about rcsid being unused. */
-#define USE_VAR(var) static char sizeof##var = sizeof(sizeof##var) + sizeof(var)
-
#endif /* OPM_H */
node_t *node;
struct ChannelConf *channel;
- USE_VAR(parv);
- USE_VAR(parc);
- USE_VAR(msg);
- USE_VAR(notused);
-
log_printf("IRC -> Connected to %s:%d", IRCItem->server, IRCItem->port);
/* Identify to nickserv if needed */
*/
static void m_ping(char **parv, unsigned int parc, char *msg, struct UserInfo *source_p)
{
- USE_VAR(msg);
- USE_VAR(source_p);
-
if(parc < 3)
return;
{
struct ChannelConf *channel;
- USE_VAR(msg);
- USE_VAR(source_p);
-
if(parc < 4)
return;
static void m_ctcp(char **parv, unsigned int parc, char *msg, struct UserInfo *source_p)
{
- USE_VAR(parc);
- USE_VAR(msg);
-
- if(strncasecmp(parv[3], "\001VERSION\001", 9) == 0)
- {
- irc_send("NOTICE %s :\001VERSION Hybrid Open Proxy Monitor %s\001",
- source_p->irc_nick, VERSION);
- }
+ if (strncasecmp(parv[3], "\001VERSION\001", 9) == 0)
+ irc_send("NOTICE %s :\001VERSION Hybrid Open Proxy Monitor %s\001",
+ source_p->irc_nick, VERSION);
}
static void m_userhost(char **parv, unsigned int parc, char *msg,
struct UserInfo *source_p)
{
- USE_VAR(msg);
- USE_VAR(source_p);
-
if(parc < 4)
return;
{
struct ChannelConf *channel;
- USE_VAR(msg);
- USE_VAR(source_p);
-
if(parc < 5)
return;
static void m_kill(char **parv, unsigned int parc, char *msg, struct UserInfo *source_p)
{
- USE_VAR(parv);
- USE_VAR(parc);
- USE_VAR(msg);
- USE_VAR(source_p);
-
- /* Restart hopm to rehash */
- main_restart();
+ /* Restart hopm to rehash */
+ main_restart();
}
#include "opm_common.h"
-/* Stuff to shut up warnings about rcsid being unused. */
-#define USE_VAR(var) static char sizeof##var = sizeof(sizeof##var) + sizeof(var)
-
-
typedef struct _OPM_CONFIG OPM_CONFIG_T;
typedef struct _OPM OPM_T;
typedef struct _OPM_REMOTE OPM_REMOTE_T;
int libopm_proxy_http_write(OPM_T *scanner, OPM_SCAN_T *scan, OPM_CONNECTION_T *conn)
{
- USE_VAR(scan);
-
snprintf(SENDBUF, SENDBUFLEN, "CONNECT %s:%d HTTP/1.0\r\n\r\n",
(char *) libopm_config(scanner->config, OPM_CONFIG_SCAN_IP),
*(int *) libopm_config(scanner->config, OPM_CONFIG_SCAN_PORT));
unsigned long laddr;
int len, scan_port;
char *scan_ip;
- USE_VAR(scan);
scan_ip = (char *) libopm_config(scanner->config, OPM_CONFIG_SCAN_IP);
scan_port = *(int *) libopm_config(scanner->config, OPM_CONFIG_SCAN_PORT);
unsigned long laddr;
int len, scan_port;
char *scan_ip;
- USE_VAR(scan);
scan_ip = (char *) libopm_config(scanner->config, OPM_CONFIG_SCAN_IP);
scan_port = *(int *) libopm_config(scanner->config, OPM_CONFIG_SCAN_PORT);
{
int scan_port, len;
char *scan_ip;
- USE_VAR(scan);
scan_ip = (char *) libopm_config(scanner->config, OPM_CONFIG_SCAN_IP);
scan_port = *(int *) libopm_config(scanner->config, OPM_CONFIG_SCAN_PORT);
{
int len, scan_port;
char *scan_ip;
- USE_VAR(scan);
scan_ip = (char *) libopm_config(scanner->config, OPM_CONFIG_SCAN_IP);
scan_port = *(int *) libopm_config(scanner->config, OPM_CONFIG_SCAN_PORT);
{
int len, scan_port;
char *scan_ip;
- USE_VAR(scan);
scan_ip = (char *) libopm_config(scanner->config, OPM_CONFIG_SCAN_IP);
scan_port = *(int *) libopm_config(scanner->config, OPM_CONFIG_SCAN_PORT);
void open_proxy(OPM_T *scanner, OPM_REMOTE_T *remote, int notused,
void *data)
{
- USE_VAR(notused);
- USE_VAR(data);
-
printf("Open proxy on %s:%d [%d bytes read]\n", remote->ip,
remote->port, remote->bytes_read);
opm_end(scanner, remote);
void negotiation_failed(OPM_T *scanner, OPM_REMOTE_T *remote, int notused,
void *data)
{
- USE_VAR(scanner);
- USE_VAR(notused);
- USE_VAR(data);
-
printf("Negotiation on %s:%d failed [%d bytes read]\n", remote->ip,
remote->port, remote->bytes_read);
}
void timeout(OPM_T *scanner, OPM_REMOTE_T *remote, int notused, void *data)
{
- USE_VAR(scanner);
- USE_VAR(notused);
- USE_VAR(data);
-
printf("Negotiation timed out on %s:%d\n", remote->ip, remote->port);
}
void end(OPM_T *scanner, OPM_REMOTE_T *remote, int notused, void *data)
{
- USE_VAR(scanner);
- USE_VAR(notused);
- USE_VAR(data);
-
printf("Scan on %s has ended\n", remote->ip);
opm_remote_free(remote);
complete = 1;
void handle_error(OPM_T *scanner, OPM_REMOTE_T *remote, int err, void *data)
{
- USE_VAR(scanner);
- USE_VAR(data);
-
switch(err)
{
case OPM_ERR_MAX_READ:
{
unsigned int i;
char *param; /* Parsed parameters */
-
struct Command *cs;
node_t *node;
- USE_VAR(msg);
-
if(OPT_DEBUG)
{
log_printf("COMMAND -> Parsing command (%s) from %s [%s]", command,
static void cmd_check(char *param, char *source, struct ChannelConf *target)
{
- USE_VAR(source);
-
- scan_manual(param, target);
+ scan_manual(param, target);
}
static void cmd_stat(char *param, char *source, struct ChannelConf *target)
{
- USE_VAR(param);
- USE_VAR(source);
-
- stats_output(target->name);
+ stats_output(target->name);
}
static void cmd_fdstat(char *param, char *source, struct ChannelConf *target)
{
- USE_VAR(param);
- USE_VAR(source);
-
- fdstats_output(target->name);
+ fdstats_output(target->name);
}
struct scan_struct *ss;
struct scanner_struct *scs;
- USE_VAR(scanner);
- USE_VAR(notused);
-
/* Record that a scan happened */
scan_log(remote);
// struct scan_struct *ss;
struct scanner_struct *scs;
- USE_VAR(scanner);
- USE_VAR(notused);
-
/* Record that a scan happened */
scan_log(remote);
// struct scan_struct *ss;
struct scanner_struct *scs;
- USE_VAR(scanner);
- USE_VAR(notused);
-
/* Record that a scan happened */
scan_log(remote);
struct scan_struct *ss;
struct scanner_struct *scs;
- USE_VAR(scanner);
- USE_VAR(notused);
-
scs = (struct scanner_struct *) data;
ss = (struct scan_struct *) remote->data;
struct scan_struct *ss;
struct scanner_struct *scs;
- USE_VAR(scanner);
-
scs = (struct scanner_struct *) data;
ss = (struct scan_struct *) remote->data;