Skip to content

Commit

Permalink
Fix copyrights, add copyright check to gc, changelog update.
Browse files Browse the repository at this point in the history
  • Loading branch information
gconnell committed Dec 20, 2013
1 parent 26e1469 commit e5b4c70
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 3 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ gopacket@googlegroups.com mailing list.

==Changes==

===v1.0.3 20131220 Write/Fix/Move example code

Commit:
https://code.google.com/p/gopacket/source/detail?r=26e14693245d21d9dfb69381803f373a44dcbab6

Wrote arp scanning example to show basic packet generation and sending. Fixed tcp assembly
example to not hang forever. Moved all example binaries into examples subdirectory.

===v1.0.2 20131202 Serialization bugfixes for IPv4/TCP

Commit:
Expand Down
6 changes: 6 additions & 0 deletions examples/arpscan/arpscan.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2012 Google, Inc. All rights reserved.
//
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file in the root of the source
// tree.

// arpscan implements ARP scanning of all interfaces' local networks using
// gopacket and its subpackages. This example shows, among other things:
// * Generating and sending packet data
Expand Down
14 changes: 11 additions & 3 deletions gc
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,19 @@ if [ "$#" -eq "0" ]; then
Usage
fi

cd $(dirname $0)

# Check for copyright notices.
for filename in $(find ./ -type f -name '*.go'); do
if ! head -n 1 "$filename" | grep -q Copyright; then
echo "File '$filename' may not have copyright notice"
exit 1
fi
done

set -e
set -x

cd $(dirname $0)

if [ ! -z "$GEN" ]; then
pushd macs
go run gen.go | gofmt > valid_mac_prefixes.go
Expand All @@ -70,7 +78,7 @@ if [ ! -z "$GEN" ]; then
popd
fi

# First, make sure everything is formatted, compiles, and tests pass.
# Make sure everything is formatted, compiles, and tests pass.
go fmt ./...
go test -i ./... 2>/dev/null >/dev/null || true
go test
Expand Down
7 changes: 7 additions & 0 deletions layers/bytediff.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// Copyright 2012 Google, Inc. All rights reserved.
// Copyright 2009-2011 Andreas Krennmair. All rights reserved.
//
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file in the root of the source
// tree.

package layers

// bytediff provides a simple diff utility for looking at differences in byte
Expand Down
7 changes: 7 additions & 0 deletions layers/bytediff_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// Copyright 2012 Google, Inc. All rights reserved.
// Copyright 2009-2011 Andreas Krennmair. All rights reserved.
//
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file in the root of the source
// tree.

package layers

import (
Expand Down
7 changes: 7 additions & 0 deletions layers/tcpip.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// Copyright 2012 Google, Inc. All rights reserved.
// Copyright 2009-2011 Andreas Krennmair. All rights reserved.
//
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file in the root of the source
// tree.

package layers

import (
Expand Down

0 comments on commit e5b4c70

Please sign in to comment.