forked from netsniff-ng/netsniff-ng
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHACKING
59 lines (51 loc) · 2.69 KB
/
HACKING
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
Some information about potential netsniff-ng hackers can be found here!
First of all, you might want to clone our git repository before you start
hacking on anything:
$ git clone git://repo.or.cz/netsniff-ng.git
The best way to propose your ideas is to outline them in a short mail to
[email protected] or to our public mailing list address
[email protected]. We are looking forward for your proposals!
Of course, keep in mind that you can mail smaller portions of code like
bug fixes immediately.
The best way to make a contribution to netsniff-ng is to send us your
code in the form of a unified diff against the latest released or
development version and, preferably, the master branch from our Git
repository. Your patch should then be sent to [email protected]
Before submitting your patch make sure to indent your code appropriate.
For this, have a look at our coding conventions within the CODING file.
Note: avoid tools like indent for automatic code formatting, since they
can screw up the format in some cases by not recognizing everything!
Further, this is only for lazy people that do not stick to the kernel
coding conventions anyway. We won't accept patches if they don't comply
to these conventions, so get your act together.
There are so few source comments?! Yes, there are and this is intended!
Some people think that lots of source comments means good quality of the
source repository, or some smililar crude thoughts. Well, read the books.
Source comments are code smells, except in a few cases. The few cases are
that you explain why something is done in this way and why not in another.
Somehow, people tend to explain what the sources itself does, which is
just wrong. The source itself must be self-descriptive and readable without
any comments. Keep that in mind while hacking on the toolkit. ;-)
The src/s/ directory contains a number of SmPL (Semantic Patch Language)
scripts that can be used together with Coccinelle's spatch tool. In order
to install spatch from the official tarballs, you might need to install
the following packages on Debian:
- ocaml-native-compilers (or alternatively ocaml)
- ocaml-findlib
- libpycaml-ocaml-dev
- libsexplib-camlp4-dev
- menhir and libmenhir-ocaml-dev
Afterwards, you can build and install Coccinelle with:
wget http://coccinelle.lip6.fr/distrib/coccinelle-1.0.0-rc7.tgz
tar xvf coccinelle-1.0.0-rc7.tgz
cd coccinelle-1.0.0-rc7/
./configure --prefix=/usr/
make depend
make all
make install
To check netsniff-ng against scripts from src/s/, do:
cd src/
make check
Well, I guess most has been said ... so happy packet hacking! We're looking
forward for your patches, ideas and improvements!