summaryrefslogtreecommitdiffstats
path: root/rtemsbsd
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2016-05-06 15:06:08 +1000
committerChris Johns <chrisj@rtems.org>2016-05-06 15:07:56 +1000
commit83eb07c4d64d5acef6813bc6ce0b014ed0d6026d (patch)
tree730b2ad8981dce791cd68625a25614e937962902 /rtemsbsd
parentFix sysctl support. (diff)
downloadrtems-libbsd-83eb07c4d64d5acef6813bc6ce0b014ed0d6026d.tar.bz2
Add sbin/sysctl
Diffstat (limited to 'rtemsbsd')
-rw-r--r--rtemsbsd/include/machine/rtems-bsd-commands.h2
-rw-r--r--rtemsbsd/include/rtems/netcmds-config.h2
-rw-r--r--rtemsbsd/rtems/rtems-bsd-shell-netcmds.c9
3 files changed, 13 insertions, 0 deletions
diff --git a/rtemsbsd/include/machine/rtems-bsd-commands.h b/rtemsbsd/include/machine/rtems-bsd-commands.h
index df251787..8fd865e8 100644
--- a/rtemsbsd/include/machine/rtems-bsd-commands.h
+++ b/rtemsbsd/include/machine/rtems-bsd-commands.h
@@ -60,6 +60,8 @@ int rtems_bsd_command_dhcpcd(int argc, char **argv);
int rtems_bsd_command_tcpdump(int argc, char **argv);
+int rtems_bsd_command_sysctl(int argc, char **argv);
+
__END_DECLS
#endif /* _RTEMS_BSD_MACHINE_RTEMS_BSD_COMMANDS_H_ */
diff --git a/rtemsbsd/include/rtems/netcmds-config.h b/rtemsbsd/include/rtems/netcmds-config.h
index f69b17b5..d2d15ea2 100644
--- a/rtemsbsd/include/rtems/netcmds-config.h
+++ b/rtemsbsd/include/rtems/netcmds-config.h
@@ -37,6 +37,8 @@ extern rtems_shell_cmd_t rtems_shell_HOSTNAME_Command;
extern rtems_shell_cmd_t rtems_shell_TCPDUMP_Command;
+extern rtems_shell_cmd_t rtems_shell_SYSCTL_Command;
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/rtemsbsd/rtems/rtems-bsd-shell-netcmds.c b/rtemsbsd/rtems/rtems-bsd-shell-netcmds.c
index e6eea024..1271ff36 100644
--- a/rtemsbsd/rtems/rtems-bsd-shell-netcmds.c
+++ b/rtemsbsd/rtems/rtems-bsd-shell-netcmds.c
@@ -54,3 +54,12 @@ rtems_shell_cmd_t rtems_shell_TCPDUMP_Command = {
NULL, /* alias */
NULL /* next */
};
+
+rtems_shell_cmd_t rtems_shell_SYSCTL_Command = {
+ "sysctl", /* name */
+ "sysctl [-bdehiNnoRTqx] [-f filename] name[=value] ...", /* usage */
+ "net", /* topic */
+ rtems_bsd_command_sysctl, /* command */
+ NULL, /* alias */
+ NULL /* next */
+};