]> git.cameronkatri.com Git - apple_cmds.git/commitdiff
network_cmds: Get it all working
authorCameron Katri <me@cameronkatri.com>
Tue, 11 May 2021 19:21:33 +0000 (15:21 -0400)
committerCameron Katri <me@cameronkatri.com>
Tue, 11 May 2021 19:21:33 +0000 (15:21 -0400)
28 files changed:
Makefile.inc [new file with mode: 0644]
network_cmds/Makefile [new file with mode: 0644]
network_cmds/Makefile.inc [new file with mode: 0644]
network_cmds/arp.tproj/Makefile [new file with mode: 0644]
network_cmds/cfilutil/Makefile [new file with mode: 0644]
network_cmds/dnctl/Makefile [new file with mode: 0644]
network_cmds/ecnprobe/Makefile [new file with mode: 0644]
network_cmds/frame_delay/Makefile [new file with mode: 0644]
network_cmds/ifconfig.tproj/Makefile [new file with mode: 0644]
network_cmds/ip6addrctl.tproj/Makefile [new file with mode: 0644]
network_cmds/kdumpd.tproj/Makefile [new file with mode: 0644]
network_cmds/mnc.tproj/Makefile [new file with mode: 0644]
network_cmds/mptcp_client/Makefile [new file with mode: 0644]
network_cmds/mtest.tproj/Makefile [new file with mode: 0644]
network_cmds/ndp.tproj/Makefile [new file with mode: 0644]
network_cmds/netstat.tproj/Makefile [new file with mode: 0644]
network_cmds/ping.tproj/Makefile [new file with mode: 0644]
network_cmds/ping6.tproj/Makefile [new file with mode: 0644]
network_cmds/pktapctl/Makefile [new file with mode: 0644]
network_cmds/pktmnglr/Makefile [new file with mode: 0644]
network_cmds/rarpd.tproj/Makefile [new file with mode: 0644]
network_cmds/route.tproj/Makefile [new file with mode: 0644]
network_cmds/rtadvd.tproj/Makefile [new file with mode: 0644]
network_cmds/rtadvd.tproj/rtadvd_logging.c
network_cmds/rtsol.tproj/Makefile [new file with mode: 0644]
network_cmds/spray.tproj/Makefile [new file with mode: 0644]
network_cmds/traceroute.tproj/Makefile [new file with mode: 0644]
network_cmds/traceroute6.tproj/Makefile [new file with mode: 0644]

