how to transmit data RAW.


I have 2 comps linked by ethernet card.
I needn't to use tcp/ip or udp/ip because it is only one way to data travel.

how can I put the data direct to the ethernet_card?and get it from ...?

is it possible or not?
Posted on 2003-11-05 05:01:54 by HarryTuttle
Hi,

I know of what Microsoft calls, "TCP/IP Raw Sockets". You might want to do a search for it on MSDN. I know it's not EXACTLY what ur looking for, but it's the closest I've ever seen to "RAW" data on the network. When defining your socket type, use SOCK_RAW! This will allow you to write your own underlying "experimental" protocol. Also, I don't think you'll get anything lower than this in Windows programming. I'm pretty sure all network programming on a windows platform is done through WinSock.

Hope it helps!
Posted on 2003-11-05 14:17:05 by SubEvil
HarryTuttle,

you should use ports (IN and OUT, if you have enought rights)

use google

ancev
Posted on 2003-11-05 18:08:25 by ancev
There must be a protocol to allow the data to reach it's destination and to correct for errors. Network devices need to know what to do with data they receive.
Posted on 2003-11-05 21:08:07 by ENF

HarryTuttle,

you should use ports (IN and OUT, if you have enought rights)

use google

ancev



but it is not LPT port to put byte into 0x0378 and big bang ;)
I'm focusing on your advice and googling now:)
http://www.landshut.org/bnla01/members/Faustus/fh/linux/udp_vs_raw/ch01s03.html
Posted on 2003-11-06 03:16:06 by HarryTuttle

There must be a protocol to allow the data to reach it's destination and to correct for errors. Network devices need to know what to do with data they receive.


protocol is need not i my case.the data is send by one and receiv by another host, byte by byte and the last one put it into sound card like a raw 8bit audio stream.there is no stop start crc or duplex action to do.

it means I want to transmit data over ethernet MAC and noone host have another services runing at the same time so tcp/ip sockets are needn't.
the ethernet connection is between two host only.

first I used serial COM tranmission but this way was too slow. Direct analog cable is bad because of high level of noise from nearest radio station. LPT transfer is also bad because needs too many direct line (8data+1 ground=9line).


The dirt-cheap way is ethernet ;) but I can't send frame by fram yet.
Posted on 2003-11-06 04:11:55 by HarryTuttle
Hi,

Take a look at winpcap.

h.
Posted on 2003-11-06 10:45:57 by hitchhikr

but it is not LPT port to put byte into 0x0378 and big bang ;)

thats true... is not so easy
you must first scan the pci bus for the card port :cool:

devias usar o google antes de postar :P

ancev

ps: in http://adcodex.com/embedded_html/stack01.zip you find the ethernet asm code used by menuetos

pps: check linux source code too ;)
Posted on 2003-11-06 17:23:43 by ancev
ancev:
you had to use google before postar


I have no idea what the word "postar" means but it looks like portuguese;)


brazil is only the film from where I come:)
Posted on 2003-11-07 02:52:42 by HarryTuttle
Hi Van!

My russian language isn't good enough so if you will be so helpful and post it in shorter version but in english it'll be nice.
I do this task under LINUX RH 8. with good result but in Win32 the case is little different.

Best regards!

Harry:alright:
p.s. it is your the first post. welcome on board Van!
Posted on 2003-11-08 10:15:43 by HarryTuttle
Hi All

I heard about the windows 2k&XP are fully raw_socket supporting oposite to W9x and standardNT.

Just like Linux/UNIX:)

you can also spoof flood and sniff anything you need/M$ crackers are comming :tongue:
Posted on 2003-11-08 13:15:47 by etn
Windows 2000 isn't.
Sure , you can create raw sockets but you can't create them for specific protocols (at least with winsock) the use the NDIS driver sounds like a good solution.

Concerning spoofing: you have to know that more and more routers are now re-constructing the incoming packets with the real ips from where they are coming from before forwarding them (at least the routers of a provider called France Telecom (mine actually) are known to do this ;) ).

Spoofing is *strongly discouraged* (and somehow i do agree with this).

h.
Posted on 2003-11-08 13:49:38 by hitchhikr
Hallo Van ,
how R Ya? did you forget about us?
best regards!
Harry
Posted on 2003-11-27 06:37:22 by HarryTuttle
HarryTuttle, I'd say either RAW sockets (if they fit your needs - they have the advantage of only requiring ring3 code), or NDIS (with which you should be able to do just about everything - never did any NDIS programming myself, though). I would advice against doing IN/OUT yourself, as you'd need a _lot_ of code, and be NIC specific... No real advantages over using NDIS as far as I can see.
Posted on 2003-11-27 08:00:49 by f0dder
IF U JUST WANT TO LEARN TO USE PORTS YOURSELF U HAVE A FEW GOOD SUGESTIONS HERE.
I WOULD LIKE TO SUGGEST ANOTHER SOLUTION.
USE SOFTWARE ALREADY IN PLACE.
WRITE ALL TRANSFER CODE TO A HARD DRIVE FILE ON 2CND MACHINE
YOUR PROGRAM ON OTHER MACHINE CAN READ CODE FROM FILE AND WRITE
RESPONSE TO 1ST MACHINE
SET UP RAM DRIVES FOR PURE MEMORY SPEED
SORRY IF I DID NOT UNDERSTAND PROBLEM
Posted on 2003-11-29 19:12:14 by dhicks586
Geez, have you done too much COBOL coding or what, dhicks586?
Posted on 2003-11-30 08:01:39 by gliptic