in reply to TCP Headers

My problem is that the guys on the remote machine are telling me that I need to send certain data in the "TCP Header", which is something that is distinct from the data that I send using "print $socket"

This sounds kind of oddball, since application-level stuff doesn't see TCP headers unless it's doing something like sniffing traffic. Can you say something about what you're trying to do? What kind of server/service are you trying to talk to? And what, specifically, are the server guys telling you that you need to add?

Replies are listed 'Best First'.
Re: Re: TCP Headers
by Anonymous Monk on Mar 23, 2004 at 05:39 UTC
    What the server guys are saying is that I have to send some data aside from the actual user data. For example, if the user data I want to send is:

    1234567890

    They want me to send the following non related data in the tcp header:

    6001710001

    How do I manipulate the TCP header? For that matter, what is a TCP header?

    Thanks.

    Gorby
      The part of the TCP header you can set is a series of flags and possibly some key-value pairs that give instructions or information to your system's TCP stack and the TCP stack of the system you're communicating with about any special handling that connection may need. The header also contains sequence numbers and some other stuff, but you generally don't set that.

      It doesn't really make sense to say "put 6001710001 in the TCP header" without saying where you want it put, and even if you did say where it still wouldn't make a ton of sense. It could make sense to say "Set the SYN flag in the TCP header" or "Set the TimeStamp TCP header to X", but that's still a strange thing to do.

      I suspect you're miscommunicating somehow with your server guys. Why don't you see if they can tell you more precisely what they want you to do.

        I think this the equivalent of the new guy on the job (whatever job) being told to go get the 'skyhook".

        --Bob Niederman, http://bob-n.com

        All code given here is UNTESTED unless otherwise stated.