diff --git a/Makefile.inc b/Makefile.inc
new file mode 100644 (file)
index 0000000..7fd683e
--- /dev/null
@@ -0,0 +1,2 @@
+RPCGEN?=rpcgen
+STRIP=
diff --git a/network_cmds/Makefile b/network_cmds/Makefile
new file mode 100644 (file)
index 0000000..4d21c8e
--- /dev/null
@@ -0,0 +1,26 @@
+SUBDIR=        arp.tproj \
+       cfilutil \
+       dnctl \
+       ecnprobe \
+       frame_delay \
+       ifconfig.tproj \
+       ip6addrctl.tproj \
+       kdumpd.tproj \
+       mnc.tproj \
+       mptcp_client \
+       mtest.tproj \
+       ndp.tproj \
+       netstat.tproj \
+       ping.tproj \
+       ping6.tproj \
+       pktapctl \
+       pktmnglr \
+       rarpd.tproj \
+       route.tproj \
+       rtadvd.tproj \
+       rtsol.tproj \
+       spray.tproj \
+       traceroute.tproj \
+       traceroute6.tproj
+
+.include <bsd.subdir.mk>
diff --git a/network_cmds/Makefile.inc b/network_cmds/Makefile.inc
new file mode 100644 (file)
index 0000000..14e30a9
--- /dev/null
@@ -0,0 +1,3 @@
+CFLAGS+=-DPRIVATE -DINET6 -DPLATFORM_iPhoneOS -D__APPLE_USE_RFC_3542=1 -DUSE_RFC2292BIS=1 -D__APPLE_API_OBSOLETE=1 -DTARGET_OS_EMBEDDED=1
+
+.include "../Makefile.inc"
diff --git a/network_cmds/arp.tproj/Makefile b/network_cmds/arp.tproj/Makefile
new file mode 100644 (file)
index 0000000..13711ef
--- /dev/null
@@ -0,0 +1,6 @@
+PROG=  arp
+MAN=   arp.8 arp4.4
+
+BINDIR=/usr/sbin
+
+.include <bsd.prog.mk>
diff --git a/network_cmds/cfilutil/Makefile b/network_cmds/cfilutil/Makefile
new file mode 100644 (file)
index 0000000..64ed77c
--- /dev/null
@@ -0,0 +1,6 @@
+PROG=  cfilutil
+SRCS=  cfilstat.c cfilutil.c
+
+BINDIR=/usr/bin
+
+.include <bsd.prog.mk>
diff --git a/network_cmds/dnctl/Makefile b/network_cmds/dnctl/Makefile
new file mode 100644 (file)
index 0000000..6cde7cc
--- /dev/null
@@ -0,0 +1,6 @@
+PROG=  dnctl
+MAN=   dnctl.8
+
+BINDIR=/usr/sbin
+
+.include <bsd.prog.mk>
diff --git a/network_cmds/ecnprobe/Makefile b/network_cmds/ecnprobe/Makefile
new file mode 100644 (file)
index 0000000..fe02a7f
--- /dev/null
@@ -0,0 +1,26 @@
+PROG=  ecnprobe
+MAN=   ecnprobe.1
+SRCS=  capture.c ecn_probe.c ecn.c gmt2local.c \
+       history.c inet.c session.c support.c
+
+# libpcap sources
+SRCS+= pcap.c bpf_filter.c gencode.c grammar.y \
+       scanner.l nametoaddr.c optimize.c pcap-bpf.c \
+       fad-getad.c pcap-darwin.c pcap-common.c \
+       fmtutils.c pcap-util.c pcapng.c sf-pcapng.c \
+       savefile.c sf-pcap.c
+
+CLEANFILES=scanner.h
+YFLAGS+=-p pcap_
+LFLAGS+=-Ppcap_ --header-file=${.OBJDIR}/scanner.h --nounput
+
+CFLAGS+=-I${.CURDIR}/../../lib/libpcap/libpcap/
+CFLAGS+=-I${.OBJDIR} -I${.CURDIR} -DHAVE_CONFIG_H
+
+gencode.o: scanner.c
+
+.PATH: ${.CURDIR}/../../lib/libpcap/libpcap
+
+BINDIR=/usr/bin
+
+.include <bsd.prog.mk>
diff --git a/network_cmds/frame_delay/Makefile b/network_cmds/frame_delay/Makefile
new file mode 100644 (file)
index 0000000..b9b9744
--- /dev/null
@@ -0,0 +1,6 @@
+PROG=  frame_delay
+MAN=   frame_delay.8
+
+BINDIR=/usr/sbin
+
+.include <bsd.prog.mk>
diff --git a/network_cmds/ifconfig.tproj/Makefile b/network_cmds/ifconfig.tproj/Makefile
new file mode 100644 (file)
index 0000000..61a64da
--- /dev/null
@@ -0,0 +1,18 @@
+PROG=  ifconfig
+MAN=   ifconfig.8
+SRCS=  af_inet.c \
+       af_inet6.c \
+       af_link.c \
+       if6lowpan.c \
+       ifbond.c \
+       ifbridge.c \
+       ifclone.c \
+       ifconfig.c \
+       iffake.c \
+       ifmedia.c \
+       ifvlan.c \
+       nexus.c
+
+BINDIR=/sbin
+
+.include <bsd.prog.mk>
diff --git a/network_cmds/ip6addrctl.tproj/Makefile b/network_cmds/ip6addrctl.tproj/Makefile
new file mode 100644 (file)
index 0000000..bceb792
--- /dev/null
@@ -0,0 +1,6 @@
+PROG=  ip6addrctl
+MAN=   ip6addrctl.8
+
+BINDIR=/usr/sbin
+
+.include <bsd.prog.mk>
diff --git a/network_cmds/kdumpd.tproj/Makefile b/network_cmds/kdumpd.tproj/Makefile
new file mode 100644 (file)
index 0000000..ad84ab0
--- /dev/null
@@ -0,0 +1,7 @@
+PROG=  kdumpd
+MAN=   kdumpd.8
+SRCS=  kdumpd.c kdumpsubs.c
+
+BINDIR=/usr/libexec
+
+.include <bsd.prog.mk>
diff --git a/network_cmds/mnc.tproj/Makefile b/network_cmds/mnc.tproj/Makefile
new file mode 100644 (file)
index 0000000..146b027
--- /dev/null
@@ -0,0 +1,7 @@
+PROG=  mnc
+SRCS=  mnc_error.c mnc_main.c \
+       mnc_multicast.c mnc_opts.c
+
+BINDIR=/usr/bin
+
+.include <bsd.prog.mk>
diff --git a/network_cmds/mptcp_client/Makefile b/network_cmds/mptcp_client/Makefile
new file mode 100644 (file)
index 0000000..a5f71ed
--- /dev/null
@@ -0,0 +1,6 @@
+PROG=  mptcp_client
+SRCS=  conn_lib.c mptcp_client.c
+
+BINDIR=/usr/bin
+
+.include <bsd.prog.mk>
diff --git a/network_cmds/mtest.tproj/Makefile b/network_cmds/mtest.tproj/Makefile
new file mode 100644 (file)
index 0000000..7390411
--- /dev/null
@@ -0,0 +1,6 @@
+PROG=  mtest
+MAN=   mtest.8
+
+BINDIR=/usr/sbin
+
+.include <bsd.prog.mk>
diff --git a/network_cmds/ndp.tproj/Makefile b/network_cmds/ndp.tproj/Makefile
new file mode 100644 (file)
index 0000000..5eb750d
--- /dev/null
@@ -0,0 +1,6 @@
+PROG=  ndp
+MAN=   ndp.8
+
+BINDIR=/usr/sbin
+
+.include <bsd.prog.mk>
diff --git a/network_cmds/netstat.tproj/Makefile b/network_cmds/netstat.tproj/Makefile
new file mode 100644 (file)
index 0000000..454465d
--- /dev/null
@@ -0,0 +1,8 @@
+PROG=  netstat
+SRCS=  data.c if.c inet.c inet6.c ipsec.c main.c \
+       mbuf.c mcast.c misc.c mptcp.c route.c systm.c \
+       tp_astring.c unix.c vsock.c
+
+BINDIR=/usr/bin
+
+.include <bsd.prog.mk>
diff --git a/network_cmds/ping.tproj/Makefile b/network_cmds/ping.tproj/Makefile
new file mode 100644 (file)
index 0000000..e708457
--- /dev/null
@@ -0,0 +1,9 @@
+PROG=  ping
+MAN=   ping.8
+SRCS=  ping.c gmt2local.c
+
+BINDIR=/sbin
+
+.PATH: ${.CURDIR}/../ecnprobe
+
+.include <bsd.prog.mk>
diff --git a/network_cmds/ping6.tproj/Makefile b/network_cmds/ping6.tproj/Makefile
new file mode 100644 (file)
index 0000000..9a85e6f
--- /dev/null
@@ -0,0 +1,9 @@
+PROG=  ping6
+MAN=   ping6.8
+SRCS=  ping6.c md5.c gmt2local.c
+
+BINDIR=/sbin
+
+.PATH: ${.CURDIR}/../ecnprobe
+
+.include <bsd.prog.mk>
diff --git a/network_cmds/pktapctl/Makefile b/network_cmds/pktapctl/Makefile
new file mode 100644 (file)
index 0000000..35b551c
--- /dev/null
@@ -0,0 +1,6 @@
+PROG=  pktapctl
+MAN=   pktapctl.8
+
+BINDIR=/usr/sbin
+
+.include <bsd.prog.mk>
diff --git a/network_cmds/pktmnglr/Makefile b/network_cmds/pktmnglr/Makefile
new file mode 100644 (file)
index 0000000..fbb190c
--- /dev/null
@@ -0,0 +1,7 @@
+PROG=  pktmnglr
+MAN=   
+SRCS=  packet_mangler.c
+
+BINDIR=/usr/sbin
+
+.include <bsd.prog.mk>
diff --git a/network_cmds/rarpd.tproj/Makefile b/network_cmds/rarpd.tproj/Makefile
new file mode 100644 (file)
index 0000000..b63f630
--- /dev/null
@@ -0,0 +1,6 @@
+PROG=  rarpd
+MAN=   rarpd.8
+
+BINDIR=/usr/sbin
+
+.include <bsd.prog.mk>
diff --git a/network_cmds/route.tproj/Makefile b/network_cmds/route.tproj/Makefile
new file mode 100644 (file)
index 0000000..678ccf3
--- /dev/null
@@ -0,0 +1,6 @@
+PROG=  route
+MAN=   route.8
+
+BINDIR=/sbin
+
+.include <bsd.prog.mk>
diff --git a/network_cmds/rtadvd.tproj/Makefile b/network_cmds/rtadvd.tproj/Makefile
new file mode 100644 (file)
index 0000000..ca540e2
--- /dev/null
@@ -0,0 +1,11 @@
+PROG=  rtadvd
+MAN=   rtadvd.8 rtadvd.conf.5
+SRCS=  advcap.c config.c dump.c if.c \
+       rrenum.c rtadvd_logging.c rtadvd.c \
+       timer.c
+
+LDADD+=-lutil
+
+BINDIR=/usr/sbin
+
+.include <bsd.prog.mk>
index 90dec083d5fd96eb5b2625b05dda429b19c6c229..aafb03a2a389a8976f481beeaa2244a772ee5b31 100644 (file)
@@ -9,6 +9,7 @@
  * Apple Inc.
  */
 #include <assert.h>
