How to send a DHCP request for vpnclient on Linux

Post your questions about SoftEther VPN software here. Please answer questions if you can afford.
Post Reply
zedyasuo
Posts: 11
Joined: Mon May 11, 2020 7:42 am

How to send a DHCP request for vpnclient on Linux

Post by zedyasuo » Mon Jul 13, 2020 5:41 am

Hi, guys.
I'm developing a GUI of vpnclient on the platform of Linux, as there is no GUI of Client on Linux now.
I refer to the source code of vpnclient and vpnserver.
Now I meet a Problem: I don't know how to make a DHCP request for my client virtual LAN card.

I notice that function 'VirtualDhcpSend' in 'src/Cedar/Virtual.c' and vpnserver uses this function to send a DHCP OFFER/ACK/NACK response to client.
I try to use this function for my 'Client GUI' to send a DHCP DISCOVER/REQUEST to the vpnserver, but I don't know how to Specify the first parameter of the function 'VirtualDhcpSend'.
Here is the function declaration:
void VirtualDhcpSend(VH *v, UINT tran_id, UINT dest_ip, UINT dest_port,UINT new_ip, UCHAR *client_mac, BUF *b, UINT hw_type, UINT hw_addr_size);

Anybody knows the relationship or difference between 'VH(virtual host) and VLAN(virtual lan)' and how to specify first parameter of 'VirtualDhcpSend' for my 'Client GUI'?
In addition, if 'VirtualDhcpSend' is not a proper way for DHCP, Could you tell me how to send a DHCP DISCOVER/REQUEST for my 'Client GUI'?
Thank you very much!!!

zedyasuo
Posts: 11
Joined: Mon May 11, 2020 7:42 am

Re: How to send a DHCP request for vpnclient on Linux

Post by zedyasuo » Tue Jul 14, 2020 5:37 am

I find a function 'IPCSendDhcpRequest' in 'src/Cedar/IPsec_IPC.c' used by IPsec.
Can I use this function to send my DHCP DISCOVER/REQUEST for my 'Client GUI'?

Is there anyone that knows this ?
I'll very thank you if I get your reply.
Thank you!!!

Post Reply