Questions tagged [raw-ethernet]
90 questions
1
vote
2 answers
How do I calculate the FCS field in an Ethernet Frame?
I see a few implementations, but I decided to look at exactly how the specification calls out the FCS for encoding.
So say my input is as follows:
dst: 0xAA AA AA AA AA AA
src: 0x55 55 55 55 55 55
len: 0x00 04
msg: 0xDE AD BE EF
concatenating this…

Cit5
- 400
- 5
- 19
1
vote
0 answers
Real time data with raw ethernet socket
I am trying to transfer raw ethernet packets from a linux machine to a microcontroller. I have to use raw packets because the micro sends raw frames and it doesnt have any tcp/ip stack.
fd = socket(AF_PACKET, SOCK_RAW, IPPROTO_RAW);
sendto(fd,…

NanoNi
- 315
- 4
- 16
1
vote
1 answer
Python layer 2 Ethernet frames --> Receiving data
I'm creating some layer 2 frames for doing an automation bus simulation with Python 3. Actually the data will be send without problems. The communication partner returns the data back to my python script. I'm starting the script as root and the…

Andreas
- 85
- 1
- 13
1
vote
1 answer
Is IEEE 802.2 Logical Link Control Layer (Ethernet) full duplex?
I have a situation where I am using pcap_sendpacket() to put packets on the wire at the LLC layer at the same time as I am receiving packets using pcap_dispatch() with an associated callback function. The sending and receiving is occuring in…

bph
- 10,728
- 15
- 60
- 135
1
vote
0 answers
Can sendmmsg be used on a TCP socket?
I'm used to using send to pass a buffer of data over a TCP socket:
int bytes_sent = send(sockfd, buf, bytes, flags);
I've also used sendmmsg to send several raw ethernet frames from a single system call:
int frames_sent = sendmmsg(sockfd, msgvec,…

user12066
- 613
- 6
- 23
1
vote
1 answer
Reading signals on ethernet port directly with RaspberryPi
I have a device which connects to its remote using rj45 port and 4 wire cable (a desk with adjustable height). I'm pretty sure it does not actually use an Ethernet protocol and uses sends some simple digital signals.
I want to Raspberry Pi to be…

Leo
- 1,683
- 2
- 20
- 25
1
vote
0 answers
Ethernet driver LAN7800 loopback
I converted the linux LAN7800 driver to create a baremetal driver and it works perfectly if I am sending and receiving packets out through the interface.
The problem arises if you want to debug packets and put the LAN7800 into internal loopback…

Leon de Boer
- 21
- 4
1
vote
1 answer
UCT definition in 802.3bp protocol
when I read 802.3bp-2016 protocol, i met a term "UCT" which I can't find its definition. For example, in Fig 97-13 RFER monitor state diagram, there is a UCT flow from INIT_CNT to WAIT state. Can anybody help me to understand this definition?

skyworld
- 41
- 5
1
vote
3 answers
C++ Create a handle to a NdisProt driver
I try to write to a NdisProt driver and send raw ethernet packets. I imported some C++ comands to my C# program, so that I can access the driver. When I try to open a handle to the driver I always get a invalid handle. I already tried it with just…

LeoBiel
- 33
- 6
1
vote
1 answer
Ethernet type 0x0101 not working with raw socket
I tried to send a raw packet with ethernet type 0x0101 but it seems not to be working, if I use ethernet type 0x1000 it is working properly.
Basically I open a raw socket:
int sd = socket(AF_PACKET, SOCK_RAW | SOCK_CLOEXEC, htons(0x0101));
int r =…

ieio
- 173
- 9
1
vote
1 answer
Automatically retrieve wired ethernet interface name with pcap
I have an application that sends/receives packets at the data-link layer level, i.e. frames sent from MAC address to MAC address over a wired ethernet connection.
I'm using the pcap library to do this.
Running ip a from a terminal returns:
1: lo:…

bph
- 10,728
- 15
- 60
- 135
1
vote
2 answers
Can a user application on macOS receive raw ethernet packets?
Can a user application on macOS receive raw ethernet packets? I have a piece of hardware that uses it's own custom ethernet protocol and has it's own ether type defined. Is there anyway I can create a user application that sends / receives these…

Roland Rabien
- 8,750
- 7
- 50
- 67
1
vote
1 answer
How to access ethernet port using VC++? without using sockets
I'm a beginner to ethernet programming, I want to access the ethernet port and send/recieve packets to/from it. I thought of using the CIM_EthernetPort class, but don't know how to do it. please help. I have to write a program to send data to an…

KnightScott
- 123
- 3
- 10
1
vote
2 answers
Sending Raw packet with Ethernet header using Go Language
I am trying to send raw TCP packet with custom Ethernet header through raw socket in Go language. I am trying to reproduce similar code in c language.
package main
import (
"fmt"
"syscall"
)
func main() {
…

Khamidulla
- 2,927
- 6
- 35
- 59
1
vote
1 answer
Is there a difference in format between a packet received via SLIP and one from an Ethernet?
When pinging a uip device via SLIP, I get a packet in the uart that looks something like:
uip_buf[0] 0x45
uip_buf[1] 0x0
uip_buf[2] 0x0
uip_buf[3] 0x3c
uip_buf[4] 0x1
uip_buf[5] 0x20
uip_buf[6] 0x0
…

ben
- 473
- 2
- 9
- 21