Comments (17)
BTW, why not to move client for separate package? I just removed file client.go from repo in order to compile server code.
This is actually something I've considered in the past, splitting client and server from protocol parsing. The library structure wold become a bit more fragmented but I can try and see if it doesn't look too bad.
from dhcp.
cc @get9
from dhcp.
I'm fine with that; this package should be reserved for dhcp library code. We can have a separate one for sample clients that's a consumer of this code.
Do we have CI set up for mac builds of this library?
from dhcp.
Compiling for FreeBSD I ran into the same thing.
from dhcp.
I'm fine with that; this package should be reserved for dhcp library code. We can have a separate one for sample clients that's a consumer of this code.
I think what @begetan meant was to split out client.go and server.go in a separate package, correct me if I'm wrong. As per the sample client, there is a working (yet not full-featured) dhclient implementation in the examples repo, https://github.com/insomniacslk/exdhcp/blob/master/dhclient/main.go
Do we have CI set up for mac builds of this library?
No, the tests are linux-only. We would just need an os
section in .travis.yml
, like this, https://github.com/insomniacslk/dublin-traceroute/blob/master/.travis.yml#L20. I will add it today,
from dhcp.
This is the PR that broke the build, http://github.com/insomniacslk/dhcp/pull/198 (not the commit mentioned above). AF_PACKET was introduced to deal with unconfigured interfaces, which is fundamental for a DHCP client to work, but AF_PACKET is Linux-specific. I'll work on a fix for darwin/freebsd
from dhcp.
Quick search: https://stackoverflow.com/questions/17169298/af-packet-on-osx
EDIT: this doesn't help as it basically recommends to go back to L3 sockets and wouldn't work on unconfigured interfaces
from dhcp.
If I'm reading it right, dhclient in FreeBSD uses... BPF, https://github.com/freebsd/freebsd/blob/master/sbin/dhclient/bpf.c#L100 . Basically like running tcpdump
from dhcp.
I think what @begetan meant was to split out client.go and server.go in a separate package, correct me if I'm wrong.
Exactly! That packages can handle network specific stuff (like this case) so people can manage which component of the library they actually need.
from dhcp.
Tracked at #231
from dhcp.
Should we close this one after PR #241? cc @begetan
from dhcp.
not really - the build still fails on darwin. Just not a hi-pri at the moment
from dhcp.
@pmazzini
This PR makes library indpendent from client code and usable on Darwin/BSD, but client code not compiled yet. It should be fixed one day.
from dhcp.
Any update yet on being able to use the client on non-linux (eg darwin) ?
from dhcp.
PRs are welcomed. There is even a patch that needs testing in #378 (comment).
from dhcp.
Related:
The main package should compile now and the nclient code should be usable.
from dhcp.
The client code was moved to a separate package since. I am leaving #318 for OSX related support.
from dhcp.
Related Issues (20)
- No support for non-apple boot menus? HOT 10
- can you release a version? HOT 5
- Merge insomniacslk/exdhcp into dhcp/examples
- dhcpv4: Where is method `NewOffer` HOT 1
- how to create a dhcp4 server and assign IP address to clients based on subnetmask? HOT 4
- dhcpv4 malformed packet HOT 3
- Existing check that c.ifaceHWAddr == msg.ClientHWAddr HOT 2
- Implement NewIPv6UDPConn for Windows HOT 1
- Construction of offer message by DHCP server HOT 1
- panic parsing UDP packet HOT 2
- Why are we sorting options during Marshal ? HOT 1
- DHCP Options to support RFC8572 SZTP HOT 2
- RFC 1035 Labels: Support Partial Domain Names as per RFC 4704 Section 4.2 HOT 1
- Panic on DiscoverOffer HOT 1
- Writing a DHCPv4 server on Windows. Is it supported? HOT 7
- OptClientArchType does not get the arch field value HOT 3
- IsOptionRequested does not work with GenericOptionCode HOT 4
- 2 byte code length
- Support Windows HOT 3
- Rapid Solicit not working HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dhcp.