What parameters do i have to send to a server?

198 views Asked by At

I can't send a valid request to a Server. I have this protocol description but I don't understand what thing i have to send with socat to the server.

header Must always be transmitted in full, even if the command does not require any parameters.

command This is a single letter whose case is important (commands 'A' and 'a' are very different, indeed, for example). It is 8 bit in size.

param 1 This is a 16 bit numeric parameter. It is in network byte order and mostly used to specify KNX device addresses or data lengths.

My problem comes from param. I have to send a 16 bit numeric parameter with null value. How can i do it?

1

There are 1 answers

2
ams On

Ordinarily, a "null value" just means you send zero.

If the server socket is sock, then this would send 16 bits:

send (sock, "\0\0", 2, 0);