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.
| 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# $FreeBSD: head/share/examples/netgraph/raw 53411 1999-11-19 07:04:36Z julian $
| 4# $FreeBSD: head/share/examples/netgraph/raw 222179 2011-05-22 14:23:48Z uqs $
|
5 6CARD=sr0 7 8# create an interface "ng0" and attach it to the sync port.
| 5 6CARD=sr0 7 8# create an interface "ng0" and attach it to the sync port.
|
9# The packets had jolly well better be ip because we are not discriminating.
| 9# The packets had jolly well better be IP because we are not discriminating.
|
10ngctl mkpeer ${CARD}: iface rawdata inet 11 12# if ng0 already exists, use a CONNECT command instead of a mkpeer. e.g. 13# ngctl connect ${CARD}: ng0: rawdata inet 14 15# Then use ifconfig on interface ng0 as usual 16
| 10ngctl mkpeer ${CARD}: iface rawdata inet 11 12# if ng0 already exists, use a CONNECT command instead of a mkpeer. e.g. 13# ngctl connect ${CARD}: ng0: rawdata inet 14 15# Then use ifconfig on interface ng0 as usual 16
|