diff --git a/share/man/man4/ng_source.4 b/share/man/man4/ng_source.4 index f58fd896c291..d66550b04e08 100644 --- a/share/man/man4/ng_source.4 +++ b/share/man/man4/ng_source.4 @@ -1,4 +1,4 @@ -.\" Copyright 2002 Sandvine Inc. +.\" Copyright 2002-2006 Sandvine Inc. .\" All rights reserved. .\" .\" Subject to the following obligations and disclaimer of warranty, use and @@ -32,7 +32,7 @@ .\" Author: Dave Chapeskie .\" $FreeBSD$ .\" -.Dd December 5, 2005 +.Dd October 22, 2006 .Dt NG_SOURCE 4 .Os .Sh NAME @@ -223,19 +223,27 @@ node can be given its own name like this: After which it can be referred to as .Dq Li src0: . .Pp -Once created, packets need to be sent to the node, the TCL net package -can be used to generate these packets: +Once created, packets can be sent to the node as raw binary data. +Each packet must be delivered in a separate netgraph message. .Pp -[Sandvine specific TCL code example omitted] -.Pp -To feed the output of the above TCL script to the +The following example uses a short Perl script to convert the hex +representation of an ICMP packet to binary and deliver it to the .Nm source node's .Va input hook via .Xr nghook 8 : -.Pp -.Dl "tcl genPacket | nghook bge0:orphans input" +.Bd -literal -offset indent +perl -pe 's/(..)[ \et\en]*/chr(hex($1))/ge' <