-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added C.pcap_set_rfmon in pcap.go #23
Open
pressure679
wants to merge
71
commits into
akrennmair:master
Choose a base branch
from
miekg:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(though it doesn't seem to work)
(this makes it work on my mac; I've no idea what it really does)
Make tcpdump tool work
Fix caplen field in io.go writer.Write()
Fixing example convention typo
- Checks if IP Header length is valid - Checks that TCP Data Offset is valid - Checks if payload is long enough to decode upper layer
Easy DoS with malicious packets
- pcap_create - pcap_activate - pcap_set_buffer_size - pcap_set_promisc - pcap_timeout - pcap_set_snaplen
Pcap api additions
Delted return in PcapDump, PcapDumpClose Fixed return value name and error handling in PcapDumpFlush
Added pcap dump functions which save packets as pcap file
…ssues in pcaptest.go
Changed FindAllDevs to return error object instead of string.
Fix FindAllDevs error handling in tcpdump sample
…o tcp header options
Tcphdr Data Member not written
Show what '-X' means.
Small change to usage printout
add protection for invalid header
- e.g. 'identifier "_Ctype_struct_pcap_stat" may conflict with identifiers generated by cgo' and 'Sprintf call needs 2 args but has 3 args' - also adds a 'break' in tests since pcap Next() seems to ignore read timeout on my system after all packets have been read (Linux) - the-tcpdump-group/libpcap#550
Fix compile errors on later go versions
Signed-off-by: Miek Gieben <[email protected]>
Signed-off-by: Miek Gieben <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After line 504, func (p *InactiveHandle) SetPromisc(promisc bool) error I added a function from libpcap to set handle in "radio frequency monitor mode". - Here's the code:
// SetRFMon sets handle to be in radio frequency monitor.
// (capture packets indepenedently from network)
func (p *InactiveHandle) SetRFMon(monitor bool) error {
var mon C.int
if monitor {
mon = 1
}
if status := C.pcap_set_rfmon(p.cptr, mon); status < 0 {
return statusError(status)
}
return nil
}
This is my first pull request, might be wrong way to do it.