Files
haiku-beta6/headers/private/net/NetServer.h
T
Augustin Cavalier 39c7c29e69 net_server: Run DHCP negotiation on a separate thread to fix hangs.
Previously we ran DHCP negotiation on the looper thread. This meant
that we just blocked it for long periods of time, which stopped
configuration settings changes from working properly, and causing
the Network preferences panel to hang when net_server failed to
respond to its messages.

Now, we spawn a separate thread to do the real work on, and unlock
the looper around the recvfrom() with long timeouts. There's now a
kMsgAutoConfigureFailed that is sent when auto-configuration fails,
so that the AutoconfigLooper can fallback as before. Additionally,
the main NetServer class quits loopers for devices on any configuration
change, rather than deferring it unecessarily (and possibly wrongly, in
some cases.)

Fixes #18037. Probably fixes #17300 and may help with others.
2025-11-27 14:30:54 -05:00

28 lines
736 B
C

/*
* Copyright 2006-2015, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Axel Dörfler, [email protected]
*/
#ifndef _NET_SERVER_H
#define _NET_SERVER_H
#define kNetServerSignature "application/x-vnd.haiku-net_server"
#define kMsgConfigureInterface 'COif'
#define kMsgAutoConfigureFailed 'COaf'
#define kMsgConfigureResolver 'COrs'
#define kMsgCountPersistentNetworks 'CPnw'
#define kMsgGetPersistentNetwork 'GPnw'
#define kMsgAddPersistentNetwork 'APnw'
#define kMsgRemovePersistentNetwork 'RPnw'
#define kMsgJoinNetwork 'JNnw'
#define kMsgLeaveNetwork 'LVnw'
#define kMsgAutoJoinNetwork 'AJnw'
#define kMsgIsServiceRunning 'IRsv'
#endif // _NET_SERVER_H