|
|
@@ -1,46 +1,25 @@
|
|
|
---- a/include/applets.src.h
|
|
|
-+++ b/include/applets.src.h
|
|
|
-@@ -229,6 +229,7 @@ IF_MT(APPLET(mt, BB_DIR_BIN, BB_SUID_DRO
|
|
|
- IF_MV(APPLET(mv, BB_DIR_BIN, BB_SUID_DROP))
|
|
|
- IF_NAMEIF(APPLET(nameif, BB_DIR_SBIN, BB_SUID_DROP))
|
|
|
- IF_NC(APPLET(nc, BB_DIR_USR_BIN, BB_SUID_DROP))
|
|
|
-+IF_NETMSG(APPLET(netmsg, BB_DIR_BIN, BB_SUID_REQUIRE))
|
|
|
- IF_NETSTAT(APPLET(netstat, BB_DIR_BIN, BB_SUID_DROP))
|
|
|
- IF_NICE(APPLET(nice, BB_DIR_BIN, BB_SUID_DROP))
|
|
|
- IF_NOHUP(APPLET(nohup, BB_DIR_USR_BIN, BB_SUID_DROP))
|
|
|
---- a/networking/Config.src
|
|
|
-+++ b/networking/Config.src
|
|
|
-@@ -639,6 +639,12 @@ config FEATURE_IPCALC_LONG_OPTIONS
|
|
|
- help
|
|
|
- Support long options for the ipcalc applet.
|
|
|
-
|
|
|
-+config NETMSG
|
|
|
-+ bool "netmsg"
|
|
|
-+ default n
|
|
|
-+ help
|
|
|
-+ simple program for sending udp broadcast messages
|
|
|
-+
|
|
|
- config NETSTAT
|
|
|
- bool "netstat"
|
|
|
- default y
|
|
|
---- a/networking/Kbuild.src
|
|
|
-+++ b/networking/Kbuild.src
|
|
|
-@@ -27,6 +27,7 @@ lib-$(CONFIG_IP) += ip.o
|
|
|
- lib-$(CONFIG_IPCALC) += ipcalc.o
|
|
|
- lib-$(CONFIG_NAMEIF) += nameif.o
|
|
|
- lib-$(CONFIG_NC) += nc.o
|
|
|
-+lib-$(CONFIG_NETMSG) += netmsg.o
|
|
|
- lib-$(CONFIG_NETSTAT) += netstat.o
|
|
|
- lib-$(CONFIG_NSLOOKUP) += nslookup.o
|
|
|
- lib-$(CONFIG_NTPD) += ntpd.o
|
|
|
--- /dev/null
|
|
|
+++ b/networking/netmsg.c
|
|
|
-@@ -0,0 +1,65 @@
|
|
|
+@@ -0,0 +1,76 @@
|
|
|
+/*
|
|
|
+ * Copyright (C) 2006 Felix Fietkau <[email protected]>
|
|
|
+ *
|
|
|
+ * This is free software, licensed under the GNU General Public License v2.
|
|
|
+ */
|
|
|
++
|
|
|
++//config:config NETMSG
|
|
|
++//config: bool "netmsg"
|
|
|
++//config: default n
|
|
|
++//config: help
|
|
|
++//config: simple program for sending udp broadcast messages
|
|
|
++
|
|
|
++//applet:IF_NETMSG(APPLET(netmsg, BB_DIR_BIN, BB_SUID_REQUIRE))
|
|
|
++
|
|
|
++//kbuild:lib-$(CONFIG_NETMSG) += netmsg.o
|
|
|
++
|
|
|
++//usage:#define netmsg_trivial_usage NOUSAGE_STR
|
|
|
++//usage:#define netmsg_full_usage ""
|
|
|
++
|
|
|
+#include <sys/types.h>
|
|
|
+#include <sys/socket.h>
|
|
|
+#include <netinet/in.h>
|
|
|
@@ -50,9 +29,6 @@
|
|
|
+#include <string.h>
|
|
|
+#include "busybox.h"
|
|
|
+
|
|
|
-+//usage:#define netmsg_trivial_usage NOUSAGE_STR
|
|
|
-+//usage:#define netmsg_full_usage ""
|
|
|
-+
|
|
|
+#ifndef CONFIG_NETMSG
|
|
|
+int main(int argc, char **argv)
|
|
|
+#else
|