diff options
author | des <des@FreeBSD.org> | 2004-03-16 21:30:41 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2004-03-16 21:30:41 +0000 |
commit | 3cb81148d8a83b1e6c1a65937f9e6310ba617894 (patch) | |
tree | b367873b0bbb14ba0adf2f65c33ec1670b035d30 /sys/netinet/libalias/alias.h | |
parent | 0354260aab76815ce0d09458a84211e4b9e58979 (diff) | |
download | FreeBSD-src-3cb81148d8a83b1e6c1a65937f9e6310ba617894.zip FreeBSD-src-3cb81148d8a83b1e6c1a65937f9e6310ba617894.tar.gz |
Run through indent(1) so I can read the code without getting a headache.
The result isn't quite knf, but it's knfer than the original, and far
more consistent.
Diffstat (limited to 'sys/netinet/libalias/alias.h')
-rw-r--r-- | sys/netinet/libalias/alias.h | 126 |
1 files changed, 64 insertions, 62 deletions
diff --git a/sys/netinet/libalias/alias.h b/sys/netinet/libalias/alias.h index d714126..0f5ba70 100644 --- a/sys/netinet/libalias/alias.h +++ b/sys/netinet/libalias/alias.h @@ -47,11 +47,11 @@ * PacketAlias*() the old API which doesn't take an instance pointer * and therefore can only have one packet engine at a time. * - * LibAlias*() the new API which takes as first argument a pointer to + * LibAlias*() the new API which takes as first argument a pointer to * the instance of the packet aliasing engine. * * The functions otherwise correspond to each other one for one, except - * for the LibAliasUnaliasOut()/PacketUnaliasOut() function which were + * for the LibAliasUnaliasOut()/PacketUnaliasOut() function which were * were misnamed in the old API. */ @@ -66,107 +66,109 @@ struct libalias; * PacketAliasRedirectProto(), passed to PacketAliasAddServer(), * and freed by PacketAliasRedirectDelete(). */ -struct alias_link; +struct alias_link; /* OLD API */ /* Initialization and control functions. */ -void PacketAliasInit(void); -void PacketAliasSetAddress(struct in_addr _addr); -void PacketAliasSetFWBase(unsigned int _base, unsigned int _num); -void PacketAliasSetSkinnyPort(unsigned int _port); +void PacketAliasInit(void); +void PacketAliasSetAddress(struct in_addr _addr); +void PacketAliasSetFWBase(unsigned int _base, unsigned int _num); +void PacketAliasSetSkinnyPort(unsigned int _port); unsigned int - PacketAliasSetMode(unsigned int _flags, unsigned int _mask); -void PacketAliasUninit(void); + PacketAliasSetMode(unsigned int _flags, unsigned int _mask); +void PacketAliasUninit(void); /* Packet Handling functions. */ -int PacketAliasIn(char *_ptr, int _maxpacketsize); -int PacketAliasOut(char *_ptr, int _maxpacketsize); -int PacketUnaliasOut(char *_ptr, int _maxpacketsize); +int PacketAliasIn(char *_ptr, int _maxpacketsize); +int PacketAliasOut(char *_ptr, int _maxpacketsize); +int PacketUnaliasOut(char *_ptr, int _maxpacketsize); /* Port and address redirection functions. */ -int PacketAliasAddServer(struct alias_link *_link, - struct in_addr _addr, unsigned short _port); +int +PacketAliasAddServer(struct alias_link *_link, + struct in_addr _addr, unsigned short _port); struct alias_link * - PacketAliasRedirectAddr(struct in_addr _src_addr, - struct in_addr _alias_addr); -int PacketAliasRedirectDynamic(struct alias_link *_link); -void PacketAliasRedirectDelete(struct alias_link *_link); +PacketAliasRedirectAddr(struct in_addr _src_addr, + struct in_addr _alias_addr); +int PacketAliasRedirectDynamic(struct alias_link *_link); +void PacketAliasRedirectDelete(struct alias_link *_link); struct alias_link * - PacketAliasRedirectPort(struct in_addr _src_addr, - unsigned short _src_port, struct in_addr _dst_addr, - unsigned short _dst_port, struct in_addr _alias_addr, - unsigned short _alias_port, unsigned char _proto); +PacketAliasRedirectPort(struct in_addr _src_addr, + unsigned short _src_port, struct in_addr _dst_addr, + unsigned short _dst_port, struct in_addr _alias_addr, + unsigned short _alias_port, unsigned char _proto); struct alias_link * - PacketAliasRedirectProto(struct in_addr _src_addr, - struct in_addr _dst_addr, struct in_addr _alias_addr, - unsigned char _proto); +PacketAliasRedirectProto(struct in_addr _src_addr, + struct in_addr _dst_addr, struct in_addr _alias_addr, + unsigned char _proto); /* Fragment Handling functions. */ -void PacketAliasFragmentIn(char *_ptr, char *_ptr_fragment); -char *PacketAliasGetFragment(char *_ptr); -int PacketAliasSaveFragment(char *_ptr); +void PacketAliasFragmentIn(char *_ptr, char *_ptr_fragment); +char *PacketAliasGetFragment(char *_ptr); +int PacketAliasSaveFragment(char *_ptr); /* Miscellaneous functions. */ -int PacketAliasCheckNewLink(void); +int PacketAliasCheckNewLink(void); unsigned short - PacketAliasInternetChecksum(unsigned short *_ptr, int _nbytes); -void PacketAliasSetTarget(struct in_addr _target_addr); + PacketAliasInternetChecksum(unsigned short *_ptr, int _nbytes); +void PacketAliasSetTarget(struct in_addr _target_addr); /* Transparent proxying routines. */ -int PacketAliasProxyRule(const char *_cmd); +int PacketAliasProxyRule(const char *_cmd); /* NEW API */ /* Initialization and control functions. */ -struct libalias *LibAliasInit(struct libalias *); -void LibAliasSetAddress(struct libalias *, struct in_addr _addr); -void LibAliasSetFWBase(struct libalias *, unsigned int _base, unsigned int _num); -void LibAliasSetSkinnyPort(struct libalias *, unsigned int _port); +struct libalias *LibAliasInit(struct libalias *); +void LibAliasSetAddress(struct libalias *, struct in_addr _addr); +void LibAliasSetFWBase(struct libalias *, unsigned int _base, unsigned int _num); +void LibAliasSetSkinnyPort(struct libalias *, unsigned int _port); unsigned int - LibAliasSetMode(struct libalias *, unsigned int _flags, unsigned int _mask); -void LibAliasUninit(struct libalias *); + LibAliasSetMode(struct libalias *, unsigned int _flags, unsigned int _mask); +void LibAliasUninit(struct libalias *); /* Packet Handling functions. */ -int LibAliasIn(struct libalias *, char *_ptr, int _maxpacketsize); -int LibAliasOut(struct libalias *, char *_ptr, int _maxpacketsize); -int LibAliasUnaliasOut(struct libalias *, char *_ptr, int _maxpacketsize); +int LibAliasIn (struct libalias *, char *_ptr, int _maxpacketsize); +int LibAliasOut(struct libalias *, char *_ptr, int _maxpacketsize); +int LibAliasUnaliasOut(struct libalias *, char *_ptr, int _maxpacketsize); /* Port and address redirection functions. */ -int LibAliasAddServer(struct libalias *, struct alias_link *_link, - struct in_addr _addr, unsigned short _port); +int +LibAliasAddServer(struct libalias *, struct alias_link *_link, + struct in_addr _addr, unsigned short _port); struct alias_link * - LibAliasRedirectAddr(struct libalias *, struct in_addr _src_addr, - struct in_addr _alias_addr); -int LibAliasRedirectDynamic(struct libalias *, struct alias_link *_link); -void LibAliasRedirectDelete(struct libalias *, struct alias_link *_link); +LibAliasRedirectAddr(struct libalias *, struct in_addr _src_addr, + struct in_addr _alias_addr); +int LibAliasRedirectDynamic(struct libalias *, struct alias_link *_link); +void LibAliasRedirectDelete(struct libalias *, struct alias_link *_link); struct alias_link * - LibAliasRedirectPort(struct libalias *, struct in_addr _src_addr, - unsigned short _src_port, struct in_addr _dst_addr, - unsigned short _dst_port, struct in_addr _alias_addr, - unsigned short _alias_port, unsigned char _proto); +LibAliasRedirectPort(struct libalias *, struct in_addr _src_addr, + unsigned short _src_port, struct in_addr _dst_addr, + unsigned short _dst_port, struct in_addr _alias_addr, + unsigned short _alias_port, unsigned char _proto); struct alias_link * - LibAliasRedirectProto(struct libalias *, struct in_addr _src_addr, - struct in_addr _dst_addr, struct in_addr _alias_addr, - unsigned char _proto); +LibAliasRedirectProto(struct libalias *, struct in_addr _src_addr, + struct in_addr _dst_addr, struct in_addr _alias_addr, + unsigned char _proto); /* Fragment Handling functions. */ -void LibAliasFragmentIn(struct libalias *, char *_ptr, char *_ptr_fragment); -char *LibAliasGetFragment(struct libalias *, char *_ptr); -int LibAliasSaveFragment(struct libalias *, char *_ptr); +void LibAliasFragmentIn(struct libalias *, char *_ptr, char *_ptr_fragment); +char *LibAliasGetFragment(struct libalias *, char *_ptr); +int LibAliasSaveFragment(struct libalias *, char *_ptr); /* Miscellaneous functions. */ -int LibAliasCheckNewLink(struct libalias *); +int LibAliasCheckNewLink(struct libalias *); unsigned short - LibAliasInternetChecksum(struct libalias *, unsigned short *_ptr, int _nbytes); -void LibAliasSetTarget(struct libalias *, struct in_addr _target_addr); + LibAliasInternetChecksum(struct libalias *, unsigned short *_ptr, int _nbytes); +void LibAliasSetTarget(struct libalias *, struct in_addr _target_addr); /* Transparent proxying routines. */ -int LibAliasProxyRule(struct libalias *, const char *_cmd); +int LibAliasProxyRule(struct libalias *, const char *_cmd); /* @@ -257,6 +259,6 @@ int LibAliasProxyRule(struct libalias *, const char *_cmd); #define PKT_ALIAS_UNRESOLVED_FRAGMENT 3 #define PKT_ALIAS_FOUND_HEADER_FRAGMENT 4 -#endif /* !_ALIAS_H_ */ +#endif /* !_ALIAS_H_ */ /* lint -restore */ |