I'm curious if it is possible to create an ethertype packet using the winsocks api? If that is not possible--how would I go about creating a raw ethernet packet at the software level (I do not have access to the nic's driver). I need to create an 'ethertype' packet for configuring an external device on the network. I haven't found much information and curious if anyone could help me out. Thanks in advance Curtis Simonsen
Posted on 2001-06-04 17:47:00 by Curtis Simonsen
With winsock 2.x, you can use various network protocols with winsock, not limited to IP anymore. However, if you want to work with raw socket, you need win2k: raw socket is only available under win2k.
Posted on 2001-06-05 05:49:00 by Iczelion
Hi, Icz, this is not really the truth, winpcap for example provides a virtual-NIC for using raw-packets. http://netgroup-serv.polito.it/winpcap/ ciao
Posted on 2001-06-05 18:51:00 by masta
). I need to create an 'ethertype' packet for configuring an external device on the network. I haven't found much information and curious if anyone could help me out.
"Ethernet" defines the way in which hardware communicates over the network with anoyher hardware device. As far as I know (plus the stack of books I checked), no commands can be sent with an ethernet frame by itself. What that means is there is another protocol that runs on top of the Ethernet NIC driver. One or more of the following TCP/IP, AppleTalk, IPX/SPX, NetBui, etc. For example (abriged), I send a to another computer from a software application such as Word. Word hands the request to the OS, which hands it to TCP/IP, which breaks it into small packets/pieces and adds a header. TCP/IP hands it to the NIC driver which adds an ethernet frame (header and CRC). It is then turned over to the hardware for transmission. What is the device you are trying to communicate with?
Posted on 2001-06-05 19:47:00 by SFinegan
If you look at the sample code that comes with both the NT and 98 DDKs, there is a sample packet driver, written in C, which it is possible to use to send anything onto the network, but to use it you need to install the extra driver. Hope this is of use Nick
Posted on 2001-06-06 04:05:00 by Nick
SFinegan and the rest of the listening, I do understand the "ethernet" protocol and the tcp/ip stack and how it works with software applications. Quote: TCP/IP hands it to the NIC driver which adds an ethernet frame (header and CRC). It is then turned over to the hardware for transmission. An "ethertype" packet is simply a ethernet packet with a bogus packet size in the ethernet header. ethertypes are typically used for hardware packet filtering. I work for a company who designed a product that uses existing power lines to network two or more computers. The problem is that we are assuming our customers have an existing network card or customers can use the usb solution. Either case I do not have access to a hardware driver. In the usb scenario We are using the Microsoft binary solution--the infamous Remote Ndis drivers. One of the chips we are using is configurable through an ethertype packet (security, retrieving network stats, configuring the Mac address etc. All the configuration information is stored in the ethernet header file. I can easily do this under Linux but I'm having a difficult time finding info creating such a packet in windows. Any information would be greatly appreciated. I have briefly searched through the ddk but haven't found any luck as of yet. My company isn't very enthused about bundling wincap with our products or any other "packet driver" but we will do whatever is necessary. I need my configuration program to work under 98/me/200/xp. Any advice would be very helpful. I am not familiar with Windows sockets--so please talk to me like you would a child--I assume a raw socket is used to send raw ethnet packets?? Thanks in advance!
Posted on 2001-06-07 17:11:00 by Curtis Simonsen
I just want to say thanks to everyone that posted a reply. Take care and good luck to all of you.
Posted on 2001-06-14 18:04:00 by Curtis Simonsen