Package org.jnode.net.ethernet

Examples of org.jnode.net.ethernet.EthernetAddress.writeTo()


            skbuf.set16(0, 0x0001); // Hardware type
            skbuf.set16(2, 0x0800); // Protocol type
            skbuf.set(4, 6); // Hardware address size
            skbuf.set(5, 4); // Protocol address size
            skbuf.set16(6, 0x01); // Operation APR request
            mac.writeTo(skbuf, 8); // Source mac
            skbuf.set32(14, 0xc0a8c853); // Source IP
            skbuf.set32(14, 0xc0a8c801); // Target IP

            // Prefix ethernet header
            skbuf.insert(14);
View Full Code Here


            // Prefix ethernet header
            skbuf.insert(14);
            // Set dest address
            EthernetAddress dst = new EthernetAddress("ff-ff-ff-ff-ff-ff");
            dst.writeTo(skbuf, 0);

            // Set packet type
            skbuf.set16(12, 0x0806);

            //api.transmit(skbuf);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.