Re: sending MAC packets

From: Charles Swiger (cswiger_at_mac.com)
Date: 05/04/05

  • Next message: Gandalf The White: "Re: sending MAC packets"
    Date: Tue, 3 May 2005 20:58:04 -0400
    To: Daniel Valencia <fetrovsky@yahoo.com>
    
    

    On May 3, 2005, at 8:33 PM, Daniel Valencia wrote:
    > I'm doing research on network-layer protocols, so I
    > need a way to send packets straight into layer 2. So
    > far i've been reffered to raw sockets, but i've read
    > the code and i cannot skip header checking and that
    > stuff... Is there a way to interact with the network
    > if in a way that I can get network parameters (mtu,
    > etc.) and send packets (specify destination mac
    > address and payload)??

    A non-portable mechanism for doing so is called the BPF, which is used
    by the ISC DHCP software and other programs to create packets at a low
    level. Another option would be the libnet library, which will use the
    BPF on BSD-derived systems, but will also work on Solaris and other
    platforms which want/need to use other mechanisms to inject packets.

    Be aware that the network stack may still alter packets somewhat,
    although less so than trying to go through the raw socket interface.
    This is particularly the case if hardware functionality like TXCSUM is
    enabled; you may not be able to forge the sender MAC address, either,
    although changing the destination MAC addr ought to be fine.

    -- 
    -Chuck
    _______________________________________________
    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: Gandalf The White: "Re: sending MAC packets"

    Relevant Pages

    • Re: Ethernet issue: works one way but not another
      ... packets transmitted, 5 packets received, 0% packet loss ... (This is when connected directly to internet through ... FBSD, I have been working with BSDI at the isp I work for for the last ... As for my network topology, I have an internal network that goes ...
      (freebsd-questions)
    • Re: Update: UDP 770 Potential Worm
      ... > the network immediately after the 'attack', ... were no packets indicating some form of replication. ... I noticed that the UDP ... > of the UDP datagrams is the IP address of the proxy? ...
      (Incidents)
    • Re: IDSIPS that can handle one Gig
      ... especially with 64-byte UDP packets. ... There are plenty of network IPS's ... IDS/IPS devices through use of fragments. ... Find out quickly and easily by testing it with real-world attacks from ...
      (Focus-IDS)
    • Re: iptables and dhcp
      ... > the same physical network segment as the firewall and the remote DHCP ... You used INPUT and not FORWARD chain ... # This target allows packets to be marked in the mangle table ...
      (comp.os.linux.networking)
    • Re: Update: UDP 770 Potential Worm
      ... > were no packets indicating some form of replication. ... > my capture was limited due to the switched ... to see if the problem occurs on the test network, ... The proxy had already been isolated from the ...
      (Incidents)