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 676287
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:54:40+00:00 2026-05-14T00:54:40+00:00

I’m learning to use raw sockets, and im trying to prase out the tcp

  • 0

I’m learning to use raw sockets, and im trying to prase out the tcp header data, but i can’t seem to figure out what res1, ece, and cwr are. Through my networking book and google i know what the rest stand for, but can’t seem to find anything on those three.
Below is the tcphdr struct in my includes area. Ive commented the parts a bit as i was figureing out what they stood for.

struct tcphdr {
        __be16  source;
        __be16  dest;
        __be32  seq;
        __be32  ack_seq;
\#if defined(__LITTLE_ENDIAN_BITFIELD)
        __u16   res1:4,
                doff:4,//tcp header length
                fin:1,//final
                syn:1,//synchronization
                rst:1,//reset
                psh:1,//push
                ack:1,//ack
                urg:1,// urge
                ece:1,
                cwr:1;
\#elif defined(__BIG_ENDIAN_BITFIELD)
        __u16   doff:4,//tcp header length
                res1:4,
                cwr:1,
                ece:1,
                urg:1,//urge
                ack:1,//ack
                psh:1,//push
                rst:1,//reset
                syn:1,//synchronization
                fin:1;//final
\#else
\#error  "Adjust your <asm/byteorder.h> defines"
\#endif
        __be16  window;
        __sum16 check;
        __be16  urg_ptr;
};
  • 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-14T00:54:41+00:00Added an answer on May 14, 2026 at 12:54 am

    See http://en.wikipedia.org/wiki/Transmission_Control_Protocol#TCP_segment_structure

    res1 is called reserved there. The others have the same name.

    CWR (1 bit) – Congestion Window Reduced (CWR)
    ECE (1 bit) – ECN-Echo indicates

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

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am trying to understand how to use SyndicationItem to display feed which is
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I want to construct a data frame in an Rcpp function, but when I
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have a jquery bug and I've been looking for hours now, I can't
Basically, what I'm trying to create is a page of div tags, each has
I have a French site that I want to parse, but am running into

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.