aboutsummaryrefslogtreecommitdiff
path: root/share/examples/netgraph/raw
diff options
context:
space:
mode:
Diffstat (limited to 'share/examples/netgraph/raw')
-rw-r--r--share/examples/netgraph/raw15
1 files changed, 15 insertions, 0 deletions
diff --git a/share/examples/netgraph/raw b/share/examples/netgraph/raw
new file mode 100644
index 000000000000..44196780fd0c
--- /dev/null
+++ b/share/examples/netgraph/raw
@@ -0,0 +1,15 @@
+#!/bin/sh
+# script to connect a raw synchronous card to a system interface.
+# Assumes the file if_sr was compiled with options NETGRAPH.
+
+CARD=sr0
+
+# create an interface "ng0" and attach it to the sync port.
+# The packets had jolly well better be IP because we are not discriminating.
+ngctl mkpeer ${CARD}: iface rawdata inet
+
+# if ng0 already exists, use a CONNECT command instead of a mkpeer. e.g.
+# ngctl connect ${CARD}: ng0: rawdata inet
+
+# Then use ifconfig on interface ng0 as usual
+