Applications using a DHCP configured interface

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Applications using a DHCP configured interface

ソリューションへジャンプ
1,796件の閲覧回数
w2vy
Contributor V

If I have server applications running that are listening

 

// Start Server srvr = socket(PF_INET, SOCK_STREAM, 0); /* Bind the socket to the port */ any.sin_family      = AF_INET; any.sin_port        = 80; any.sin_addr.s_addr = INADDR_ANY; bind(srvr, &any, sizeof(any)); listen(srvr, 0);

 

Will this server continue to run properly if the interface is moved from one LAN to another and the IP address assigned by DHCP changes?

 

What is the right way to re-activate DHCP when the cable is re-interted?

 

tom

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
884件の閲覧回数
w2vy
Contributor V

FYI I ended up polling the link state with

ipcfg_get_link_active(IPCFG_default_enet_device)

 

and when the link went away, I would unbind the old IP and reenable DHCP to get the new IP

 

tom

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
885件の閲覧回数
w2vy
Contributor V

FYI I ended up polling the link state with

ipcfg_get_link_active(IPCFG_default_enet_device)

 

and when the link went away, I would unbind the old IP and reenable DHCP to get the new IP

 

tom

0 件の賞賛
返信