News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

winsock sending 'pure' data

Started by gelatine1, December 07, 2015, 12:37:12 AM

Previous topic - Next topic

gelatine1

Hello
When I try to send (using winsock's send function) the string "abcd" (61h,62h,63h,64h) to a specific ip address this data always get extended with some metadata like length and stuff. and the actually data thats going out of my computer looks like this (the x's contain my own ip address so i censored it.)

0000   30 91 8f a2 fd 20 xx xx xx xx xx xx 08 00 45 00
0010   00 2c 35 7f 40 00 80 06 60 88 c0 a8 01 07 68 10
0020   3b 05 2d ee 00 50 e9 25 78 b4 84 b8 3a e0 50 18
0030   11 3a 25 52 00 00 61 62 63 64


So as you can see theres 36 bytes of trailing data. Is it somehow possible to send data exactly as i tell it (to a specific ip address or maybe just out into the wild). Maybe there is a possible way without winsock ?

thanks in advance

qWord

These extra bytes are added by the protocol stack (TCP/IPv4 in your case) and are unavoidable.
The above bytes are an ethernet frame containing a TCP/IPv4 fragment. What you did censored is the MAC address of your network adapter and not the IP address (when send to your router, the IP header does only contain the local address of your computer).
MREAL macros - when you need floating point arithmetic while assembling!

gelatine1


Farabi

I remembered back then when I was 22, its 2004, when I was taking a college as an MIT student, whatever it called there. I used a cable printer to do communication between 2 PC, I had no LAN backthen, but one thing for sure, each time you sent a data it had no extention, but of course, it only or 2 PC. For inter-net, you need an IP identiication.

In despair, they once gave me a title, serial murder.


:icon_mrgreen:

Anyway, what kind of extention did they extend when you used winsock?  :greensml:
http://farabidatacenter.url.ph/MySoftware/
My 3D Game Engine Demo.

Contact me at Whatsapp: 6283818314165