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

dhcp4: Packet.TransactionID as slice or array of bytes #59

Closed
mdlayher opened this issue Feb 1, 2018 · 2 comments
Closed

dhcp4: Packet.TransactionID as slice or array of bytes #59

mdlayher opened this issue Feb 1, 2018 · 2 comments
Labels

Comments

@mdlayher
Copy link
Contributor

mdlayher commented Feb 1, 2018

Hello! From what I can tell, it's not uncommon for transaction IDs to end up as unfriendly strings: TransactionID:_�37

Is there a reason that transaction ID can't be either [4]byte or just []byte instead? As of now, I'm doing hex.EncodeToString([]byte(req.TransactionID)) to get a printable transaction ID.

Thanks again for the package!

@danderson
Copy link
Owner

Yeah, I'm not sure what I was thinking with that decision. []byte seems much more plausible ([4]byte is a bit icky to work with). Send a PR?

@danderson danderson added the bug label Feb 3, 2018
@mdlayher
Copy link
Contributor Author

mdlayher commented Feb 3, 2018

Can do. If you'd prefer, I could also just hex encode the bytes directly and retain the string field.

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

No branches or pull requests

2 participants