Skip to content

Commit 25a8a4c

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents ca174c4 + 8af772c commit 25a8a4c

58 files changed

Lines changed: 12945 additions & 2977 deletions

Some content is hidden

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

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ examples/statsassembly/statsassembly
3232
examples/arpscan/arpscan
3333
examples/bidirectional/bidirectional
3434
examples/bytediff/bytediff
35+
examples/reassemblydump/reassemblydump
3536
layers/gen
3637
macs/gen
3738
pcap/pcap_tester

.travis.golint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
cd "$(dirname $0)"
44

55
go get github.com/golang/lint/golint
6-
DIRS=". tcpassembly tcpassembly/tcpreader ip4defrag macs pcapgo pcap afpacket pfring routing"
6+
DIRS=". tcpassembly tcpassembly/tcpreader ip4defrag reassembly macs pcapgo pcap afpacket pfring routing"
77
# Add subdirectories here as we clean up golint on each.
88
for subdir in $DIRS; do
99
pushd $subdir

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ install:
33
- go get github.com/google/gopacket
44
- go get github.com/google/gopacket/layers
55
- go get github.com/google/gopacket/tcpassembly
6+
- go get github.com/google/gopacket/reassembly
67
script:
78
- go test github.com/google/gopacket
89
- go test github.com/google/gopacket/layers
910
- go test github.com/google/gopacket/tcpassembly
11+
- go test github.com/google/gopacket/reassembly
1012
- ./.travis.gofmt.sh
1113
- ./.travis.govet.sh
1214
- ./.travis.golint.sh

CHANGELOG

Lines changed: 0 additions & 1 deletion
This file was deleted.

CONTRIBUTING.md

Lines changed: 19 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -26,66 +26,42 @@ so the code can make it into the master branch as quickly as possible.
2626
How To Submit Code
2727
------------------
2828

29-
gopacket uses the Git version control system. If you want to
30-
make a new change, you'll first have to get our code:
31-
32-
go get github.com/google/gopacket
33-
cd $GOROOT/src/pkg/github.com/google/gopacket
34-
git checkout -b <mynewfeature> # create a new branch to work from
35-
... code code code ...
36-
./gc # Run this to do local commits, it performs a number of checks
37-
... code code code ...
38-
./gc --benchmark # Run this whenever your commit could affect performance
39-
40-
Now that you're in the gopacket code directory, you can start making your initial
41-
change. PLEASE make sure you're using a new branch to develop whatever feature
42-
you're working on.
43-
44-
Once you've got your code to a place where you're ready to have us look at it,
45-
send an email to gopacket@googlegroups.com, detailing your change. We'll add
46-
you as a committer, and you can upload your feature branch to github.com/google/gopacket.
47-
From there, the other folks working on gopacket can give you code reviews with
48-
the github.com code review functionality.
49-
50-
The code review will generally be either emails or line-by-line reviews via
51-
github.com. One or more folks might review your code. The review should
52-
be considered "complete" when at least one of the project Owners (see
53-
https://github.com/orgs/google/people) gives you permission to merge to
54-
master. At that point, you can merge to master yourself, or you can have one of
55-
the other committers/owners do it for you.
56-
57-
When doing the final merge, please try to capture any interesting comments or
58-
discussions that came up in code review. This will help future contributors be
59-
able to find and reference those discussions later on.
29+
We use github.com's Pull Request feature to receive code contributions from
30+
external contributors. See
31+
https://help.github.com/articles/creating-a-pull-request/ for details on
32+
how to create a request.
33+
34+
Also, there's a local script `gc` in the base directory of GoPacket that
35+
runs a local set of checks, which should give you relatively high confidence
36+
that your pull won't fail github pull checks.
37+
38+
```sh
39+
go get github.com/google/gopacket
40+
cd $GOROOT/src/pkg/github.com/google/gopacket
41+
git checkout -b <mynewfeature> # create a new branch to work from
42+
... code code code ...
43+
./gc # Run this to do local commits, it performs a number of checks
44+
```
6045

6146
To sum up:
6247

6348
* DO
6449
+ Pull down the latest version.
6550
+ Make a feature-specific branch.
6651
+ Code using the style and methods discussed in the rest of this document.
67-
+ Use the ./gc command to do local commits.
68-
+ Send an email asking us to make you a committer (if you're new).
69-
+ Push your new feature branch up to github.com.
52+
+ Use the ./gc command to do local commits or check correctness.
53+
+ Push your new feature branch up to github.com, as a pull request.
7054
+ Handle comments and requests from reviewers, pushing new commits up to
7155
your feature branch as problems are addressed.
72-
+ Get approval from a project Owner to merge to master.
73-
+ Merge yourself, or have another Committer/Owner do it for you.
7456
+ Put interesting comments and discussions into commit comments.
7557
* DON'T
76-
+ Push directly to master.
7758
+ Push to someone else's branch without their permission.
78-
+ Merge your own code to master without sign-off from others on the project.
79-
+ Rebase (please merge)
80-
* OPTIONAL
81-
+ Review others' code as it comes in (politely :)
82-
+ Keep contributing!
8359

8460

8561
Coding Style
8662
------------
8763

88-
* Go code must be run through 'go fmt'.
64+
* Go code must be run through `go fmt`, `go vet`, and `golint`
8965
* Follow http://golang.org/doc/effective_go.html as much as possible.
9066
+ In particular, http://golang.org/doc/effective_go.html#mixed-caps. Enums
9167
should be be CamelCase, with acronyms capitalized (TCPSourcePort, vs.

0 commit comments

Comments
 (0)