|
|
|
|
||||||
| comp.protocols.tcp-ip TCP and IP network protocols. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
is there a way to encapsulate user info inside tcp/ip header(perhaps
using socket options or using unused fields). because I 'd like to get information before rceiving on the socket. on the client side ============== SOCKET s; initializaion of the socket. setSocketOption(s,key,"hello"); on the sever side =============== SOCKET c =accept(serversocket..); char str[32]; getSocketOption(c,key,&str); thanks. Kat. |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
No.
A TCP socket is just a byte-stream. Are you thinking in terms of OSI connection-data ? Does not exist, you have to accept() the incoming connection and then read() or close() |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
In article <1147940674.420290.68040@u72g2000cwu.googlegroups. com>,
blackstreetcat@hotmail.com wrote: > is there a way to encapsulate user info inside tcp/ip header(perhaps > using socket options or using unused fields). TCP does have an options field in the header, but I don't think any common APIs provide a way to put custom data there. Why don't you just include this as part of your application protocol? -- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me *** *** PLEASE don't copy me on replies, I'll read them in the group *** |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
Howdy,
Look into IPSec, it bumps the stack and has several portable options for authentication/encryption before the transport layer. -Matt |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
Thanks guys for the replys.
I tried to google "ipsec" and I could not find any code that will me use this protocol. does anyone has a code snippet I can use? thanks. Kat. |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
Thanks guys for the replys.
I tried to google "ipsec" and I could not find any code that will me use this protocol. does anyone has a code snippet I can use? thanks. Kat. |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
blackstreetcat@hotmail.com writes:
> Thanks guys for the replys. > > I tried to google "ipsec" and I could not find any code that will > me use this protocol. Perhaps http://ipsec-tools.sourceforge.net/ / Kari Hurtta |
|
![]() |
| Outils de la discussion | |
|
|