{"id":16189166,"url":"https://github.com/jhermsmeier/node-net-dhcp","last_synced_at":"2025-08-18T01:37:43.355Z","repository":{"id":57310212,"uuid":"189729248","full_name":"jhermsmeier/node-net-dhcp","owner":"jhermsmeier","description":"Dynamic Host Configuration Protocol (DHCP)","archived":false,"fork":false,"pushed_at":"2019-10-05T09:46:47.000Z","size":41,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-26T15:21:53.907Z","etag":null,"topics":["dhcp","dhcp-client","dhcp-server","network"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jhermsmeier.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-01T12:17:48.000Z","updated_at":"2019-10-05T09:46:49.000Z","dependencies_parsed_at":"2022-09-07T20:20:50.923Z","dependency_job_id":null,"html_url":"https://github.com/jhermsmeier/node-net-dhcp","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhermsmeier%2Fnode-net-dhcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhermsmeier%2Fnode-net-dhcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhermsmeier%2Fnode-net-dhcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhermsmeier%2Fnode-net-dhcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jhermsmeier","download_url":"https://codeload.github.com/jhermsmeier/node-net-dhcp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247666011,"owners_count":20975787,"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":["dhcp","dhcp-client","dhcp-server","network"],"created_at":"2024-10-10T07:34:22.321Z","updated_at":"2025-04-07T13:47:57.600Z","avatar_url":"https://github.com/jhermsmeier.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DHCP\n[![npm](https://flat.badgen.net/npm/v/net-dhcp)](https://npmjs.com/package/net-dhcp)\n[![npm license](https://flat.badgen.net/npm/license/net-dhcp)](https://npmjs.com/package/net-dhcp)\n[![npm downloads](https://flat.badgen.net/npm/dm/net-dhcp)](https://npmjs.com/package/net-dhcp)\n[![build status](https://flat.badgen.net/travis/jhermsmeier/node-net-dhcp/master)](https://travis-ci.org/jhermsmeier/node-net-dhcp)\n\nDynamic Host Configuration Protocol (DHCP)\n\n## Install via [npm](https://npmjs.com)\n\n```sh\n$ npm install --save net-dhcp\n```\n\n----------\n\n**NOTE:** This is still a work-in-progress; only message receipt and parsing is implemented at the time. The plan is to arrive at a fully functioning DHCP client \u0026 server implementation.\n\n----------\n\n## Examples\n\n- `example/monitor`: Monitor the network for DHCP messages\n\n## Usage\n\n```js\nvar DHCP = require( 'net-dhcp' )\n```\n\n### Client\n\n```js\nvar client = new DHCP.Client()\n\nclient.on( 'error', ( error ) =\u003e {\n  console.log( error )\n})\n\nclient.on( 'message', ( message, rinfo ) =\u003e {\n  console.log( 'Message from', rinfo, message )\n})\n\nclient.on( 'listening', ( socket ) =\u003e {\n  console.log( 'Listening on', socket.address() )\n})\n\nclient.listen()\n```\n\n### Server\n\n```js\nvar server = new DHCP.Server()\n\nserver.on( 'error', ( error ) =\u003e {\n  console.error( '[ERROR]', error )\n})\n\n// Warnings are emitted if a received packet could not be decoded\nserver.on( 'warning', ( error, rinfo, rawMessage ) =\u003e {\n  console.error( '[WARN]', rinfo, error )\n})\n\nserver.on( 'message', ( message, rinfo ) =\u003e {\n  console.log( 'Client message from', rinfo, message )\n})\n\nserver.on( 'listening', ( socket ) =\u003e {\n  console.log( 'Server listening on', socket.address() )\n})\n\nserver.listen()\n```\n\n## References\n\n- [RFC 951 / BOOTSTRAP PROTOCOL (BOOTP)](https://tools.ietf.org/html/rfc951)\n- [RFC 1542 / Clarifications and Extensions for the Bootstrap Protocol](https://tools.ietf.org/html/rfc1542)\n- [RFC 2131 / Dynamic Host Configuration Protocol](https://tools.ietf.org/html/rfc2131)\n- [RFC 2132 / DHCP Options and BOOTP Vendor Extensions](https://tools.ietf.org/html/rfc2132)\n- [RFC 3046 / DHCP Relay Agent Information Option](https://tools.ietf.org/html/rfc3046)\n- [RFC 3396 / Encoding Long Options in the Dynamic Host Configuration Protocol (DHCPv4)](https://tools.ietf.org/html/rfc3396)\n- [RFC 3397 / Dynamic Host Configuration Protocol (DHCP) Domain Search Option](https://tools.ietf.org/html/rfc3397)\n- [RFC 4436 / Detecting Network Attachment in IPv4 (DNAv4)](https://tools.ietf.org/html/rfc4436)\n- [RFC 6607 / Virtual Subnet Selection Options for DHCPv4 and DHCPv6](https://tools.ietf.org/html/rfc6607)\n- [RFC 6842 / Client Identifier Option in DHCP Server Replies](https://tools.ietf.org/html/rfc6842)\n- [RFC 8415 / Dynamic Host Configuration Protocol for IPv6 (DHCPv6)](https://tools.ietf.org/html/rfc8415)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhermsmeier%2Fnode-net-dhcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjhermsmeier%2Fnode-net-dhcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhermsmeier%2Fnode-net-dhcp/lists"}