Re: Question about Netgraph (I'm in a mess :)

From: Juan Rodriguez Hervella (jrh_at_it.uc3m.es)
Date: 11/26/03

  • Next message: villy Luo: "problem on dummynet, please help me"
    To: "Gerasimos Dimitriadis" <gedimitr@auth.gr>
    Date: Wed, 26 Nov 2003 14:12:16 +0100
    
    

    On Wednesday 26 November 2003 13:24, Gerasimos Dimitriadis wrote:
    > Hi,
    >
    > I believe that the best approach would be to divert all the traffic from/to
    > the interface you are interested. Connect
    > the 'upper' and 'lower' hooks of the corresponding ng_ether node to a node
    > that implements the functionality you want. By checking the 'type' value in
    > the ethernet header you can find when you are dealing with IP packets,
    > while letting all the others simply pass through.

    Ok, but there's something I still don't understand about the ng_ether node.
    If I wan't to get the packets sent by the host to the outside world, I should
    connect my node to "upper", right ? then I would modify the IP header, and
    I would send the packet to the "lower" hook, is this ok ?

    Now I'm thinking about the ethernet hearders...if I get the packet from the
    "upper" hook and I modify the destination IP address, it will be wrong to
    write the ethernet frame on the "lower" hook because the ethernet destination
    addr. would be likely to be different... is this right ?

    Thanks for you help.

    >
    > Gerasimos
    >
    > ----- Original Message -----
    > From: "Juan Rodriguez Hervella" <jrh@it.uc3m.es>
    > To: <freebsd-net@freebsd.org>
    > Sent: Wednesday, November 26, 2003 1:53 PM
    > Subject: Question about Netgraph (I'm in a mess :)
    >
    > > Hello,
    > >
    > > I'd like to make some modifications to the IPv6 hearder of some packets
    > > before sending them out the interface. I'm thinking where's the best
    > > way of doing this. So, I've found out the Netgraph tool (I didn't know it
    > > before :) but now I'm wondering how to use it properly.
    > >
    > > As far as I understand, I could have a "ng_iface" node which would
    > > have a "ipv6" hook to my new node, which would change the IPv6
    > > packet.... I would grab the packets installing a new route towards the
    > > "ng_iface" node, right ? Then, if I want to insert the modified packet
    > > to send it out the interface, I should connect my new node to the
    > > "ng_ether" node ? or again sending out the packet through the same
    > > "ng_iface" node ?
    > >
    > > I'm a bit mix up with all this stuff, any help will be very appreciated.
    > >
    > > --
    > > ******
    > > JFRH
    > > ******
    > >
    > > With every passing hour our solar system comes forty-three thousand
    > > miles closer to globular cluster M13 in the constellation Hercules, and
    > > still there are some misfits who continue to insist that there is no
    > > such thing as progress.
    > > -- Ransom K. Ferm
    > >
    > > _______________________________________________
    > > freebsd-net@freebsd.org mailing list
    > > http://lists.freebsd.org/mailman/listinfo/freebsd-net
    > > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"

    -- 
    ******
    JFRH
    ******
    "The pyramid is opening!"
    "Which one?"
    "The one with the ever-widening hole in it!"
    		-- Firesign Theater, "How Can You Be In Two Places At
    		   Once When You're Not Anywhere At All"
    _______________________________________________
    freebsd-net@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-net
    To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
    

  • Next message: villy Luo: "problem on dummynet, please help me"

    Relevant Pages

    • Re: Multiple NICs - custom protocol development
      ... I am building a custom MAC protocol for a wireless system that has different ... I want to use Ethernet as a physical layer. ... So,I want to use one card running server code and one card running client ... I want to be able to send packets from one NIC to the other and maintain ...
      (freebsd-questions)
    • Re: Sniffer Cant see cluster traffic
      ... None of the original Digital designed Ethernet protocols (SCS, LAT, ... protocol specific multicasts. ... IP over Ethernet on the other hand is full of Ethernet broadcasts. ... I got to see many SCS packets that were specifically adressed ...
      (comp.os.vms)
    • Re: Embedded Ethernet, looking for an efficient solution...
      ... > Ethernet into our future board level products. ... A tall task for a newbie... ... Crossover cable or switch ports? ... > ports on-board can actually process packets quick ...
      (comp.arch.embedded)
    • Re: Can I reduce CPU use of conntrack/masq?
      ... Packets are simply routed from 1 interface to ... > I've discovered that I can improve Ethernet throughput by about %20 by ... > removing the the conntrack/masq support from the kernel. ... totally untested and don't know the details of UWB but... ...
      (Linux-Kernel)
    • Re: Recommendation required for NIC card
      ... > I'm not sure you _can_ get deterministic communication with Ethernet, ... protocol stack) or raw ethernet packets. ... With the TCP protocol it is hard to guarantee real-time performance, ...
      (comp.dcom.lans.ethernet)