[Click] trailing 0 from control socket

Eddie Kohler kohler at cs.ucla.edu
Thu Apr 29 15:33:37 EDT 2010


Hi Lars

Yes this is part of the protocol.  A line like "DATA NNNN" line is 
followed by exactly NNNN bytes of data; no additional newlines are sent. 
  The switch's handler value is, in this case, the one-byte stirng "0".

E


On 4/29/10 9:19 AM, Lars Bro wrote:
> Hi,
>
> When I use the control socket to get the value of something, it looks lik
> this:
>
> % lsb at lsb-laptop:/usr/local/testrouter$ telnet localhost 23232
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> Click::ControlSocket/1.3
> read mySwitch.switch
> 200 Read handler 'mySwitch.switch' OK
> DATA 1
> 0
>
> Is it part of the protocol ?
>
> it is a bit annoying when using TCL, because the "0" is not followed by a
> newline or anything. Therefore, the next
> line read will appar as starting with "0"
>
> yours,
> Lars Bro
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click


More information about the click mailing list