1
0

sdp 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. .TH SDP 3
  2. .SH NAME
  3. sdp \- secure datagram protocol
  4. .SH SYNOPSIS
  5. .nf
  6. .B bind -a #E\fIspec\fP /net
  7. .sp 0.3v
  8. .B /net/sdp/clone
  9. .B /net/sdp/log
  10. .BI /net/sdp/ n
  11. .BI /net/sdp/ n /data
  12. .BI /net/sdp/ n /control
  13. .BI /net/sdp/ n /ctl
  14. .BI /net/sdp/ n /rstats
  15. .BI /net/sdp/ n /stats
  16. .BI /net/sdp/ n /status
  17. \&...
  18. .fi
  19. .SH DESCRIPTION
  20. The
  21. .I sdp
  22. device provides the interface to the Secure Datagram Protocol (SDP).
  23. SDP (un)compresses and (de-)encrypts packets.
  24. .I Spec
  25. is an integer from 0 to 15 identifying a stack.
  26. Each stack is independent of all others:
  27. the only information transfer between them is via programs that
  28. mount multiple stacks.
  29. Normally a system uses only one stack.
  30. However multiple stacks can be used for debugging
  31. new networks or implementing firewalls or proxy
  32. services.
  33. .PP
  34. The top level directory contains a
  35. .B clone
  36. file, a
  37. .B log
  38. file, and subdirectories numbered from zero to the number of connections
  39. opened for this protocol.
  40. .PP
  41. Opening the
  42. .B clone
  43. file reserves a connection. The file descriptor returned from the
  44. .IR open (2)
  45. will point to the control file,
  46. .BR ctl ,
  47. of the newly allocated connection.
  48. Reading
  49. .B ctl
  50. returns a text
  51. string representing the number of the
  52. connection.
  53. Connections may be used either to listen for incoming calls
  54. or to initiate calls to other machines.
  55. .PP
  56. A connection is controlled by writing text strings to the associated
  57. .B ctl
  58. file.
  59. After a connection has been established data may be read from
  60. and written to
  61. .BR data .
  62. A connection can be actively established using the
  63. .B connect
  64. message (see also
  65. .IR dial (2)).
  66. A connection can be established passively by first
  67. using an
  68. .B announce
  69. message (see
  70. .IR dial (2))
  71. to bind to a local port and then
  72. opening the
  73. .B listen
  74. file (see
  75. .IR dial (2))
  76. to receive incoming calls.
  77. .PP
  78. The following control messages are supported:
  79. .TF "outsecret \fIsecret
  80. .PD
  81. .TP
  82. .BI accept " file"
  83. Accept an incoming encrypted connection on
  84. .IR file ,
  85. typically a
  86. .B data
  87. file.
  88. .TP
  89. .BI dial " file"
  90. Initiate a new encrypted connection on
  91. .IR file ,
  92. typically a UDP
  93. .B data
  94. file.
  95. .TP
  96. .BI drop " permil"
  97. Randomly drop approximately one of every
  98. .I permil
  99. output packets,
  100. thus simulating network errors.
  101. .TP
  102. .BI cipher " algorithm"
  103. Use ciphering
  104. .IR algorithm ;
  105. choices are
  106. .LR null ,
  107. .LR des_56_cbc ,
  108. .LR rc4_128 ,
  109. and
  110. .LR rc4_256 .
  111. .TP
  112. .BI auth " algorithm"
  113. Use authentication
  114. .IR algorithm ;
  115. choices are
  116. .LR null ,
  117. .LR hmac_sha1_96 ,
  118. and
  119. .LR hmac_md5_96 .
  120. .TP
  121. .BI comp " algorithm"
  122. Use compression
  123. .IR algorithm ;
  124. choices are
  125. .L null
  126. and
  127. .LR thwack .
  128. .TP
  129. .BI insecret " secret"
  130. Use
  131. .I secret
  132. to decrypt incoming packets.
  133. .TP
  134. .BI outsecret " secret"
  135. Use
  136. .I secret
  137. to encrypt outgoing packets.
  138. .
  139. .SH "SEE ALSO"
  140. .IR dial (2),
  141. .IR ip (3)
  142. .br
  143. .IR "Robust Data Compression of Network Packets" ,
  144. Sean Dorward and Sean Quilan, Bell Labs, Lucent Technologies,
  145. .BR http://plan9.bell-labs.com/who/seanq/networkcomp.pdf .
  146. .SH SOURCE
  147. .B /sys/src/9/port/devsdp.c