Whitespace cleanup.

This commit is contained in:
Gleb Smirnoff 2013-12-25 01:52:55 +00:00
parent 729c09bf00
commit 22d3fb1917
2 changed files with 71 additions and 79 deletions

View File

@ -45,8 +45,6 @@ MALLOC_DECLARE(M_ALIAS);
#endif
#endif
/* Protocol handlers struct & function. */
/* Packet flow direction. */
#define IN 1
#define OUT 2
@ -61,7 +59,6 @@ MALLOC_DECLARE(M_ALIAS);
* right before calling find_handler() to determine which
* module is elegible to be called.
*/
struct alias_data {
struct alias_link *lnk;
struct in_addr *oaddr; /* Original address. */
@ -75,25 +72,23 @@ struct alias_data {
* This structure contains all the information necessary to make
* a protocol handler correctly work.
*/
struct proto_handler {
u_int pri; /* Handler priority. */
int16_t dir; /* Flow direction. */
uint8_t proto; /* Working protocol. */
int (*fingerprint)(struct libalias *, /* Fingerprint * function. */
/* Fingerprint * function. */
int (*fingerprint)(struct libalias *, struct alias_data *);
/* Aliasing * function. */
int (*protohandler)(struct libalias *, struct ip *,
struct alias_data *);
int (*protohandler)(struct libalias *, /* Aliasing * function. */
struct ip *, struct alias_data *);
LIST_ENTRY(proto_handler) entries;
};
/*
* Used only in userland when libalias needs to keep track of all
* module loaded. In kernel land (kld mode) we don't need to care
* care about libalias modules cause it's kld to do it for us.
*/
#define DLL_LEN 32
struct dll {
char name[DLL_LEN]; /* Name of module. */
@ -107,18 +102,16 @@ struct dll {
};
/* Functions used with protocol handlers. */
void handler_chain_init(void);
void handler_chain_destroy(void);
int LibAliasAttachHandlers(struct proto_handler *);
int LibAliasDetachHandlers(struct proto_handler *);
int detach_handler(struct proto_handler *);
int find_handler(int8_t, int8_t, struct libalias *,
struct ip *, struct alias_data *);
int find_handler(int8_t, int8_t, struct libalias *, struct ip *,
struct alias_data *);
struct proto_handler *first_handler(void);
/* Functions used with dll module. */
void dll_chain_init(void);
void dll_chain_destroy(void);
int attach_dll(struct dll *);
@ -132,7 +125,6 @@ struct dll *walk_dll_chain(void);
* Some defines borrowed from sys/module.h used to compile a kld
* in userland as a shared lib.
*/
#ifndef _KERNEL
typedef enum modeventtype {
MOD_LOAD,