512 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
2
votes
1
answer
128
views
Sending raw packets back to host's networking stack
I'm writing a TCP/IP stack for embedded systems, but I wanted to test it on my host system.
Originally I tried with tap0 + a bridge. But I quickly realized it would make the most sense to bind to the ...
0
votes
0
answers
90
views
Why am I getting this error in my assembly program?
I'm making an assembly program that is supposed to get the mac address of the specified interface, however, when I try to assemble it, I get this error.
gethwaddress.s:12: warning: multi-line macro `...
3
votes
0
answers
44
views
Parse http via node_http_parser.cc/http_parser.cc and node.js readable/writable streams
Thanks for understanding, I'm really noob in c/c++ languages.
Prerequisites:
I'm trying to create http-parser.js/ts lib at the lowest possible cost. Moreover, I want my own parser work with node.js ...
4
votes
1
answer
144
views
Linux, setsockopt ICMP_FILTER option
I'm interested in filtering ICMP packets. More precisely I open a raw socket
int sockfd = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP)
and I'm interested to send PING_ECHO and to receive PING_ECHOREPLY ...
2
votes
1
answer
88
views
Proper way to obtain dynamic source port for raw socket (IP_HDRINCL) on macOS for custom TCP implementation
I am implementing TCP from scratch using raw sockets on macOS. I want to:
Get a dynamic source port from the kernel
Use this port with IP_HDRINCL for full IP/TCP header control
Current approach:
...
0
votes
1
answer
75
views
Nic Buffer In Raw Socket
I'm new in raw socket
We know that if we using raw socket we need to handle everything including the buffer
if we use raw socket we can use the following call :
recvfrom();
recvmsg();
Suppose I'm ...
0
votes
1
answer
150
views
Raw Socket Buffer
When we using a raw socket, we need to handle everything including handling which packet we need to process.
Suppose I receive 2 packets with 10 byte size. The packets contain the message "...
0
votes
1
answer
149
views
How can i implement a traceroute using raw sockets?
I am trying to create a traceroute program in UNIX using raw sockets. I'm kind of new to this, but I managed to gather some things from here and there and put them together. However, it doesn't work ...
1
vote
0
answers
53
views
How to receive a UDP packet over raw scokets in c++ in windows?
I tried to receive a UDP packet with the following function:
int UDP::recv(byte* data, const uint16_t dataLen, uint16_t srcPort, IPV4& srcIp)
{
const size_t totalHeadersLen = IP_HEADERS_SIZE + ...
0
votes
0
answers
40
views
Issue with IP_HDRINCL causing client to miss packets in raw socket communication
I have a socket-based communication setup between a server and a client for my operating system project. I'm setting the IP_HDRINCL option to manually add an IP header, but this breaks communication—...
0
votes
2
answers
226
views
How can I get the destination MAC address of the node my macOS device is connected to in C?
So I'm implementing TCP sockets in C with raw sockets in order to further understand computer networking. I'm working on writing the ethernet header code, and I can get the source MAC address that's ...
0
votes
1
answer
547
views
How to create raw sockets for TCP and UDP protocols in Windows system?
I encountered many problems while trying to build raw socket packets in Windows using C++, so I consulted some materials.
Because the Windows system restricts developers from using raw sockets to ...
0
votes
0
answers
78
views
Raw UDP packet being dropped
I am learning raw socket programming in linux Ubuntu but i have a problem. My udp packet is not shown in Wireshark. I suspect that its being dropped by my router because of a mistake I made.
here is ...
0
votes
1
answer
135
views
Issue with TCP Packet Data: Received Packet Data Does Not Match Sent Packet
I am working on a network application where I send and receive TCP packets. However, I’m encountering an issue where the data received does not match the data sent. I’m using raw sockets and ...
0
votes
1
answer
516
views
How to build a raw UDP packet in C++?
I am programming a code that sends a text message to a specific port using UDP. I initialize IP header and UDP myself. My problem is that the finished UDP packet is corrupted and Wireshark doesn't ...