opnsense-src/share/examples/netgraph/raw
Franco Fichtner 402e7dde73 src: initial commit based on FreeBSD-10.0
Taken from:	https://github.com/freebsd/freebsd.git
Commit id:	d44ce30d3054a38723f89a161c5e003e64d1aaae
2014-11-09 09:30:14 +01:00

16 lines
503 B
Bash

#!/bin/sh
# script to connect a raw synchronous card to a system interface.
# Assumes the file if_sr was compiled with options NETGRAPH.
# $FreeBSD$
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