I am writing a socket application in c# to talk to a unix device. I am using TCP/IP and my program looks something like the below. The below is just snippets from the whole code..
socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
socket.Connect(Configuration.headend1.remoteIP);
socket.Send(packet_complete);
socket.Close();
I was able to get an example of 1 command in bytes,using wireshark/ethereal network analyzer, that the unix device is expecting.I found out using wireshark that the unix device is expecting a timestamp(or i think it is a timestap) under the Transmission protrocol level options. If I look under wire shark under the Transmission protocol level heading I see a new thing under options(Timestamps: TSval 18139934, TSecr 533285028 and NOP) as show below-
Transmission Control Protocol, Src Port: 15100 (15100), Dst Port: 33526 (33526), Seq: 1, Ack: 17, Len: 0
Source port: 15100 (15100)
Destination port: 33526 (33526)
[Stream index: 3]
Sequence number: 1 (relative sequence number)
Acknowledgement number: 17 (relative ack number)
Header length: 44 bytes
Flags: 0x10 (ACK)
0... .... = Congestion Window Reduced (CWR): Not set
.0.. .... = ECN-Echo: Not set
..0. .... = Urgent: Not set
...1 .... = Acknowledgement: Set
.... 0... = Push: Not set
.... .0.. = Reset: Not set
.... ..0. = Syn: Not set
.... ...0 = Fin: Not set
Window size: 66560 (scaled)
Checksum: 0x45eb [validation disabled]
[Good Checksum: False]
[Bad Checksum: False]
<code> Options: (24 bytes)
NOP
NOP
Timestamps: TSval 18139934, TSecr 533285028
NOP
NOP
SACK: 1-17
left edge = 1 (relative)
right edge = 17 (relative)</code> [SEQ/ACK analysis]
[This is an ACK to the segment in frame: 25]
[The RTT to ACK the segment was: 0.201174000 seconds]
The problem is that when I send out my code using socket programming, I dont see the time stamp or options field in wireshark. All 12 bytes are missing. How do i add this? I know there are socketoptions() function but I dont know how to use it. Any help will be appreciated.
Thanks