Skip to content

Commit ecacee7

Browse files
committed
Lint ALL the things !
1 parent 26a3816 commit ecacee7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+8122
-9823
lines changed

base/network.c

+218-216
Large diffs are not rendered by default.

base/network.h

+48-46
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
documentation and/or other materials provided with the distribution.
1919
3. All advertising materials mentioning features or use of this software
2020
must display the following acknowledgement:
21-
21+
2222
This product includes software developed by Eric Rescorla for
2323
RTFM, Inc.
2424
@@ -35,15 +35,15 @@
3535
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3636
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3737
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
38-
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY SUCH DAMAGE.
38+
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY SUCH
39+
DAMAGE.
3940
4041
$Id: network.h,v 1.3 2001/09/14 22:29:14 ekr Exp $
4142
4243
4344
[email protected] Tue Dec 29 09:53:50 1998
4445
*/
4546

46-
4747
#ifndef _network_h
4848
#define _network_h
4949

@@ -74,56 +74,58 @@ typedef struct proto_mod_ proto_mod;
7474
typedef struct proto_handler_ proto_handler;
7575
typedef struct packet_ packet;
7676

77-
int network_handler_create PROTO_LIST((proto_mod *mod,
78-
n_handler **handlerp));
79-
int network_handler_destroy PROTO_LIST((proto_mod *mod,n_handler **handlerp));
80-
int network_process_packet PROTO_LIST((n_handler *handler,
81-
struct timeval *timestamp,UCHAR *data,int length,int af));
82-
int packet_copy PROTO_LIST((packet *in,packet **out));
83-
int packet_destroy PROTO_LIST((packet *p));
84-
int timestamp_diff PROTO_LIST(( struct timeval *t1,struct timeval *t0,
85-
struct timeval *diff));
86-
int lookuphostname PROTO_LIST((struct sockaddr_storage *addr,char **name));
87-
int addrtotext PROTO_LIST((struct sockaddr_storage *addr,char **name));
77+
int network_handler_create PROTO_LIST((proto_mod * mod, n_handler **handlerp));
78+
int network_handler_destroy PROTO_LIST((proto_mod * mod, n_handler **handlerp));
79+
int network_process_packet PROTO_LIST((n_handler * handler,
80+
struct timeval *timestamp,
81+
UCHAR *data,
82+
int length,
83+
int af));
84+
int packet_copy PROTO_LIST((packet * in, packet **out));
85+
int packet_destroy PROTO_LIST((packet * p));
86+
int timestamp_diff PROTO_LIST((struct timeval * t1,
87+
struct timeval *t0,
88+
struct timeval *diff));
89+
int lookuphostname PROTO_LIST((struct sockaddr_storage * addr, char **name));
90+
int addrtotext PROTO_LIST((struct sockaddr_storage * addr, char **name));
8891

8992
struct packet_ {
90-
struct timeval ts;
91-
UCHAR *base; /*The base of the packet*/
92-
int _len;
93-
UCHAR *data; /*The data ptr appropriate to this layer*/
94-
int len; /*The length of the data segment*/
95-
96-
/*These just save us the effort of doing casts to the data
97-
segments*/
98-
struct ip *ip; /*The IP header*/
99-
int af;
100-
union {
101-
struct ip *ip; /*The IP header*/
102-
struct ip6_hdr *ip6; /*The IP header*/
103-
} l3_hdr;
104-
struct tcphdr *tcp; /*The TCP header*/
105-
union {
106-
struct sockaddr_storage so_st;
107-
struct sockaddr_in so_in;
108-
struct sockaddr_in6 so_in6;
109-
} i_addr;
110-
union {
111-
struct sockaddr_storage so_st;
112-
struct sockaddr_in so_in;
113-
struct sockaddr_in6 so_in6;
114-
} r_addr;
93+
struct timeval ts;
94+
UCHAR *base; /*The base of the packet*/
95+
int _len;
96+
UCHAR *data; /*The data ptr appropriate to this layer*/
97+
int len; /*The length of the data segment*/
98+
99+
/*These just save us the effort of doing casts to the data
100+
segments*/
101+
struct ip *ip; /*The IP header*/
102+
int af;
103+
union {
104+
struct ip *ip; /*The IP header*/
105+
struct ip6_hdr *ip6; /*The IP header*/
106+
} l3_hdr;
107+
struct tcphdr *tcp; /*The TCP header*/
108+
union {
109+
struct sockaddr_storage so_st;
110+
struct sockaddr_in so_in;
111+
struct sockaddr_in6 so_in6;
112+
} i_addr;
113+
union {
114+
struct sockaddr_storage so_st;
115+
struct sockaddr_in so_in;
116+
struct sockaddr_in6 so_in6;
117+
} r_addr;
115118
};
116119

117120
#include "tcpconn.h"
118121
#include "proto_mod.h"
119122

120123
extern UINT4 NET_print_flags;
121124

122-
#define NET_PRINT_TCP_HDR 1
123-
#define NET_PRINT_TYPESET 2
124-
#define NET_PRINT_ACKS 4
125-
#define NET_PRINT_NO_RESOLVE 8
126-
#define NET_PRINT_JSON 16
127-
#define NET_PRINT_TS 32
125+
#define NET_PRINT_TCP_HDR 1
126+
#define NET_PRINT_TYPESET 2
127+
#define NET_PRINT_ACKS 4
128+
#define NET_PRINT_NO_RESOLVE 8
129+
#define NET_PRINT_JSON 16
130+
#define NET_PRINT_TS 32
128131
#endif
129-

0 commit comments

Comments
 (0)