Rename ifchd_cmd_* to ifcmd_*.

This commit is contained in:
Nicholas J. Kain 2014-03-19 06:34:29 -04:00
parent 4b78acb65a
commit db6169e099

View File

@ -68,13 +68,13 @@ static int ifcmd_raw(char *buf, size_t buflen, char *optname,
return olen; return olen;
} }
static int ifchd_cmd_bytes(char *buf, size_t buflen, char *optname, static int ifcmd_bytes(char *buf, size_t buflen, char *optname,
uint8_t *optdata, ssize_t optlen) uint8_t *optdata, ssize_t optlen)
{ {
return ifcmd_raw(buf, buflen, optname, (char *)optdata, optlen); return ifcmd_raw(buf, buflen, optname, (char *)optdata, optlen);
} }
static int ifchd_cmd_u8(char *buf, size_t buflen, char *optname, static int ifcmd_u8(char *buf, size_t buflen, char *optname,
uint8_t *optdata, ssize_t optlen) uint8_t *optdata, ssize_t optlen)
{ {
if (!optdata || optlen < 1) if (!optdata || optlen < 1)
@ -87,7 +87,7 @@ static int ifchd_cmd_u8(char *buf, size_t buflen, char *optname,
return ifcmd_raw(buf, buflen, optname, numbuf, strlen(numbuf)); return ifcmd_raw(buf, buflen, optname, numbuf, strlen(numbuf));
} }
static int ifchd_cmd_u16(char *buf, size_t buflen, char *optname, static int ifcmd_u16(char *buf, size_t buflen, char *optname,
uint8_t *optdata, ssize_t optlen) uint8_t *optdata, ssize_t optlen)
{ {
if (!optdata || optlen < 2) if (!optdata || optlen < 2)
@ -102,7 +102,7 @@ static int ifchd_cmd_u16(char *buf, size_t buflen, char *optname,
return ifcmd_raw(buf, buflen, optname, numbuf, strlen(numbuf)); return ifcmd_raw(buf, buflen, optname, numbuf, strlen(numbuf));
} }
static int ifchd_cmd_s32(char *buf, size_t buflen, char *optname, static int ifcmd_s32(char *buf, size_t buflen, char *optname,
uint8_t *optdata, ssize_t optlen) uint8_t *optdata, ssize_t optlen)
{ {
if (!optdata || optlen < 4) if (!optdata || optlen < 4)
@ -117,7 +117,7 @@ static int ifchd_cmd_s32(char *buf, size_t buflen, char *optname,
return ifcmd_raw(buf, buflen, optname, numbuf, strlen(numbuf)); return ifcmd_raw(buf, buflen, optname, numbuf, strlen(numbuf));
} }
static int ifchd_cmd_ip(char *buf, size_t buflen, char *optname, static int ifcmd_ip(char *buf, size_t buflen, char *optname,
uint8_t *optdata, ssize_t optlen) uint8_t *optdata, ssize_t optlen)
{ {
if (!optdata || optlen < 4) if (!optdata || optlen < 4)
@ -131,7 +131,7 @@ static int ifchd_cmd_ip(char *buf, size_t buflen, char *optname,
return ifcmd_raw(buf, buflen, optname, ipbuf, strlen(ipbuf)); return ifcmd_raw(buf, buflen, optname, ipbuf, strlen(ipbuf));
} }
static int ifchd_cmd_iplist(char *out, size_t outlen, char *optname, static int ifcmd_iplist(char *out, size_t outlen, char *optname,
uint8_t *optdata, ssize_t optlen) uint8_t *optdata, ssize_t optlen)
{ {
char buf[2048]; char buf[2048];
@ -186,7 +186,7 @@ static int ifchd_cmd_iplist(char *out, size_t outlen, char *optname,
#define CMD_NULL "NULL" #define CMD_NULL "NULL"
#define IFCHD_SW_CMD(x, y) case DCODE_##x: \ #define IFCHD_SW_CMD(x, y) case DCODE_##x: \
optname = CMD_##x; \ optname = CMD_##x; \
dofn = ifchd_cmd_##y; \ dofn = ifcmd_##y; \
break break
static int ifchd_cmd(char *buf, size_t buflen, uint8_t *optdata, static int ifchd_cmd(char *buf, size_t buflen, uint8_t *optdata,
ssize_t optlen, uint8_t code) ssize_t optlen, uint8_t code)