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.
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.
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