hlswmaster/include/plugin_helper.h

30 lines
1.0 KiB
C
Raw Normal View History

#ifndef _PLUGIN_HELPER_H
#define _PLUGIN_HELPER_H
#include "netpkt.h"
#include "list.h"
#include "plugin.h"
extern int server_add(u_int16_t gameid, u_int32_t ip, u_int16_t port1, u_int16_t port2);
struct scan_ports {
unsigned short portlo;
unsigned short porthi;
unsigned short gameid;
};
extern int pkt_send(struct in_addr *dstip, unsigned int dstport, char *buf, unsigned int size);
extern int pkt_send_portarr(struct in_addr *dstip, struct scan_ports *portarr, char *buf, unsigned int size);
extern int pkt_check_portarr(struct net_pkt *pkt, struct scan_ports *portarr);
extern int pkt_memcmp(struct net_pkt *pkt, unsigned int offset, char *search, unsigned int size);
extern void * pkt_memmem(struct net_pkt *pkt, unsigned int offset, char *search, unsigned int size);
extern int server_add_pkt(unsigned int gameid, struct net_pkt *pkt);
extern char * pkt_ntoa(struct net_pkt *pkt);
extern unsigned short pkt_getport(struct net_pkt *pkt);
extern int pkt_atoi(struct net_pkt *pkt, void *p);
#endif /* _PLUGIN_HELPER_H */