ethernet

How do i send an raw ethernet frame in python

走远了吗. 提交于 2019-11-30 15:21:18
I need to have a project done in a few days, its a basic client and server interface. The catch is that it needs to be all raw sockets. I have no problem with creating that, I am just stuck on sending the packets. First I tried to bind it to an interface 'en1' but it keeps giving me an error nodename not known . When I bind it to my local ip address it works fine. After completing this I created a raw packet class, its all in hex. I then did a sendto call to send it on the wire. The problem is that when I capture the packet by using wireshark it shows up as being the payload of a ipv4 packet.

OpenCV: How to capture frames from an Ethernet camera

泄露秘密 提交于 2019-11-30 13:48:39
I have earlier programmed USB webcam, where the sole aim is to get the live frames from the camera and display in a window. I used cvCaptureFromCAM for that purpose, which worked fine for USB Camera(see code below). I want to know how do I capture frames from a Gigabit Ethernet camera? I guess I need to capture frames from some default IP address using some API. Can some one point me to right direction? I will be using C++ with OpenCV on Windows 7 on an Intel i3 processor. #include "cv.h" #include "highgui.h" #include <stdio.h> // A Simple Camera Capture Framework int main() { CvCapture*

How to write to & read from network card in x86 assembly?

◇◆丶佛笑我妖孽 提交于 2019-11-30 13:31:41
问题 does anyone know how to gain access to devices such as an ethernet port on a mainboard or on a pci card? Are there special registers? Opcodes? Do I have to make a call to the OS? If so, how? Thanks in advance. 回答1: It depends on the particular Ethernet MAC chip you're trying to talk to. Even chips in the same family will often have minor differences in how they operate. This is why modern OSes have the "driver" concept: the hardware manufacturer usually writes the driver because they know the

How can i receive the wrong Ethernet frames and disable the CRC/FCS calcul?

僤鯓⒐⒋嵵緔 提交于 2019-11-30 09:41:59
I generate a traffic between two PCs running Linux (by sending Ethernet frames), the goal of this is to capture some errors frames. The problem is when the Phy layer detect an error on a frame (if the CRC or FCS is not valid) the frame is dropped and I can't receive it in my program. Are the any way to receive the wrong frame (disable the drops in the Phy layer and receiving a indicator that indicate that this frame is wrong for example) and how can i consult the statistic of the NIC card (number of drops ...etc). You didn't specify which OS, but I can at least speak for Linux: It may on your

How do I get the MAC address of a network card using Delphi?

有些话、适合烂在心里 提交于 2019-11-30 08:46:44
问题 As per title - can anyone help me? 回答1: Get the JEDI conversion of the Microsoft IP Helper Library from the Project JEDI API Header Library - the file is IPHlpAPI.zip. Unpack the files, you need IpTypes.pas and IpHlpApi.pas. Then you can use something like this: procedure TForm1.Button1Click(Sender: TObject); var NumInterfaces: Cardinal; AdapterInfo: array of TIpAdapterInfo; OutBufLen: ULONG; i: integer; begin GetNumberOfInterfaces(NumInterfaces); SetLength(AdapterInfo, NumInterfaces);

How to write to & read from network card in x86 assembly?

北慕城南 提交于 2019-11-30 07:33:47
does anyone know how to gain access to devices such as an ethernet port on a mainboard or on a pci card? Are there special registers? Opcodes? Do I have to make a call to the OS? If so, how? Thanks in advance. It depends on the particular Ethernet MAC chip you're trying to talk to. Even chips in the same family will often have minor differences in how they operate. This is why modern OSes have the "driver" concept: the hardware manufacturer usually writes the driver because they know the hardware, and the driver provides a translation between the hardware and what the OS wants to see. You can

How do you send an Ethernet frame with a corrupt FCS?

若如初见. 提交于 2019-11-30 07:30:37
问题 I'm not sure if this is even possible since this might be handled in hardware, but I need to send some Ethernet frames with errors in them. I'd like to be able to create runts, jabber, misalignment, and bad FCS errors. I'm working in Python. 回答1: It can be handled in hardware, but isn't always -- and even if it is, you can turn that off; see the ethtool offload parameters. With regard to getting full control over the frames you create -- look into PF_PACKET (for one approach) or the tap

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. /

How do i send an raw ethernet frame in python

二次信任 提交于 2019-11-29 22:17:27
问题 I need to have a project done in a few days, its a basic client and server interface. The catch is that it needs to be all raw sockets. I have no problem with creating that, I am just stuck on sending the packets. First I tried to bind it to an interface 'en1' but it keeps giving me an error nodename not known . When I bind it to my local ip address it works fine. After completing this I created a raw packet class, its all in hex. I then did a sendto call to send it on the wire. The problem

OpenCV: How to capture frames from an Ethernet camera

核能气质少年 提交于 2019-11-29 19:12:59
问题 I have earlier programmed USB webcam, where the sole aim is to get the live frames from the camera and display in a window. I used cvCaptureFromCAM for that purpose, which worked fine for USB Camera(see code below). I want to know how do I capture frames from a Gigabit Ethernet camera? I guess I need to capture frames from some default IP address using some API. Can some one point me to right direction? I will be using C++ with OpenCV on Windows 7 on an Intel i3 processor. #include "cv.h"