Remove support for RFC868 Time Server options. Totally obsolete, and
ifchd just had empty hooks that never received work messages anyway. Shorten the names of ifchd commands. This breaks wire protocol, but thankfully I haven't released yet!
This commit is contained in:
19
ifchd/ifch_proto.h
Normal file
19
ifchd/ifch_proto.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef NJK_IFCH_PROTO_H__
|
||||
#define NJK_IFCH_PROTO_H__ 1
|
||||
|
||||
#define CMD_INTERFACE "iface"
|
||||
#define CMD_IP "ip"
|
||||
#define CMD_SUBNET "snet"
|
||||
#define CMD_TIMEZONE "tzone"
|
||||
#define CMD_ROUTER "routr"
|
||||
#define CMD_DNS "dns"
|
||||
#define CMD_LPRSVR "lpr"
|
||||
#define CMD_HOSTNAME "host"
|
||||
#define CMD_DOMAIN "dom"
|
||||
#define CMD_IPTTL "ipttl"
|
||||
#define CMD_MTU "mtu"
|
||||
#define CMD_BROADCAST "bcast"
|
||||
#define CMD_NTPSVR "ntp"
|
||||
#define CMD_WINS "wins"
|
||||
|
||||
#endif
|
||||
@@ -68,7 +68,6 @@ enum states {
|
||||
STATE_SUBNET,
|
||||
STATE_TIMEZONE,
|
||||
STATE_ROUTER,
|
||||
STATE_TIMESVR,
|
||||
STATE_DNS,
|
||||
STATE_LPRSVR,
|
||||
STATE_HOSTNAME,
|
||||
@@ -246,10 +245,6 @@ static void parse_list(int idx, char *str, strlist_t **toplist,
|
||||
static void perform_timezone(int idx, char *str)
|
||||
{}
|
||||
|
||||
/* Does anyone use this command? */
|
||||
static void perform_timesvr(int idx, char *str)
|
||||
{}
|
||||
|
||||
/* Add a dns server to the /etc/resolv.conf -- we already have a fd. */
|
||||
static void perform_dns(int idx, char *str)
|
||||
{
|
||||
@@ -403,8 +398,6 @@ static void execute_list(int i)
|
||||
state[i] = STATE_TIMEZONE;
|
||||
if (strncmp(p, CMD_ROUTER, sizeof(CMD_ROUTER)) == 0)
|
||||
state[i] = STATE_ROUTER;
|
||||
if (strncmp(p, CMD_TIMESVR, sizeof(CMD_TIMESVR)) == 0)
|
||||
state[i] = STATE_TIMESVR;
|
||||
if (strncmp(p, CMD_DNS, sizeof(CMD_DNS)) == 0)
|
||||
state[i] = STATE_DNS;
|
||||
if (strncmp(p, CMD_LPRSVR, sizeof(CMD_LPRSVR)) == 0)
|
||||
@@ -456,12 +449,6 @@ static void execute_list(int i)
|
||||
state[i] = STATE_NOTHING;
|
||||
break;
|
||||
|
||||
case STATE_TIMESVR:
|
||||
perform_timesvr(i, p);
|
||||
free_stritem(&(curl[i]));
|
||||
state[i] = STATE_NOTHING;
|
||||
break;
|
||||
|
||||
case STATE_DNS:
|
||||
perform_dns(i, p);
|
||||
free_stritem(&(curl[i]));
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
#ifndef NJK_IFPROTO_H__
|
||||
#define NJK_IFPROTO_H__ 1
|
||||
|
||||
#define CMD_INTERFACE "interface"
|
||||
#define CMD_IP "ip"
|
||||
#define CMD_SUBNET "subnet"
|
||||
#define CMD_TIMEZONE "timezone"
|
||||
#define CMD_ROUTER "router"
|
||||
#define CMD_TIMESVR "timesvr"
|
||||
#define CMD_DNS "dns"
|
||||
#define CMD_LPRSVR "lprsvr"
|
||||
#define CMD_HOSTNAME "hostname"
|
||||
#define CMD_DOMAIN "domain"
|
||||
#define CMD_IPTTL "ipttl"
|
||||
#define CMD_MTU "mtu"
|
||||
#define CMD_BROADCAST "broadcast"
|
||||
#define CMD_NTPSRV "ntpsrv"
|
||||
#define CMD_WINS "wins"
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user