Giter Club home page Giter Club logo

q-dhcp-client's Introduction

q-dhcp-client

Compilation:
DEBUG_DIR_PATH - path to dir where .bin files will be created in -d mode
ARP_ROUTER - added solely for test purpose, it will force client to do ARP request not to requested ip, but to ip of router
This will result in receiving IP_OCCUPIER

Installing:
1)Edit Makefile to satisfy your requirements and tools
2)Execute `make`
3)If you want - you can do `make check`, but read warning
Install in any place by moving/copying ./q-dhcp-client

Usage options:
-d - show debug info
-i <interface name> - specify interface to work with
--dry - do not edit interface ip, mask and routes
--arp-check - perform arp check after receiving DHCP_OFFER
send DHCP_DECLINE if dhcp client receives ARP_REPLY
--release - send DHCP_RELEASE to free current ip
--no-debug-files - do not create .bin debug files when -d option used

Return codes:
0 - OK
-1 - Internal error
-2 - IP already occupied or got DHCP_NAK
Always prints IP:NETMASK:GATEWAY IP:LEASE TIME(s), so you can parse it with `cut`

Examples:
#Get ip addr, perform arp check
#Set ip addr, net mask and default route for device eth0 if ip is free
q-dhcp-client -i eth0 --arp-check

#Get ip and set ip, mask and route
q-dhcp-client -i eth0

#Send DHCP_RELEASE and delete ip addr from device
q-dhcp-client -i eth0 --release

#Get ip(without setting it in device) and print debug info
q-dhcp-client -i eth0 --dry -d


I use it for my LFS build with runit

q-dhcp-client's People

Contributors

qwaszx000 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.