GitXplorerGitXplorer
L

gopcap

public
35 stars
11 forks
4 issues

Commits

List of commits on branch master.
Unverified
e614c83012c133761584bef47ee83d32d693171e

Test the new UDP datagram.

LLukasa committed 11 years ago
Unverified
d4223bf0df4047ace572202d3065be257f1a3f57

Add the UDP datagram.

LLukasa committed 11 years ago
Unverified
bf6c0cff06c30403423e3e3a5fbcf630df35762c

Include the TCP segment in the full API test.

LLukasa committed 11 years ago
Unverified
4db75e13bde96632ebd8feee72ed5e9b418c8476

Remove superfluous error check.

LLukasa committed 11 years ago
Unverified
bcc0b201d1482d0d65b254e937eb568233e162b2

Plumb TransportLayer through InternetLayer.

LLukasa committed 11 years ago
Unverified
16da81a7e17f450638456ff962d46e29aa66526e

Update IPv4 to actually use TransportProtocol.

LLukasa committed 11 years ago

README

The README file for this repository.

gopcap

gopcap is a pure Go implementation of the pcap file format. Pcap is the standard open-source packet capture format, and is defined by the libpcap C library.

Example

The gopcap API is incredibly simple:

pcapfile, _ := os.Open("file.cap")
parsed, err := gopcap.Parse(pcapfile)

For further examples, see the API documentation.

Features

  • Fully synchronous API that is easy to make asynchronous.
  • Efficient with memory use.
  • No external dependencies.

Contributing

gopcap welcomes contributions, both bug fixes and new features (though the opportunity for new features is obviously fairly limited!). Any feature request should strongly consider the implications for the API. API clarity is valued above new features, so any feature that complicates the API must add significant value to the library to be accepted.

If you'd like to contribute, do the following:

  1. Check that your idea hasn't been proposed already, by checking both open and closed issues on GitHub.
  2. Fork the repository from GitHub and make your changes.
  3. Where possible, write a test that reproduces the bug and check that it passes after your changes have been made.
  4. Send a Pull Request. Don't forget to add yourself to the AUTHORS file.

## License

This PCAP parsing library is available under the MIT license. You are free to use this library, copy it, modify it, publish it, sell it, whatever. For more information see the enclosed LICENSE file.