153411Sjulian#!/bin/sh
253411Sjulian# script to connect a raw synchronous card to a system interface.
353411Sjulian# Assumes the file if_sr was compiled with options NETGRAPH.
453411Sjulian# $FreeBSD$
553411Sjulian
653411SjulianCARD=sr0
753411Sjulian
853411Sjulian# create an interface "ng0" and attach it to the sync port.
9222179Suqs# The packets had jolly well better be IP because we are not discriminating.
1053411Sjulianngctl mkpeer ${CARD}: iface rawdata inet
1153411Sjulian
1253411Sjulian# if ng0 already exists, use a CONNECT command instead of a mkpeer. e.g.
1353411Sjulian# ngctl connect ${CARD}: ng0: rawdata inet
1453411Sjulian
1553411Sjulian# Then use ifconfig on interface ng0 as usual
1653411Sjulian
17