]> git.sesse.net Git - vlc/blob - doc/vlan-server
-Fixed most of the bugs in gnome interface menus
[vlc] / doc / vlan-server
1 Vlan server protocol and library *draft*
2 ========================================
3
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.
6
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)
10
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.
13
14 Client commands:
15
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.
19     answers:    100: ok
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    
25                 password required
26
27 PASS <password>
28
29 LOGOUT -> close connexion
30     answer:     200: ok, session closed
31
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
38
39 RECOVER <client-session-id> <server-session-id>
40     -> recover session. Both id are required for security.
41     answer:     400: ok
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
46
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
53
54 STATUS ME
55 STATUS MAC <mac>
56 STATUS IP <ip>
57 STATUS ID <rsc-id>
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
62                 603: error, unknown
63                 604: error, request failed             
64                 610: <rsc-id>
65                 611: <vlan>
66                 612: <ip>
67                 613: <mac>
68                 614: <switch-ip>
69                 615: <switch-port>
70                 616: <number of interfaces dependant of this resource>
71                 617: <lock info>
72                 699: error, other reason
73
74 LOCK ME
75 LOCK MAC <mac>
76 LOCK IP <ip>
77 LOCK ID <rsc-id>
78     lock a resource id (session required)
79     answers:
80      
81 UNLOCK ME
82 UNLOCK MAC <mac>
83 UNLOCK IP <ip>
84 UNLOCK ID <id>
85     unlock a resource id (session required)
86     answers:
87
88 CHANGE ME <vlan>
89 CHANGE MAC <mac> <vlan>
90 CHANGE IP <ip> <vlan>
91 CHANGE ID <id> <vlan>
92     change a vlan (session required)
93
94 Administrative commands:
95
96 HELP
97     print list of commands
98     answer:     
99
100 KICK
101
102 RESET
103
104 LIST IDS
105 LIST MACS
106 LIST IPS
107 LIST SESSIONS
108 LIST CONNECTIONS
109 LIST LOGINS
110
111 QUIT
112
113 CONFIRM
114
115
116