NetBurner 3.1
SSH/SecureSerToEthFactoryApp/formtools.h
1 /* Revision: 2.8.7 */
2 
3 /******************************************************************************
4 * Copyright 1998-2018 NetBurner, Inc. ALL RIGHTS RESERVED
5 *
6 * Permission is hereby granted to purchasers of NetBurner Hardware to use or
7 * modify this computer program for any use as long as the resultant program
8 * is only executed on NetBurner provided hardware.
9 *
10 * No other rights to use this program or its derivatives in part or in
11 * whole are granted.
12 *
13 * It may be possible to license this or other NetBurner software for use on
14 * non-NetBurner Hardware. Contact sales@Netburner.com for more information.
15 *
16 * NetBurner makes no representation or warranties with respect to the
17 * performance of this computer program, and specifically disclaims any
18 * responsibility for any damages, special or consequential, connected with
19 * the use of this program.
20 *
21 * NetBurner
22 * 5405 Morehouse Dr.
23 * San Diego, CA 92121
24 * www.netburner.com
25 ******************************************************************************/
26 
27 
28 #ifndef _FORM_TOOL_H_
29 #define _FORM_TOOL_H_
30 
31 void ShowIP2Sock( int sock, IPADDR ip );
32 
33 /* -----------------------------------------------------------------------------
34  * Functions to manage HTML form creation.
35  * -------------------------------------------------------------------------- */
36 
37 unsigned char asciiString2Byte(unsigned char *value);
38 // Output a selection
39 // Item 1 = First selection item!
40 void FormOutputI2CBaudRate( int sock, const char* name, int selnum );
41 void FormOutputSelect( int sock, const char* name, int selnum, const char** list );
42 void FormOutputSelectValueOnClick( int sock, const char* name, int selnum,
43  const char** labellist, const char** valuelist, const char** onclicklist );
44 
45 // Output a check box
46 void FormOutputCheckbox( int sock, const char* name, BOOL checked );
47 
48 // Output an input box
49 void FormOutputInput( int sock, const char* name, int siz, const char* val );
50 
51 // Output an input box for numbers
52 void FormOutputNumInput( int sock, const char* name, int siz, int val );
53 
54 // Output an input box for bytes
55 void FormOutputByteInput(int sock, const char* name, int siz, int val);
56 
57 // Output an input box for IP addresses
58 void FormOutputIPInput( int sock, const char* name, IPADDR4 ip );
59 
60 
61 /* -----------------------------------------------------------------------------
62  * Functions to manage HTML data extraction.
63  *--------------------------------------------------------------------------- */
64 
65 // Extract an IP address from the post data
66 IPADDR FormExtractIP( const char* name, char* pData, IPADDR def_val );
67 
68 // Extract a number from the post data
69 long FormExtractNum( const char* name, char* pData, long def_val );
70 
71 // Extract a byte from the post data
72 long FormExtractByte(const char* name, char* pData, long def_val);
73 
74 // Extract a check box state from the post data
75 BOOL FormExtractCheck( const char* name, char* pData, BOOL def_val );
76 
77 // Extract a selection from a select box
78 // Item 1 = First selection item!
79 int FormExtractSel( const char* name, char* pdata, const char** pList, int defsel );
80 
81 
82 #endif /* _FORM_TOOL_H_ */
Used to hold and manipulate IPv4 and IPv6 addresses in dual stack mode.
Definition: ipv6_addr.h:28