Thread: C PROGRAM to extract a bit or a group of bits from a Ethernet frame

  1. #1
    Registered User
    Join Date
    Feb 2012
    Posts
    1

    C PROGRAM to extract a bit or a group of bits from a Ethernet frame

    I am doing a project in college in which i have to extract a bit or a group of bits from a Ethernet frame in C PROGRAMMING. Can someone please provide an example in writing the code? Thank you.

  2. #2
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Create a struct for an ethernet frame and read your data into that. You locate your bits in the struct and apply:

    Tutorials - Bitwise Operators and Bit Manipulations in C and C++ - Cprogramming.com

    You'd have to be more specific about what you mean by "extract" in order to get a more specific answer.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How can I extract the most significant 4 bits?
    By mr_coffee in forum C Programming
    Replies: 6
    Last Post: 04-03-2009, 01:40 PM
  2. a program for Ethernet
    By arian in forum Networking/Device Communication
    Replies: 5
    Last Post: 07-29-2005, 03:48 PM
  3. a program for ethernet
    By arian in forum C++ Programming
    Replies: 3
    Last Post: 05-02-2005, 04:30 AM
  4. why do ethernet frame restricts to 1500 bytes?
    By zell in forum Networking/Device Communication
    Replies: 1
    Last Post: 01-24-2005, 07:51 AM

Tags for this Thread