replace space or : with / in agent.circuit-id

Abdul Khader akhader at gmail.com
Mon Feb 9 13:58:46 UTC 2015


Dear All,
Is it possible to replace the ":" or " " characters with "/" in
the agent.circuit-id on the ISC dhcpd 4.2.3-P2 server side.

For example if the following is received.

http://192.168.1.21:8080/server/axs/ger-tld xpon 0/6/0/15:2.90.1101

I want to replace the spaces and ":" with "/" so that it looks like below

http://192.168.1.21:8080/server/axs/ger-tld/xpon/0/6/0/15/2.90.1101

My current config is like below.


 if exists agent.circuit-id
                {
                        option vendor-encapsulated-options = concat
("\x01\x64http://192.168.1.21:8080/server/axs/ger-tld/",(option
agent.remote-id),(option agent.circuit-id));
                }
                if not exists agent.circuit-id
                {
                        option vendor-encapsulated-options "\x01\x39
http://192.168.1.21:8080/server/axs/ger-tld/";
                }

I want to add the logic to replace spaces and ":" with "/" character.

Your help is highly appreciated.


Regards
Abdul Khader
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20150209/a38f7399/attachment.html>


More information about the dhcp-users mailing list