Questions tagged [raw-sockets]

An internet socket that allows direct sending and receiving of raw network packets that contain all headers. They differ from protocols like TCP/IP or UDP.

Raw sockets differ from standard sockets where the payload is encapsulated according to the transport layer protocol (TCP, UDP, HTTP, ..). Raw sockets can be used to implement completely new transport-layer protocols or to send messages through some less common protocol like ICMP.

Most socket APIs, especially those based on Berkeley sockets, support raw sockets. Support under Windows XP is intentionally limited due security concerns.

490 questions
-1
votes
1 answer

Keep sending malformed TCP header using bsd/socket api in C

long story short I'm currently experimenting with BSD/Socket C API. I want to try to emulate a full TCP Handshake. The first thing that I have to do is send the first SYN packet to the host, in my case the router (192.168.1.1). Here is the snippet…
hoenir
  • 141
  • 2
  • 9
-1
votes
2 answers

Raw sockets: sendto() and recvfrom() not working

I am trying to write a client/server application using RAW sockets. There are multiple problems: When the client sends a message to the server using sendto() method, an error invalid argument is returned by sendto() method. Why this error message?.…
Kulwant Singh
  • 121
  • 2
  • 12
-1
votes
1 answer

WinPcap: Discarded WiFi Packet

Consider the WinPcap tutorial for sending a single packet. To start running it, it is relatively straightforward: copy and paste the code into your IDE for C (in my case code::blocks) add #define HAVE_REMOTE to the 1st line set the build options…
Mark Messa
  • 440
  • 4
  • 22
-1
votes
3 answers

Unable to print TCP response using Raw Sockets

I am using raw sockets to send datagrams as given in this tutorial (section III). However, I am unable to print the response properly (showing junk characters). Not sure what is wrong with the program. Anyone able to identify the error? #define P…
sam
  • 95
  • 1
  • 1
  • 12
-1
votes
3 answers

error in ip address received

I am implementing raw sockets in C. I have two programs (say server and client). Client is sending info to server and then server is sending ACK. Client has sent info and server has successfully received it. Now server is sending back ACK. Now,…
user3392539
  • 71
  • 1
  • 2
  • 11
-1
votes
1 answer

python ipv6 packet sniffer

hi i want to sniff packets via python, ipv6 on FREEBSD. i hard to trying googlings to get information but there is nothing for freebsd example. below code is not working because someone says that bsd system does not supporting…
osmund sadler
  • 1,021
  • 2
  • 15
  • 27
-1
votes
2 answers

how can I get IP src addr from a raw socket

I want to sent TCP packets via raw socket and then I got stuck with the checksum field of tcp header. since I dont know how to figure out the actual IP address that raw socket had used, it seems impossible to construct TCP pseudo-header for checksum…
Javran
  • 3,394
  • 2
  • 23
  • 40
-2
votes
1 answer

How windows handle raw TCP packets without corresponding socket?

I'm stuck with some tasks related to TCP sockets under Windows OS so I need to know the mechanism of how Windows handles TCP packets in & out. Please correct me if my understanding below is wrong: Using WinSock when a TCP client wants to establish…
vantrung -cuncon
  • 10,207
  • 5
  • 47
  • 62
-2
votes
1 answer

sending raw data with raw sockets in linux (PSH-ACK)

i've coded some program which pretends to stablish a connection, and then send a packet of data; by using raw-sockets in linux, and the C language. afortunately, i've implemented okay the program, since a connection is stablished. The problem i've…
user1189104
  • 79
  • 1
  • 6
-5
votes
1 answer

How can I send protobuf file from Flutter, by RawSocket?

I want to send the protobuf file to server but I don't know how to make a protobuf file, and the way to send it.
1 2 3
32
33