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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:59:34+00:00 2026-06-14T04:59:34+00:00

Using sources from this article RAW_SOCKET to forge UDP packets I am generating packets

  • 0

Using sources from this article RAW_SOCKET to forge UDP packets I am generating packets from other host to own eth0 ip address, as example, 192.168.10.1 –> 192.168.10.131.

But tcpdump shows, that packets are arriving into lo, not eth0…
on lo –

10:10:18.332284 IP (tos 0x0, ttl 64, id 768, offset 0, flags [DF], proto UDP (17), length 71)
192.168.10.1.57961 > 192.168.10.131.12001: [udp sum ok] UDP, length 43

and on eth0 is silence.

How to change the code, to make packets arrive into eth0?
direct link to C source file

  • 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-06-14T04:59:35+00:00Added an answer on June 14, 2026 at 4:59 am

    As I see, you have to use tcp functions instead of udp

    For UDP you can set the optname to SO_BINDTODEVICE

    const char device[] = "eth0";
    rc=setsockopt(sock, SOL_SOCKET, SO_BINDTODEVICE, device, sizeof(device));
    if (rc != 0) 
    {
     printf ("%s: could not set SO_BINDTODEVICE (%s)\n",
        argv[0], strerror(errno));
     exit (EXIT_FAILURE);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am attempting to construct my own date picker using code from several sources.
I am attempting to construct my own date picker using code from several sources.
From what I've read, including this article on GitHub itself, by using ssh agent
i'm using autocomplete from jquery... and i have this: $('#name_search').autocomplete({ source: search/name.php, open: function(){
I'm using jQuery deferred objects so I can pull data from multiple sources ,
I'm using the cxf-codegen-plugin to generate some classes from a WSDL. After the sources
I have an Ember.js app as follows (borrowed from this article on andyMatthews.net): View:
This is a XAML code sample taken from the MSDN library article for the
Recently I came to know from this article - http://blogs.msdn.com/b/patrickdanino/archive/2009/11/11/custom-controls-and-ui-automation.aspx -that controls in WPF
I am trying to just compile and run the demos from this article: Flash

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.