1 Vlan server protocol and library *draft*
2 ========================================
4 telnet-based protocol. Client commands are text, server responses are numbers followed by
5 an explicative text (like irc). Common messages number should probalbly be grouped.
7 Two different notions: session and connexion
8 session has a long timeout (several hours), and should not use server-side resources
9 connexion has a short timeout (a few minutes) and can use server-side resources (thread)
11 A vlan resource (switch+port) is identified by a unique id. Changes can obviously be done
12 with this id, but also, for administrative facilities, with other identifiers.
16 LOGIN <login> [<application>]
17 -> open connexion, required before any communication with server. Login and password should
18 correspond to groups (admin, users...) rather than individual ids. Application is for stats.
20 101: rejected, invalid login
21 102: rejected, too many connexions
22 103: rejected, forbidden source
23 104: rejected, already logged in
24 109: rejected, other reason
29 LOGOUT -> close connexion
30 answer: 200: ok, session closed
32 OPEN <client-session-id>
33 -> open session. required before any write operations
34 answers: 300: <server-session-id>
35 301: rejected, not authorized
36 302: rejected, too many sessions
37 399: rejected, other reason
39 RECOVER <client-session-id> <server-session-id>
40 -> recover session. Both id are required for security.
42 401: rejected, not authorized (invalid login or something else)
43 402: rejected, invalid ids
44 403: rejected, session already active on another connexion
45 499: rejected, other reason
47 CLOSE [<server-session-id>]
48 -> close session. Session must be active for normal users.
49 answer: 500: ok, session closed
50 501: error, not loged in
51 502: error: active session
52 503: error: not authorized
58 give informations about something
59 answer: 600: mark beginning of status info
60 601: mark end of status info
61 602: error, not authorized
63 604: error, request failed
70 616: <number of interfaces dependant of this resource>
72 699: error, other reason
78 lock a resource id (session required)
85 unlock a resource id (session required)
89 CHANGE MAC <mac> <vlan>
92 change a vlan (session required)
94 Administrative commands:
97 print list of commands