xref: /freebsd/share/examples/netgraph/raw (revision a64729f5077d77e13b9497cb33ecb3c82e606ee8)
1#!/bin/sh
2# script to connect a raw synchronous card to a system interface.
3# Assumes the file if_sr was compiled with options NETGRAPH.
4
5CARD=sr0
6
7# create an interface "ng0" and attach it to the sync port.
8# The packets had jolly well better be IP because we are not discriminating.
9ngctl mkpeer ${CARD}: iface rawdata inet
10
11# if ng0 already exists, use a CONNECT command instead of a mkpeer. e.g.
12# ngctl connect ${CARD}: ng0: rawdata inet
13
14# Then use ifconfig on interface ng0 as usual
15
16