[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
PPP Port: Cannot set gateway address
From: |
Daniel E Baumann |
Subject: |
PPP Port: Cannot set gateway address |
Date: |
Sat, 3 Mar 2001 17:08:34 -0600 |
User-agent: |
Mutt/1.3.15i |
O.K., I have been debuggin this thing here. For sdome reason though when I
try to set the gateway programatically it doesn't like it and my error
message is displayed, as shown here in this snippet:
int result = 1;
error_t err;
/* The file we use as a handle to get FSYS. */
char *node_name;
file_t node;
/* The filesystem we're passing options to. */
fsys_t fsys;
char opt[sizeof("--gateway=xxx.xxx.xxx.xxx")] = "--gateway=";
strcat(opt, inet_ntoa(gateway));
asprintf(&node_name, _SERVERS_SOCKET_PFINET);
node = file_name_lookup (node_name, 0, 0666);
if (node == MACH_PORT_NULL)
{
log_Printf(LogERROR, "HURD: Can't open port to pfinet server,
file_name_lookup
failed with
%s.\n", strerror(errno));
error (1, errno, "%s", node_name);
}
/* Get the filesystem for NODE. */
err = file_getcontrol (node, &fsys);
if (err)
{
log_Printf(LogERROR, "HURD: Can't get the filesystem for node %s.",
node_name);
error (2, err, "%s", node_name);
}
err = fsys_set_options (fsys, opt, 1, 1);
if (err)
{
log_Printf(LogERROR, "HURD: Failed to set option %s for node %s.", opt,
node_name);
error(5, err, "%s: %s", node_name, opt);
}
I get Error: HURD: Failed to set option --gateway=10.0.0.2 for node
/servers/socket/2.
It pulls that IP from the config file. Shouldn't ths work? Shouldn't I be able
to set
the gateway? I do not see what is wrong here. Anyone have any ideas?
Dan
--
Daniel E Baumann baumannd@msoe.edu
Web location: http://www.msoe.edu/~baumannd
"Life would be so much easier if we could just look at the source code."
-- Dave Olsen
And if cynics ridicule freedom, ridicule community...if ``hard nosed
realists'' say that profit is the only ideal...just ignore them, and use
copyleft all the same.
-- RMS
- PPP Port: Cannot set gateway address,
Daniel E Baumann <=