Skip to content
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

x/net/ether: create package that supports raw ethernet sockets #8432

Open
gopherbot opened this issue Jul 27, 2014 · 8 comments

Comments

@gopherbot
Copy link

commented Jul 27, 2014

by nathan@nathan.io:

It would be useful if Go supported raw ethernet sockets. It is indicated that this was
planned in a TODO on net.go: 
// TODO(rsc):
//  support for raw ethernet sockets

Is this still planned? 

Thanks!
@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Jul 28, 2014

Comment 1:

Might be something for the go.net repository if it is not already there.

Labels changed: added repo-main, release-none.

@gopherbot

This comment has been minimized.

Copy link
Author

commented Jul 28, 2014

Comment 2 by nathan@nathan.io:

It is not currently in go.net, do they have a separate issue tracker?
@adg

This comment has been minimized.

Copy link
Contributor

commented Jul 28, 2014

Comment 3:

Nope, it's the same issue tracker.

@gopherbot gopherbot added new labels Jul 28, 2014

@bradfitz bradfitz removed the new label Dec 18, 2014

@mikioh mikioh changed the title net: Support for raw ethernet sockets ether: create package that supports raw ethernet sockets Feb 4, 2015

mikioh pushed a commit that referenced this issue Feb 4, 2015
Mikio Hara
net: update TDDO
The issue #8432 has been marked as an issue for golang.org/x/net.

Change-Id: Ia39abd99b685c820ea6169ee6505b16028e7e77f
Reviewed-on: https://go-review.googlesource.com/3836
Reviewed-by: Ian Lance Taylor <iant@golang.org>

@rsc rsc added this to the Unplanned milestone Apr 10, 2015

@rsc rsc changed the title ether: create package that supports raw ethernet sockets x/net/ether: create package that supports raw ethernet sockets Apr 14, 2015

@rsc rsc modified the milestones: Unreleased, Unplanned Apr 14, 2015

@rsc rsc removed the repo-net label Apr 14, 2015

@r-medina

This comment has been minimized.

Copy link

commented May 14, 2015

hey what's the deal with this?

i have a relatively shallow knowledge of the issue, but i've been reading through net stuff and have a few questions:

  1. how different should the design of raw ethernet sockets be from stuff in net like UnixConn (since there would be no netFD, for example)?
  2. what type of api/functionality do we want to expose for this?
@mikioh

This comment has been minimized.

Copy link
Contributor

commented May 14, 2015

I think it would be nice if this package provides well-cooked APIs that wrap various platform-dependent stuff such as BPF/eBPF, Netmap, PF_RING, AF_PACKET, DPDK, blah blah appropriately. Also it's nice if the package can work together with runtime-integrated network poller seamleslly. I have no clue on the API surface, it might not be so differnet from net.Conn/PacketConn, perhaps, not sure.

@mdlayher

This comment has been minimized.

Copy link
Member

commented Jul 24, 2015

In lieu of an official package that provides this functionality, I hacked together something that works decently on Linux for the time being: https://github.com/mdlayher/raw. My use case is building ethernet frames and ARP packets to send and receive ARP data in a fashion similar to net/http.

I would love to team up with others who are more familiar with system calls and facilities of other platforms to create a solid x/net/ether package or similar. Here's hoping that #10565 is resolved for Go 1.6 so we can also take advantage of the runtime network poller.

@amaitra

This comment has been minimized.

Copy link

commented Aug 14, 2015

What kind of help do you need? I am new to go but extensive expertise in C and routing software.

@almikhayl

This comment has been minimized.

Copy link

commented Jan 5, 2016

I've also tried to add some link layer sockets functionality to standard library. Disclaimer: not an expert neither in go, nor in sockets programming. May be someone searching for raw ethernet packets functionality in go and landed here finds it interesting: https://bitbucket.org/almikhayl/go/commits/f49276912194858b9741a905e5ab7a44e40e394f .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
10 participants
You can’t perform that action at this time.