Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6808425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:57:14+00:00 2026-05-26T19:57:14+00:00

struct mgmt_header_t { u_int16_t fc; /* 2 bytes */ u_int16_t duration; /* 2 bytes

  • 0
 struct mgmt_header_t {
    u_int16_t   fc;     /* 2 bytes */
    u_int16_t   duration;   /* 2 bytes */
    u_int8_t    da[6];      /* 6 bytes */
    u_int8_t    sa[6];      /* 6 bytes */
    u_int8_t    bssid[6];   /* 6 bytes */
    u_int16_t   seq_ctrl;   /* 2 bytes */
};

void my_callback(u_char *args, const struct pcap_pkthdr *header, const u_char *packet)
{
    //printf("********* New Packet Arrived *********\n");
    //printf("Jacked a packet with length [%d]\n", header->len);    

    struct mgmt_header_t *mac_header = (struct mgmt_header_t *) (packet+24);
    if (mac_header->fc > 255 )
        printf("comon");

I know the mac_header is in the right place because i’m getting the mac addresses from it and they are correct but the problem is with fc it’s never greater than 255 so always the left byte is zero

UPDATE:


I think i got it right now thanks for guy and ott–
for reference here’s my complete example http://pcap-wireless.blogspot.com/2011/11/post-2-80211-mac-header.html

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T19:57:14+00:00Added an answer on May 26, 2026 at 7:57 pm

    To quote section 7.1.1 “Conventions” of IEEE Std 802.11-2007:

    In figures, all bits within fields are numbered, from 0 to k, where the length of the field is k + 1 bits. The octet boundaries within a field can be obtained by taking the bit numbers of the field modulo 8. Octets within numeric fields that are longer than a single octet are depicted in increasing order of significance, from lowest numbered bit to highest numbered bit. The octets in fields longer than a single octet are sent to the PLCP in order from the octet containing the lowest numbered bits to the octet containing the highest numbered bits.

    “The octets in fields longer than a single octet are sent to the PLCP in order from the octet containing the lowest numbered bits to the octet containing the highest numbered bits.” means that the fields are transmitted in little-endian order, not big-endian order. Therefore, a 16-bit field with the value 0x0080 would be transmitted as an octet (byte) with the value 0x80 followed by an octet with the value 0x00.

    This means that in the Wiretap hex dump, you’ll see 80 00, but that means 0x0080, not 0x8000.

    BTW, note that a radiotap header is not guaranteed to be 24 bytes long; the header includes a (little-endian) length field specifying how long the header is.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

struct T { void eat(std::string const& segment) { buffer << segment; std::string sentence; while
struct TimerEvent { event Event; timeval TimeOut; static void HandleTimer(int Fd, short Event, void
typedef struct { nat id; char *data; } element_struct; typedef element_struct * element; void
struct A { template <class U> void f(U) { } }; template <class T>
struct person { int age; char name[100]; struct person *next; }; void delfirst(struct person
struct sniff_ip { struct in_addr ip_src, ip_dst; } function{ const struct sniff_ip *ip; ip
struct match { char men[64]; char women[64]; char menNum[1000]; char woNum[1000]; }; void printOut();
struct Foo { void SayHello() { std::cout << Hi, I am Foo; } };
struct A { static const int a = 5; struct B { static const
struct dataStruct { const char* s; int num; }; struct Final_struct { int n;

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.