{"id":17645181,"url":"https://github.com/dechristopher/dhcp-client","last_synced_at":"2025-05-07T05:01:42.189Z","repository":{"id":96941895,"uuid":"254231964","full_name":"dechristopher/dhcp-client","owner":"dechristopher","description":"Reference DHCP client in go","archived":false,"fork":false,"pushed_at":"2024-07-01T02:09:15.000Z","size":442,"stargazers_count":10,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-31T06:32:08.515Z","etag":null,"topics":["client","dhcp","golang","reference"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dechristopher.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-09T00:28:45.000Z","updated_at":"2024-12-27T12:43:58.000Z","dependencies_parsed_at":"2025-03-12T04:00:18.499Z","dependency_job_id":null,"html_url":"https://github.com/dechristopher/dhcp-client","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dechristopher%2Fdhcp-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dechristopher%2Fdhcp-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dechristopher%2Fdhcp-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dechristopher%2Fdhcp-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dechristopher","download_url":"https://codeload.github.com/dechristopher/dhcp-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252816937,"owners_count":21808704,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["client","dhcp","golang","reference"],"created_at":"2024-10-23T10:53:30.184Z","updated_at":"2025-05-07T05:01:42.139Z","avatar_url":"https://github.com/dechristopher.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Golang DHCP Client Demonstration\n\nA toy golang DHCP client to explore the DHCP protocol.\nRandomizes request MAC address as to not step on the same lease over and over.\n\n## Usage\n```bash\n./compile.sh\n./toydhcp [-ip4 address]\n```\n\n## Outline\n- [DHCP Protocol Diagram](#dhcp-protocol-diagram)\n- [DHCP Packet Sequence](#dhcp-packet-sequence)\n    1. [DISCOVER](#discover)\n    2. [OFFER](#offer)\n    3. [REQUEST](#request)\n    4. [(N)ACKNOWLEDGE](#nacknowledge)\n- [DHCP Option Codes](#dhcp-option-codes)\n- [Additional Reading](#additional-reading)\n\n## DHCP Protocol Diagram\n\n![flow](img/flow.png)  \nWikipedia - Gelmo96 / CC BY-SA (https://creativecommons.org/licenses/by-sa/4.0)\n\n## DHCP Packet Sequence\n\n#### DISCOVER\n![discover](img/discover.png)\n\n#### OFFER\n![offer](img/offer.png)\n\n#### REQUEST\n![request](img/request.png)\n\n#### (N)ACKNOWLEDGE\n![acknowledge](img/ack.png)\n\n## DHCP Option Codes\nA small selection of important DHCP Option Codes\n- *53* - DHCP Message Type (1B) - Indicates the specific type of DHCP message: DISCOVER(1), OFFER(2), REQUEST(3), DECLINE(4), ACK(5), NACK(6), RELEASE(7), INFORM(8)\n- *50* - Requested IP Address (4B)\n- *54* - DHCP Server Address (4B)\n- *51* - Lease Time in Seconds (4B)\n- *3* - Router IP Address (4B)\n- *1* - Network Subnet Mask (4B)\n- *255* - End Mark (1B)\n\n## Additional Reading\n[Wikipedia.org - DHCP](https://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol)   \n[The TCP/IP Guide - DHCP Options](http://www.tcpipguide.com/free/t_SummaryOfDHCPOptionsBOOTPVendorInformationFields-2.htm)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdechristopher%2Fdhcp-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdechristopher%2Fdhcp-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdechristopher%2Fdhcp-client/lists"}