Netgraph - ng_bpf help (first experience)

Eduardo Meyer dudu.meyer at gmail.com
Tue Oct 10 19:58:20 UTC 2006


Pete, thank you for asking.

> are you sure you are able to write to /tmp, this error looks like it
> is not able to read /tmp/bpf.awk.

Yes, I can write. It is not the problem, since the generated code from
the awk file is  OK.

>
> > I printed the full commands that returns the error, it is:
> >
> > ngctl msg setprogram { thisHook="" ifMatch="" ifNotMatch=""
> > bpf_prog_len=8 bpf_prog=[ { code=32 jt=0 jf=0 k=40 } { code=21 jt=0
> > jf=5 k=323901508 } { code=32 jt=0 jf=0 k=44 } { code=21 jt=0 jf=3
> > k=1869439337 } { code=32 jt=0 jf=0 k=48 } { code=21 jt=0 jf=1 k=28170
> > } { code=6 jt=0 jf=0 k=8192 } { code=6 jt=0 jf=0 k=0 } ] } }
> >
>
> i suspect this is what the contents of /tmp/bpf.awk are.  if not maybe
> post that to the thread....

No, this is the out from

echo ngctl msg ${NODEPATH} setprogram { thisHook=\"${INHOOK}\"
ifMatch=\"${MATCHHOOK}\" ifNotMatch=\"${NOTMATCHHOOK}\" ${BPFPROG} } }

I added the echo command to see how it is getting executed. So I have
the echo and on the next line the command itself. Note that this was
just copied/pasted from the man page, with the exception of the
PATTERN.


-- 
===========
Eduardo Meyer
pessoal: dudu.meyer at gmail.com
profissional: ddm.farmaciap at saude.gov.br


More information about the freebsd-stable mailing list