Page 41 / 66 Scroll up to view Page 36 - 40
Appendix D
CGI Commands
40
Wireless-N Internet Home Monitoring Camera
SMB/CIFS SharedFolder Command
Method:
GET
URL:
http://<ip>/adm/smb_dirctrl.cgi?server=value[&parameter=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
Page 42 / 66
Appendix D
CGI Commands
41
Wireless-N Internet Home Monitoring Camera
Base-64 Encoder/Decoder Sample Codes
// Standard BASE64 table
// char keyStr[] = “ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=”;
// SerComm BASE64 table
char keyStr[] = “ACEGIKMOQSUWYBDFHJLNPRTVXZacegikmoqsuwybdfhjlnprtvxz0246813579=+/”;
//--------------------------------------------------------------------
//
Description:
Encrypt the input data with the base64
//
Input:
//
char i_buf[]
- input buffer
//
Output:
//
char o_buf[]
- output buffer
//
Return:
//
encrypted string length
//--------------------------------------------------------------------
int encode64(char i_buf[], char o_buf[])
{
char chr1 = (char)0;
char chr2 = (char)0;
char chr3 = (char)0;
//These are the 3 bytes to be encoded
int enc1 = 0;
int enc2 = 0;
int enc3 = 0;
int enc4 = 0; //These are the 4 encoded bytes
int i = 0, j = 0; //Position counter
do { //Set up the loop here
chr1 = i_buf[i++]; //Grab the first byte
if(i < strlen(i_buf))
chr2 = i_buf[i++]; //Grab the second byte
if(i < strlen(i_buf))
chr3 = i_buf[i++]; //Grab the third byte
//Here is the actual base64 encode part.
//There really is only one way to do it.
enc1 = chr1 >> 2;
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
enc4 = chr3 & 63;
if(chr2 == (char)0) {
enc3 = enc4 = 64;
}
Page 43 / 66
Appendix D
CGI Commands
42
Wireless-N Internet Home Monitoring Camera
else if(chr3 == (char)0) {
enc4 = 64;
}
o_buf[j++] = keyStr[enc1];
o_buf[j++] = keyStr[enc2];
o_buf[j++] = keyStr[enc3];
o_buf[j++] = keyStr[enc4];
// OK, now clean out the variables used.
chr1 = chr2 = chr3 = (char)0;
enc1 = enc2 = enc3 = enc4 = (char)0;
} while (i < strlen(i_buf)); //And finish off the loop
//Now return the encoded values.
return j;
}
//--------------------------------------------------------------------
//
Description:
decrypt the input data with the base64
//
Input:
//
char i_buf[]
- input buffer
//
Output:
//
char o_buf[]
- output buffer
//
Return:
//
decrypted string length
//--------------------------------------------------------------------
int decode64(char i_buf[], char o_buf[]) {
//These are the 3 bytes to be encoded
char chr1 = (char)0;
char chr2 = (char)0;
char chr3 = (char)0;
//These are the 4 encoded bytes
int enc1 = 0;
int enc2 = 0;
int enc3 = 0;
int enc4 = 0;
int i = 0, j = 0; //Position counter
do { //Here’s the decode loop.
//Grab 4 bytes of encoded content.
enc1 = (int)(strchr(keyStr, i_buf[i++]) - keyStr);
if(i < strlen(i_buf))
enc2 = (int)(strchr(keyStr, i_buf[i++]) - keyStr);
if(i < strlen(i_buf))
enc3 = (int)(strchr(keyStr, i_buf[i++]) - keyStr);
if(i < strlen(i_buf))
enc4 = (int)(strchr(keyStr, i_buf[i++]) - keyStr);
Page 44 / 66
Appendix D
CGI Commands
43
Wireless-N Internet Home Monitoring Camera
//Heres the decode part. There’s really only one way to do it.
chr1 = (enc1 << 2) | (enc2 >> 4);
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
chr3 = ((enc3 & 3) << 6) | enc4;
o_buf[j++] = (char)chr1;
if (enc3 != 64) {
o_buf[j++] = (char)chr2;
}
if (enc4 != 64) {
o_buf[j++] = (char)chr3;
}
//now clean out the variables used
chr1 = (char)0;
chr2 = (char)0;
chr3 = (char)0;
enc1 = 0;
enc2 = 0;
enc3 = 0;
enc4 = 0;
} while (i < strlen(i_buf)); //finish off the loop
//Now return the decoded values.
return j;
}
Page 45 / 66
Appendix E
Warranty Information
44
Wireless-N Internet Home Monitoring Camera
Appendix E:
Warranty Information
Limited Warranty
FOR CONSUMERS WHO ARE COVERED BY CONSUMER
PROTECTION LAWS OR REGULATIONS IN THEIR COUNTRY
OF PURCHASE OR, IF DIFFERENT, THEIR COUNTRY OF
RESIDENCE, THE BENEFITS CONFERRED BY THIS WARRANTY
ARE IN ADDITION TO ALL RIGHTS AND REMEDIES
CONVEYED BY SUCH CONSUMER PROTECTION LAWS AND
REGULATIONS. THIS WARRANTY DOES NOT EXCLUDE,
LIMIT OR SUSPEND ANY RIGHTS OF CONSUMERS ARISING
OUT OF NONCONFORMITY WITH A SALES CONTRACT.
SOME COUNTRIES, STATES AND PROVINCES DO NOT
ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR
CONSEQUENTIAL DAMAGES OR ALLOW LIMITATIONS ON
HOW LONG AN IMPLIED WARRANTY OR CONDITION MAY
LAST, SO THE LIMITATIONS OR EXCLUSIONS DESCRIBED
BELOW MAY NOT APPLY TO YOU. THIS WARRANTY GIVES
YOU SPECIFIC LEGAL RIGHTS, AND YOU MAY ALSO
HAVE OTHER RIGHTS THAT VARY BY COUNTRY, STATE OR
PROVINCE. THIS LIMITED WARRANTY IS GOVERNED BY
AND CONSTRUED UNDER THE LAWS OF THE COUNTRY IN
WHICH THE PRODUCT PURCHASE TOOK PLACE.
Linksys warrants the hardware in this Linksys product
against defects in materials and workmanship under
normal use for the Warranty Period, which begins on the
date of purchase by the original end-user purchaser and
lasts for the period specified below:
One (1) year for new product
Ninety (90) days for refurbished product
Your exclusive remedy and Linksys’ entire liability under
this limited warranty will be for Linksys, at its option, to
(a) repair the product with new or refurbished parts,
(b) replace the product with a reasonably available
equivalent new or refurbished Linksys product, or (c)
refund the purchase price of the product less any rebates.
Any repaired or replacement products will be warranted
for the remainder of the original Warranty Period or thirty
(30) days, whichever is longer. All products and parts that
are replaced become the property of Linksys.
Linksys additionally warrants that any media on which
the software may be provided will be free from defects in
materials and workmanship under normal use for a period
of ninety (90) days from the date of original purchase.
Your exclusive remedy and Linksys’ entire liability under
this limited warranty will be for Linksys, at its option, to
(a) replace the software media, or (b) refund the purchase
price of the software media.
Exclusions and Limitations
This limited warranty does not apply if: (a) the product
assembly seal has been removed or damaged, (b) the
product has been altered or modified, except by Linksys,
(c) the product damage was caused by use with non-
Linksys products, (d) the product has not been installed,
operated, repaired, or maintained in accordance with
instructions supplied by Linksys, (e) the product has
been subjected to abnormal physical or electrical stress,
misuse, negligence, or accident, (f) the serial number on
the Product has been altered, defaced, or removed, or (g)
the product is supplied or licensed for beta, evaluation,
testing or demonstration purposes for which Linksys does
not charge a purchase price or license fee.
EXCEPT FOR THE LIMITED WARRANTY ON MEDIA SET
FORTH ABOVE AND TO THE MAXIMUM EXTENT PERMITTED
BY APPLICABLE LAW, ALL SOFTWARE AND SERVICES
PROVIDED BY LINKSYS WITH THE PRODUCT, WHETHER
FACTORY LOADED ON THE PRODUCT OR CONTAINED ON
MEDIA ACCOMPANYING THE PRODUCT, IS PROVIDED “AS
IS” WITHOUT WARRANTY OF ANY KIND. Without limiting
the foregoing, Linksys does not warrant that the operation
of the product, software or services will be uninterrupted
or error free. Also, due to the continual development
of new techniques for intruding upon and attacking
networks, Linksys does not warrant that the product,
software or services, or any equipment, system or network
on which the product, software or services are used will
be free of vulnerability to intrusion or attack. The product
may include or be bundled with third party software or
service offerings. This limited warranty shall not apply to
such third party software or service offerings. This limited
warranty does not guarantee any continued availability
of a third party’s service for which this product’s use or
operation may require.
TO THE
EXTENT
NOT
PROHIBITED
BY
APPLICABLE
LAW,
ALL
IMPLIED
WARRANTIES
AND
CONDITIONS
OF
MERCHANTABILITY,
SATISFACTORY
QUALITY
OR
FITNESS FOR A PARTICULAR PURPOSE ARE LIMITED TO
THE DURATION OF THE WARRANTY PERIOD. ALL OTHER
EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS
AND WARRANTIES, INCLUDING BUT NOT LIMITED TO
ANY IMPLIED WARRANTY OF NON-INFRINGEMENT, ARE
DISCLAIMED.
TO THE EXTENT NOT PROHIBITED BY APPLICABLE LAW, IN
NO EVENT WILL LINKSYS BE LIABLE FOR ANY LOST DATA,
REVENUE OR PROFIT, LOSS OF THE ABILITY TO USE ANY
THIRD PARTY PRODUCTS, SOFTWARE OR SERVICES, OR
FOR SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL
OR PUNITIVE DAMAGES, REGARDLESS OF THE THEORY
OF LIABILITY (INCLUDING NEGLIGENCE), ARISING OUT
OF OR RELATED TO THE USE OF OR INABILITY TO USE
THE PRODUCT, SOFTWARE OR ANY SERVICES PROVIDED
IN RESPECT OF SUCH PRODUCT, SOFTWARE OR SERVICE,
EVEN IF LINKSYS HAS BEEN ADVISED OF THE POSSIBILITY

Rate

4 / 5 based on 1 vote.

Bookmark Our Site

Press Ctrl + D to add this site to your favorites!

Share
Top