int type;
};
-void libopm_config_free(OPM_CONFIG_T *);
-void *libopm_config(OPM_CONFIG_T *, unsigned int);
-int libopm_config_gettype(int);
-OPM_CONFIG_T *libopm_config_create(void);
-OPM_ERR_T libopm_config_set(OPM_CONFIG_T *, unsigned int , const void *);
+extern void libopm_config_free(OPM_CONFIG_T *);
+extern void *libopm_config(OPM_CONFIG_T *, unsigned int);
+extern int libopm_config_gettype(int);
+extern OPM_CONFIG_T *libopm_config_create(void);
+extern OPM_ERR_T libopm_config_set(OPM_CONFIG_T *, unsigned int , const void *);
#endif /* CONFIG_H */
#define LIST_SIZE(list) list->elements
/* End Copyright */
-OPM_NODE_T *libopm_node_create(void *);
-OPM_LIST_T *libopm_list_create(void);
+extern OPM_NODE_T *libopm_node_create(void *);
+extern OPM_LIST_T *libopm_list_create(void);
-OPM_NODE_T *libopm_list_add(OPM_LIST_T *, OPM_NODE_T *);
-OPM_NODE_T *libopm_list_remove(OPM_LIST_T *, OPM_NODE_T *);
+extern OPM_NODE_T *libopm_list_add(OPM_LIST_T *, OPM_NODE_T *);
+extern OPM_NODE_T *libopm_list_remove(OPM_LIST_T *, OPM_NODE_T *);
-void libopm_list_free(OPM_LIST_T *);
-void libopm_node_free(OPM_NODE_T *);
+extern void libopm_list_free(OPM_LIST_T *);
+extern void libopm_node_free(OPM_NODE_T *);
#endif /* LIST_H */
#define xcalloc(SIZE) libopm_xcalloc(SIZE)
#define MyFree(X) libopm_MyFree((void **) &X)
-void *libopm_xcalloc(size_t bytes);
-void libopm_MyFree(void **var);
+extern void *libopm_xcalloc(size_t bytes);
+extern void libopm_MyFree(void **var);
extern void *libopm_xstrdup(const char *);
#endif /* MALLOC_H */
void *data; /* Arbitrary data that the client can point to for any purpose*/
};
-OPM_T *opm_create(void);
-void opm_free(OPM_T *);
+extern OPM_T *opm_create(void);
+extern void opm_free(OPM_T *);
-OPM_REMOTE_T *opm_remote_create(const char *);
-void opm_remote_free(OPM_REMOTE_T *);
+extern OPM_REMOTE_T *opm_remote_create(const char *);
+extern void opm_remote_free(OPM_REMOTE_T *);
-OPM_ERR_T opm_config(OPM_T *, int, const void *);
-OPM_ERR_T opm_scan(OPM_T *, OPM_REMOTE_T *);
-void opm_end(OPM_T *, OPM_REMOTE_T *);
-void opm_endscan(OPM_T *, OPM_REMOTE_T *);
+extern OPM_ERR_T opm_config(OPM_T *, int, const void *);
+extern OPM_ERR_T opm_scan(OPM_T *, OPM_REMOTE_T *);
+extern void opm_end(OPM_T *, OPM_REMOTE_T *);
+extern void opm_endscan(OPM_T *, OPM_REMOTE_T *);
-OPM_ERR_T opm_addtype(OPM_T *, int, unsigned short int);
-OPM_ERR_T opm_remote_addtype(OPM_REMOTE_T *, int, unsigned short int);
-OPM_ERR_T opm_callback(OPM_T *, int, OPM_CALLBACK_FUNC *, void *);
+extern OPM_ERR_T opm_addtype(OPM_T *, int, unsigned short int);
+extern OPM_ERR_T opm_remote_addtype(OPM_REMOTE_T *, int, unsigned short int);
+extern OPM_ERR_T opm_callback(OPM_T *, int, OPM_CALLBACK_FUNC *, void *);
-void opm_cycle(OPM_T *);
+extern void opm_cycle(OPM_T *);
-size_t opm_active(OPM_T *);
+extern size_t opm_active(OPM_T *);
#endif /* OPM_H */
#include "libopm.h"
-int libopm_proxy_http_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *);
-int libopm_proxy_socks4_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *);
-int libopm_proxy_socks5_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *);
-int libopm_proxy_wingate_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *);
-int libopm_proxy_router_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *);
-int libopm_proxy_httppost_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *);
-int libopm_proxy_dreambox_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *);
+extern int libopm_proxy_http_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *);
+extern int libopm_proxy_socks4_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *);
+extern int libopm_proxy_socks5_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *);
+extern int libopm_proxy_wingate_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *);
+extern int libopm_proxy_router_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *);
+extern int libopm_proxy_httppost_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *);
+extern int libopm_proxy_dreambox_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *);
#endif /* PROXY_H */