| client | server | action |
|---|---|---|
| connect | ||
| send protocol version | client verifies | |
| send session key | client creates hmac shaN reply | |
| sends username and hmac passwd | server verifies client | |
| sends ack | connection is in option state | |
| chooses ctrl connection | sends ack | server handles the client con as control connection |
| chooses data connection | sends ack | server handles the client con as data connection |
controll connection
option format
uin16_t option_size = (sizeof(*option_boundary)+2; char option_type; char *option_content; char optionboundary;
| desc | reply | .... |
|---|---|---|
| check existence of a file | ACK,NACK | |
| add hit to a existing file | ACK,NACK |
data connection
data connection
| desc | reply | .... | |
|---|---|---|---|
| add file | ACK | NACK |