raw-ethernet

send/receiving raw ethernet frames

一个人想着一个人 提交于 2020-01-14 10:37:06
问题 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). Releasing the root rights afterwards could be an option, but it raises the problem that the program is developed in an IDE, which I don't like to run as root. In my special case the main application is written in Python which would mean to give root access

Java library for Raw Ethernet [closed]

六月ゝ 毕业季﹏ 提交于 2020-01-10 09:22:09
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . I'm looking for a Java library that will give me access to raw Ethernet frames, both for reading and sending them. My end goal is to

Java library for Raw Ethernet [closed]

痴心易碎 提交于 2020-01-10 09:21:09
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . I'm looking for a Java library that will give me access to raw Ethernet frames, both for reading and sending them. My end goal is to

How send raw ethernet packet with C#? [closed]

半腔热情 提交于 2019-12-27 20:07:09
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 10 months ago . Is there a way to send raw packet Ethernet to other host via C#? In Windows 7 if it makes difference. 回答1: Based on suggestion by Saint_pl: I found probably better solution - similar to SharpPcap. It's Pcap.Net - .NET wrapper for WinPcap. Now I can modify my packets whatever I

tap interface not coming up

↘锁芯ラ 提交于 2019-12-10 17:34:17
问题 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: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 500 link/ether 26:cc:d2:b4:37:ea brd ff:ff:ff:ff:ff:ff state DOWN: How to get this state UP ? I am trying to send packets to it and nothing is received . 回答1: It turns out that you need to have a proccess that uses your

raw socket access as normal user on linux 2.4

天大地大妈咪最大 提交于 2019-12-10 01:59:17
问题 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 cap_set_proc(), both with no success. It seems that I do not have the permission to do so, in the program I get an EPERM error, on the command line Failed to set cap's on process `1586': (Operation not permitted) Is there an easier way to do what I want? If

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

我是研究僧i 提交于 2019-12-06 22:27:29
问题 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 802.3 Ethernet Frames without IP stack. Example for sending data: int etherType = 0x88A4; // the EtherType registered by IEEE byte[] macBroadcast = new byte[] {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}; byte[] macSource = new byte[] ... ; // MAC Address

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

喜你入骨 提交于 2019-12-05 05:23:25
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 802.3 Ethernet Frames without IP stack. Example for sending data: int etherType = 0x88A4; // the EtherType registered by IEEE byte[] macBroadcast = new byte[] {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}; byte[] macSource = new byte[] ... ; // MAC Address of my network interface card byte[] buffer = ... // the data to send device.write(macSource,

raw socket access as normal user on linux 2.4

≯℡__Kan透↙ 提交于 2019-12-05 03:14:04
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 cap_set_proc(), both with no success. It seems that I do not have the permission to do so, in the program I get an EPERM error, on the command line Failed to set cap's on process `1586': (Operation not permitted) Is there an easier way to do what I want? If not, what steps are necessary to successfully set the CAP_NET_RAW capability? EDIT: I have root access,

Java library for Raw Ethernet [closed]

℡╲_俬逩灬. 提交于 2019-11-30 05:50:39
I'm looking for a Java library that will give me access to raw Ethernet frames, both for reading and sending them. My end goal is to create a BACnet Ethernet network scanner. Please, Note, I'm not looking for TCP\IP. Anyone know of a good library for doing this? Maybe Jpcap can help. Notice that there's a Sourceforge project with the same name, but it doesn't seem to be the same project. Here's some sample code (from the library's tutorial) that uses Jpcap to send a TCP packet and an Ethernet frame: Edit: The sample code does create a TCPPacket , but you may create a regular Packet instead. /