www.usr.com/support/gpl/USR9113_release1.0.tar.gz
[bcm963xx.git] / userapps / opensource / ftpd / fwsyscall.h
1 #ifndef FW_SYSCALL_H
2 #define FW_SYSCALL_H
3
4 #include <net/if.h>
5
6 #include "bcmtypes.h"
7 #include "board_api.h"
8 #include "clidefs.h"
9 #include "syscall.h"
10 #include "psidefs.h"
11 #include "version.h"
12 #include "psixml.h"
13
14 #define SEC_BUFF_MAX_LEN     16     // from secdefs.h
15 #define IFC_NAME_LEN                 16         // from ifcdefs.h
16
17 /* HTTP upload image formats. */
18 typedef enum
19 {
20     NO_IMAGE_FORMAT,
21     BROADCOM_IMAGE_FORMAT,
22     FLASH_IMAGE_FORMAT,
23     PSI_IMAGE_FORMAT,
24 } PARSE_RESULT;
25
26
27 typedef enum
28 {
29     BUF_ALL_TYPES,
30     BUF_IMAGES,
31     BUF_CONFIG_DATA,
32 } BUFFER_TYPE;
33
34 typedef enum
35 {
36     UPLOAD_OK,
37     UPLOAD_FAIL_NO_MEM,
38     UPLOAD_FAIL_ILLEGAL_IMAGE,
39     UPLOAD_FAIL_FLASH,
40     UPLOAD_FAIL_FTP,
41 } UPLOAD_RESULT;
42
43 #define     SKIP_NONE_APP       0x00000000
44 #define     SKIP_TELNETD_APP    0x00000001
45 #define     SKIP_SSHD_APP       0x00000002
46 #define     SKIP_HTTPD_APP      0x00000004
47
48
49 #if defined(__cplusplus)
50 extern "C" {
51 #endif
52 PARSE_RESULT parseImageData(char *image_start_ptr, int bufSize, BUFFER_TYPE fBufType);
53 UPLOAD_RESULT flashImage(char *imagePtr, PARSE_RESULT imageType, int imageLen);
54 int bcmCheckEnable(char *appName, struct in_addr clntAddr);
55 int bcmSocketIfPid(void);
56 void killAllApps(int socketPid, int skipApp, int telnetIfcPid, int sshdIfcPid);
57 #if defined(__cplusplus)
58 }
59 #endif   // defined(__cplusplus)
60
61 #endif