Appendix D
CGI Commands
40
Wireless-N Internet Home Monitoring Camera
Appendix D
SMB/CIFS SharedFolder Command
Method:
GET
URL:
http://<ip>/adm/smb_dirctrl.cgi?server=value[¶meter=value...]
Parameter
Value and description
server
Server address (up to 64 characters)
path
(Optional, depends on the parameter “cmd”) The operation folder (up to 128 characters)
cmd
(Optional) Valid values are:
mkdir: create a new folder, given by the “path” parameter
rmdir: delete a folder, given by the “path” parameter
If this parameter is omitted, the CGI will survey the shared folder list in the given URL.
user
(Optional) The username to login to the server
pass
(Optional) The password to login to the server
Return:
A successful request returns the following case sensitive result. The <List> content
is included only when the status is ok.
HTTP/1.0 200 OK\r\n
…
Content-type: text/xml\r\n
...
\r\n
<?xml version=”1.0” encoding=”utf-8”?>\r\n
<List>
<Status></Status>
<Folder>
<Name></Name>
....
</Folder>
</List>
Xml tag description:
Parameter
Value and description
Status
Value as following (all are in lower case):
ok
→
Create the folder successfully.
invalid
→
Invalid input parameters
unauth
→
Need username/password
denied
→
Denied , resoource occupied
file-exist
→
There is the file, reject the operation.
error
→
Error happened
Name
The folder name