flan / staticdhcpd

A fast, light, extremely customisable DHCP server written in Python
GNU General Public License v3.0
123 stars 42 forks source link

adding extentions #78

Closed JOELEJAUNE closed 3 years ago

JOELEJAUNE commented 6 years ago

hello ,

hope all is good at your side.

i'm working on adding some lines of code that i want to execute whenever the DHCPdiscover message reaches the staticDHCP Server.

any idea that could help me would be appreciated.

thanks & regards

flan commented 6 years ago

If you want to react as soon as DISCOVER is received, you'll want to look at filterPacket(): http://static.uguu.ca/projects/staticDHCPd/doc/customisation/scripting.html#filterpacket

Drop a snippet like what's in the example below, with an if method == "DISCOVER":-like check, into conf.py and it should work.

JOELEJAUNE commented 6 years ago

Good evening sir,

Thanks a lot for your fast reply. I will start working on this.

Regards

Le mar. 31 juil. 2018 20:18, Neil Tallim notifications@github.com a écrit :

If you want to react as soon as DISCOVER is received, you'll want to look at filterPacket(): http://static.uguu.ca/projects/staticDHCPd/doc/customisation/scripting.html#filterpacket

Drop a snippet like what's in the example below, with an if method == "DISCOVER":-like check, into conf.py and it should work.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/flan/staticdhcpd/issues/78#issuecomment-409336641, or mute the thread https://github.com/notifications/unsubscribe-auth/AhQXPhsIvhu2hG5rv0rR2fbzzNHWSeXfks5uMK2CgaJpZM4Vo6ra .