Questions tagged [raw-ethernet]

90 questions
31
votes
3 answers

How send raw ethernet packet with C#?

Is there a way to send raw packet Ethernet to other host via C#? In Windows 7 if it makes difference.
Saint
  • 5,397
  • 22
  • 63
  • 107
17
votes
1 answer

How to reliably generate Ethernet frame errors in software?

Question: I'm testing a section of cable-fault finding software, and I'd like to reliably and reproducibly generate cable faults on a cat5 cable. At the moment I'm using a meter length of untwisted cable, and wriggle the cable manually next to a…
brice
  • 24,329
  • 7
  • 79
  • 95
16
votes
2 answers

RawCap error:"Unable to enter promiscuous mode (RCVALL_ON), using RCVALL_SOCKETLEVELONLY."

I am attempting to capture localhost(loopback 127.0.0.1) TCP traffic between master-slave (server-client) programs on my PC. Wireshark cannot do this, but I understand that RawCap does. When I try to run the program, RawCap says "Unable to enter…
14
votes
4 answers

Python Scapy wrpcap - How do you append packets to a pcap file?

I have some software that can emulate things like BER and delays on the network. I need a way to test the BER module of the software to make sure it actually works correctly. My solution is to create a program that sends out raw Ethernet frames…
14
votes
2 answers

low level ethernet driver to read bits off phy layer

Is it possible to read the bits directly off the physical ethernet connection interface from a standard computer ethernet interface? e.g., suppose I want to use the ethernet jack of a laptop as a differential logic probe(using a standard ethernet…
jsmdnq
  • 363
  • 2
  • 10
13
votes
4 answers

raw socket access as normal user on linux 2.4

In an embedded system (2.4 kernel) I need raw socket access to the eth0 interface from a process not running as root. I tried to address this problem by setting the CAP_NET_RAW capability from the command line and programmatically using…
Chris
  • 981
  • 4
  • 14
  • 29
10
votes
1 answer

Linux: When sending Ethernet frames the ethertype is being re-written

I have written a C program that is writing Ethernet frames directly onto the wire (which runs in two modes, sender or receiver). The sender is sending the frames with two VLAN tags on them (QinQ) but strangely when the frame reaches the receiver the…
jwbensley
  • 10,534
  • 19
  • 75
  • 93
10
votes
1 answer

tap interface not coming up

I decided to add a tap interface and use it in my code , but I am able to get its state UP. sudo ip -f link tuntap add tap10 mode tap sudo ip link set tap10 up After this when I do "ip link" tap10: mtu 1500 qdisc…
Curious Guy 007
  • 561
  • 2
  • 6
  • 17
8
votes
4 answers

How to do something every millisecond or better on Windows

This question is not about timing something accurately on Windows (XP or better), but rather about doing something very rapidly via callback or interrupt. I need to be doing something regularly every 1 millisecond, or preferably even every 100…
omatai
  • 3,448
  • 5
  • 47
  • 74
8
votes
1 answer

How to send Ethernet-Frames in Java without TCP/IP Stack

My Java application should control an external device (EtherCAT Bus technology) directly connected to the network interface of my computer(Ubuntu and Windows). No other network devices are connected. The communication has do be done on Standard IEEE…
user1350889
  • 93
  • 1
  • 7
6
votes
4 answers

Identify a non-computer network device?

I'm current working on a program that scans my network and discoveres computers and devices on the network. I use various operations to find data on the devices I discover, but want to distinguish the network devices from computers. And I'm…
Avilan
  • 161
  • 1
  • 4
  • 10
6
votes
1 answer

Using sendmsg/sendmmsg with raw ethernet frames

I'm trying to use C to send raw ethernet packets via sendmsg(). This code successfully opens a raw packet socket, attempts to fill a struct iovec with a single array of bytes (char message[]), then fills a struct msghdr with the destination…
Matt S
  • 483
  • 4
  • 13
5
votes
1 answer

send/receiving raw ethernet frames

I've to write an application on Linux that has the requirement to talk with a device with custom Ethernet type. There are many solutions even in SO how to write such an application. A drawback is that for this root access is needed (AFAIK).…
5
votes
1 answer

Portable hard real-time C or C++ raw Ethernet protocol library

I am trying to create a hobbyist portable robotics library (Windows and Linux) that has hard real-time capabilities. It should be able to connect over standard Ethernet to a microcontroller, upload firmware to that device, connect to other devices…
Edward
  • 148
  • 1
  • 6
5
votes
1 answer

Why are there differences between ETH_P_IP and ETH_P_ALL when doing a read()

I have the following setup: client(eth0) --- (eth2) linux bridge (eth1) --- (eth1) server When I open a RAW socket on the linux bridge using fd = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL)); I have the socket bound to eth2. When the client sends…
A G
  • 997
  • 2
  • 18
  • 36
1
2 3 4 5 6