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

  • Home
  • SEARCH
  • 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 438305
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T20:39:54+00:00 2026-05-12T20:39:54+00:00

I am working on an embedded TCP/IP4 stack and HTTP/SNMP/SMTP stuff. It functionally works

  • 0

I am working on an embedded TCP/IP4 stack and HTTP/SNMP/SMTP stuff.
It functionally works but I want to make it work faster on LAN.
Because of the Nagle’s Algorithm and the delayed TCP-ACK,
The HTTP application seems to work slow even on LAN.

As can be seen on http://en.wikipedia.org/wiki/IPv4#Private_networks ,
There are 3 different Private Networks with different bit-block values.

What I will do is that:

  1. I will first be sure that I am a LAN member by looking at my own IP
  2. I will look at the dst_ip and check if it belongs to the same LAN as me

Are these enough to prove that me and the other party belong to the same LAN ?

Then of course, I will use a simple hack like sending the same packet twice to
speed up the communication. I already tested this and it works but it’s
optional right now. I want to turn it into a built-in feature.

Thanks in advance…

  • 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-12T20:39:54+00:00Added an answer on May 12, 2026 at 8:39 pm

    You need to check your subnet mask to know if a destination IPv4 address is on the same network as you. Only addresses with the same prefix will share the same network for sure.

    For instance, if your IP address is 10.2.3.87 and your subnet mask is /26 that means that addresses between 10.2.3.64 and 10.2.3.127 are on the same subnet as you because they will all use the same prefix 10.2.3.64. The /26 subnet mask is 255.255.255.192.

    Of course, you will do all this in binary so you will not be checking to make sure the address is between a min and a max value, instead you will use the subnet mask to get the prefix of your address and the destination address, then check that they are equal.

    In binary:

    10.2.3.87       00001010 00000010 00000011 01010111
    10.2.3.64       00001010 00000010 00000011 01000000
    255.255.255.192 11111111 11111111 11111111 11000000
    

    As you can see, the AND mask has 26 one bits (/26) and therefore the two IP addresses share the same prefix when the subnet mask is applied.

    It is possible, but not common, for other subnets to reside on the same LAN broadcast domain so in odd circumstances your performance trick will not work. If you use the subnet mask to identify the closeness of the destination IP address, then you may not need to worry about RFC 1918 private addressing.

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

Sidebar

Ask A Question

Stats

  • Questions 230k
  • Answers 230k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer A rendering engine is the engine that a browser uses… May 13, 2026 at 1:58 am
  • Editorial Team
    Editorial Team added an answer Assuming that you want to send an image as a… May 13, 2026 at 1:58 am
  • Editorial Team
    Editorial Team added an answer Yes, but most of the time you're better off not… May 13, 2026 at 1:58 am

Related Questions

I am working on an embedded application where the device is controlled through a
I am working on an embedded application that uses NAND flash for storage. As
I am working on an embedded system, so memory is precious for me. One
I am working on a project that involves an embedded system which runs a

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.