* Made defines out of the kNetServerSignature and kMsgConfigureInterface
constants - they are used in other apps as well, and defining them as "static const" causes undefined warnings in other source files. This also fixes the build. * Changed "interfaces::auto config" to auto_config, as that's more convenient to use in the settings files. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32321 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
399d690252
commit
73a1a46de9
@ -762,7 +762,7 @@ configure_interface(int socket, const char* name, char* const* args,
|
||||
message.AddString("device", name);
|
||||
BMessage address;
|
||||
address.AddString("family", "inet");
|
||||
address.AddBool("auto config", true);
|
||||
address.AddBool("auto_config", true);
|
||||
message.AddMessage("address", &address);
|
||||
|
||||
BMessenger networkServer(kNetServerSignature);
|
||||
|
@ -449,7 +449,7 @@ EthernetSettingsView::_TriggerAutoConfig(const char* device)
|
||||
message.AddString("device", device);
|
||||
BMessage address;
|
||||
address.AddString("family", "inet");
|
||||
address.AddBool("auto config", true);
|
||||
address.AddBool("auto_config", true);
|
||||
message.AddMessage("address", &address);
|
||||
|
||||
BMessage reply;
|
||||
|
@ -81,9 +81,6 @@ struct address_family {
|
||||
};
|
||||
|
||||
|
||||
const char* kNetServerSignature = "application/x-vnd.haiku-net_server";
|
||||
|
||||
|
||||
// AF_INET family
|
||||
static bool inet_parse_address(const char* string, sockaddr* address);
|
||||
static void inet_set_any_address(sockaddr* address);
|
||||
@ -559,7 +556,7 @@ NetServer::_ConfigureInterface(int socket, BMessage& interface,
|
||||
// retrieve addresses
|
||||
|
||||
bool autoConfig;
|
||||
if (addressMessage.FindBool("auto config", &autoConfig) != B_OK)
|
||||
if (addressMessage.FindBool("auto_config", &autoConfig) != B_OK)
|
||||
autoConfig = false;
|
||||
#if 0
|
||||
if (autoConfig && fromMessage) {
|
||||
@ -731,7 +728,7 @@ NetServer::_ConfigureDevice(int socket, const char* path)
|
||||
interface.AddString("device", path);
|
||||
BMessage address;
|
||||
address.AddString("family", "inet");
|
||||
address.AddBool("auto config", true);
|
||||
address.AddBool("auto_config", true);
|
||||
interface.AddMessage("address", &address);
|
||||
|
||||
return _ConfigureInterface(socket, interface);
|
||||
|
@ -14,9 +14,10 @@
|
||||
#include <net/if.h>
|
||||
|
||||
|
||||
extern const char* kNetServerSignature;
|
||||
|
||||
static const uint32 kMsgConfigureInterface = 'COif';
|
||||
// NOTE: this header is used by other applications (such as ifconfig,
|
||||
// and Network) because of these two defines
|
||||
#define kNetServerSignature "application/x-vnd.haiku-net_server"
|
||||
#define kMsgConfigureInterface 'COif'
|
||||
|
||||
|
||||
extern bool get_family_index(const char* name, int32& familyIndex);
|
||||
|
@ -36,7 +36,7 @@ const static settings_template kInterfaceAddressTemplate[] = {
|
||||
{B_STRING_TYPE, "peer", NULL},
|
||||
{B_STRING_TYPE, "broadcast", NULL},
|
||||
{B_STRING_TYPE, "gateway", NULL},
|
||||
{B_BOOL_TYPE, "auto config", NULL},
|
||||
{B_BOOL_TYPE, "auto_config", NULL},
|
||||
{0, NULL, NULL}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user