+#include <stdarg.h>
 #include <os/log_private.h>
 
 #define kRtadvdLoggerID        "com.apple.rtadvd"
diff --git a/network_cmds/rtsol.tproj/Makefile b/network_cmds/rtsol.tproj/Makefile
new file mode 100644 (file)
index 0000000..0fd1e09
--- /dev/null
@@ -0,0 +1,8 @@
+PROG=  rtsol
+MAN=   rtsol.8
+SRCS=  dump.c if.c probe.c rtsock.c \
+       rtsol.c rtsold.c
+
+BINDIR=/sbin
+
+.include <bsd.prog.mk>
diff --git a/network_cmds/spray.tproj/Makefile b/network_cmds/spray.tproj/Makefile
new file mode 100644 (file)
index 0000000..904e17b
--- /dev/null
@@ -0,0 +1,15 @@
+PROG=  spray
+MAN=   spray.8
+SRCS=  spray.c spray_xdr.c spray.h
+RPCSRC=        spray.x
+CLEANFILES+=   spray_xdr.c spray.h
+
+spray.h: ${RPCSRC}
+       ${RPCGEN} -h -o ${.TARGET} ${RPCSRC}
+
+spray_xdr.c: ${RPCSRC}
+       ${RPCGEN} -c -o ${.TARGET} ${RPCSRC}
+
+BINDIR=/usr/sbin
+
+.include <bsd.prog.mk>
diff --git a/network_cmds/traceroute.tproj/Makefile b/network_cmds/traceroute.tproj/Makefile
new file mode 100644 (file)
index 0000000..706c13c
--- /dev/null
@@ -0,0 +1,8 @@
+PROG=  traceroute
+MAN=   traceroute.8
+SRCS=  as.c findsaddr-socket.c ifaddrlist.c \
+       traceroute.c version.c
+
+BINDIR=/usr/sbin
+
+.include <bsd.prog.mk>
diff --git a/network_cmds/traceroute6.tproj/Makefile b/network_cmds/traceroute6.tproj/Makefile
new file mode 100644 (file)
index 0000000..5d60f43
--- /dev/null
@@ -0,0 +1,6 @@
+PROG=  traceroute6
+MAN=   traceroute6.8
+
+BINDIR=/usr/sbin
+
+.include <bsd.prog.mk>