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

Implement connectioncontext/ethernetcontext/macaddress #33

Open
edwarnicke opened this issue Dec 2, 2020 · 0 comments
Open

Implement connectioncontext/ethernetcontext/macaddress #33

edwarnicke opened this issue Dec 2, 2020 · 0 comments
Labels
good first issue Good for newcomers

Comments

@edwarnicke
Copy link
Member

edwarnicke commented Dec 2, 2020

The Connection.ConnnectionContext.EthernetContext allows the NSE to specify the Source and Dest Mac address.

When the Client or NSE are vpp, there need to be chain elements to set the mac address on the interface connected for that connection (no matter its mechanism).

This is in direct analogy to the already existing connectioncontext/ipcontext/ipaddress.

Helpful notes for implementation:

  1. SwInterfaceSetMacAddress allows you to set the mac address for a vpp interface using its swIfIndex
  2. You can retrieve the swIfIndex set by the mechanism chain elements using ifindex.Load. Example of Use.
  3. Use types.ToVPPMacAddress to convert net.HardwareAddr to the govpp ethernet_types.MacAddress
  4. Once implemented, please add to the connectioncontext/client.go and connectioncontext/server.go.

Running end to end can be done using cmd-forwarder-vpp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant