/nrf52832-nimble/rt-thread/components/dfs/filesystems/jffs2/cyg/compress/src/ |
H A D | gzio.c | 78 local int get_byte OF((gz_stream *s)); 79 local void check_header OF((gz_stream *s)); 80 local int destroy OF((gz_stream *s)); 82 local uLong getLong OF((gz_stream *s)); 102 gz_stream *s; local 108 s = (gz_stream *)ALLOC(sizeof(gz_stream)); 109 if (!s) return Z_NULL; 111 s->stream.zalloc = (alloc_func)0; 112 s->stream.zfree = (free_func)0; 113 s->stream.opaque = (voidpf)0; [all …]
|
H A D | deflate.c | 73 typedef block_state (*compress_func) OF((deflate_state *s, int flush)); 76 local void fill_window OF((deflate_state *s)); 77 local block_state deflate_stored OF((deflate_state *s, int flush)); 78 local block_state deflate_fast OF((deflate_state *s, int flush)); 80 local block_state deflate_slow OF((deflate_state *s, int flush)); 82 local void lm_init OF((deflate_state *s)); 83 local void putShortMSB OF((deflate_state *s, uInt b)); 89 uInt longest_match OF((deflate_state *s, IPos cur_match)); 91 local uInt longest_match OF((deflate_state *s, IPos cur_match)); 94 local uInt longest_match_fast OF((deflate_state *s, IPos cur_match)); [all …]
|
H A D | infblock.c | 18 /* Table for deflate from PKZIP's appnote.txt. */ 68 void inflate_blocks_reset(s, z, c) in inflate_blocks_reset() argument 69 inflate_blocks_statef *s; in inflate_blocks_reset() 74 *c = s->check; 75 if (s->mode == BTREE || s->mode == DTREE) 76 ZFREE(z, s->sub.trees.blens); 77 if (s->mode == CODES) 78 inflate_codes_free(s->sub.decode.codes, z); 79 s->mode = TYPE; 80 s->bitk = 0; [all …]
|
H A D | trees.c | 143 local void init_block OF((deflate_state *s)); 144 local void pqdownheap OF((deflate_state *s, ct_data *tree, int k)); 145 local void gen_bitlen OF((deflate_state *s, tree_desc *desc)); 147 local void build_tree OF((deflate_state *s, tree_desc *desc)); 148 local void scan_tree OF((deflate_state *s, ct_data *tree, int max_code)); 149 local void send_tree OF((deflate_state *s, ct_data *tree, int max_code)); 150 local int build_bl_tree OF((deflate_state *s)); 151 local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes, 153 local void compress_block OF((deflate_state *s, ct_data *ltree, 155 local void set_data_type OF((deflate_state *s)); [all …]
|
H A D | infutil.c | 23 int inflate_flush(s, z, r) in inflate_flush() argument 24 inflate_blocks_statef *s; in inflate_flush() 34 q = s->read; 37 n = (uInt)((q <= s->write ? s->write : s->end) - q); 46 if (s->checkfn != Z_NULL) 47 z->adler = s->check = (*s->checkfn)(s->check, q, n); 55 if (q == s->end) 58 q = s->window; 59 if (s->write == s->end) 60 s->write = s->window; [all …]
|
/nrf52832-nimble/rt-thread/components/net/uip/apps/webserver/ |
H A D | httpd.c | 82 struct httpd_state *s = (struct httpd_state *)state; in generate_part_of_file() local 84 if(s->file.len > uip_mss()) { in generate_part_of_file() 85 s->len = uip_mss(); in generate_part_of_file() 87 s->len = s->file.len; in generate_part_of_file() 89 memcpy(uip_appdata, s->file.data, s->len); in generate_part_of_file() 91 return s->len; in generate_part_of_file() 95 PT_THREAD(send_file(struct httpd_state *s)) in PT_THREAD() argument 97 PSOCK_BEGIN(&s->sout); in PT_THREAD() 100 PSOCK_GENERATOR_SEND(&s->sout, generate_part_of_file, s); in PT_THREAD() 101 s->file.len -= s->len; in PT_THREAD() [all …]
|
/nrf52832-nimble/rt-thread/components/net/uip/apps/smtp/ |
H A D | smtp.c | 65 static struct smtp_state s; variable 85 PSOCK_BEGIN(&s.psock); in PT_THREAD() 87 PSOCK_READTO(&s.psock, ISO_nl); in PT_THREAD() 89 if(strncmp(s.inputbuffer, smtp_220, 3) != 0) { in PT_THREAD() 90 PSOCK_CLOSE(&s.psock); in PT_THREAD() 92 PSOCK_EXIT(&s.psock); in PT_THREAD() 95 PSOCK_SEND_STR(&s.psock, (char *)smtp_helo); in PT_THREAD() 96 PSOCK_SEND_STR(&s.psock, localhostname); in PT_THREAD() 97 PSOCK_SEND_STR(&s.psock, (char *)smtp_crnl); in PT_THREAD() 99 PSOCK_READTO(&s.psock, ISO_nl); in PT_THREAD() [all …]
|
/nrf52832-nimble/rt-thread/components/net/sal_socket/include/socket/sys_socket/sys/ |
H A D | socket.h | 26 int accept(int s, struct sockaddr *addr, socklen_t *addrlen); 27 int bind(int s, const struct sockaddr *name, socklen_t namelen); 28 int shutdown(int s, int how); 29 int getpeername(int s, struct sockaddr *name, socklen_t *namelen); 30 int getsockname(int s, struct sockaddr *name, socklen_t *namelen); 31 int getsockopt(int s, int level, int optname, void *optval, socklen_t *optlen); 32 int setsockopt(int s, int level, int optname, const void *optval, socklen_t optlen); 33 int connect(int s, const struct sockaddr *name, socklen_t namelen); 34 int listen(int s, int backlog); 35 int recv(int s, void *mem, size_t len, int flags); [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-2.1.0/src/apps/smtp/ |
H A D | smtp.c | 309 static enum smtp_session_state smtp_prepare_mail(struct smtp_session *s, u16_t *tx_buf_len); 310 static void smtp_send_body(struct smtp_session *s, struct altcp_pcb *pcb); 313 static void smtp_send_body_data_handler(struct smtp_session *s, struct altcp_pcb *pcb); 446 static void smtp_free_struct(struct smtp_session *s) in smtp_free_struct() argument 448 if (s->bodydh != NULL) { in smtp_free_struct() 449 SMTP_BODYDH_FREE(s->bodydh); in smtp_free_struct() 451 SMTP_STATE_FREE(s); in smtp_free_struct() 458 smtp_setup_pcb(struct smtp_session *s, const ip_addr_t* remote_ip) in smtp_setup_pcb() argument 472 altcp_arg(pcb, s); in smtp_setup_pcb() 485 smtp_send_mail_alloced(struct smtp_session *s) in smtp_send_mail_alloced() argument [all …]
|
/nrf52832-nimble/packages/NimBLE-latest/ext/tinycrypt/src/ |
H A D | cmac_mode.c | 97 int tc_cmac_setup(TCCmacState_t s, const uint8_t *key, TCAesKeySched_t sched) in tc_cmac_setup() argument 101 if (s == (TCCmacState_t) 0 || in tc_cmac_setup() 106 /* put s into a known state */ in tc_cmac_setup() 107 _set(s, 0, sizeof(*s)); in tc_cmac_setup() 108 s->sched = sched; in tc_cmac_setup() 111 tc_aes128_set_encrypt_key(s->sched, key); in tc_cmac_setup() 113 /* compute s->K1 and s->K2 from s->iv using s->keyid */ in tc_cmac_setup() 114 _set(s->iv, 0, TC_AES_BLOCK_SIZE); in tc_cmac_setup() 115 tc_aes_encrypt(s->iv, s->iv, s->sched); in tc_cmac_setup() 116 gf_double (s->K1, s->iv); in tc_cmac_setup() [all …]
|
H A D | sha256.c | 39 int tc_sha256_init(TCSha256State_t s) in tc_sha256_init() argument 42 if (s == (TCSha256State_t) 0) { in tc_sha256_init() 52 _set((uint8_t *) s, 0x00, sizeof(*s)); in tc_sha256_init() 53 s->iv[0] = 0x6a09e667; in tc_sha256_init() 54 s->iv[1] = 0xbb67ae85; in tc_sha256_init() 55 s->iv[2] = 0x3c6ef372; in tc_sha256_init() 56 s->iv[3] = 0xa54ff53a; in tc_sha256_init() 57 s->iv[4] = 0x510e527f; in tc_sha256_init() 58 s->iv[5] = 0x9b05688c; in tc_sha256_init() 59 s->iv[6] = 0x1f83d9ab; in tc_sha256_init() [all …]
|
H A D | aes_decrypt.c | 62 int tc_aes128_set_decrypt_key(TCAesKeySched_t s, const uint8_t *k) in tc_aes128_set_decrypt_key() argument 64 return tc_aes128_set_encrypt_key(s, k); in tc_aes128_set_decrypt_key() 81 static inline void inv_mix_columns(uint8_t *s) in inv_mix_columns() argument 85 mult_row_column(t, s); in inv_mix_columns() 86 mult_row_column(&t[Nb], s+Nb); in inv_mix_columns() 87 mult_row_column(&t[2*Nb], s+(2*Nb)); in inv_mix_columns() 88 mult_row_column(&t[3*Nb], s+(3*Nb)); in inv_mix_columns() 89 (void)_copy(s, sizeof(t), t, sizeof(t)); in inv_mix_columns() 92 static inline void add_round_key(uint8_t *s, const unsigned int *k) in add_round_key() argument 94 s[0] ^= (uint8_t)(k[0] >> 24); s[1] ^= (uint8_t)(k[0] >> 16); in add_round_key() [all …]
|
H A D | aes_encrypt.c | 70 int tc_aes128_set_encrypt_key(TCAesKeySched_t s, const uint8_t *k) in tc_aes128_set_encrypt_key() argument 79 if (s == (TCAesKeySched_t) 0) { in tc_aes128_set_encrypt_key() 86 s->words[i] = (k[Nb*i]<<24) | (k[Nb*i+1]<<16) | in tc_aes128_set_encrypt_key() 91 t = s->words[i-1]; in tc_aes128_set_encrypt_key() 95 s->words[i] = s->words[i-Nk] ^ t; in tc_aes128_set_encrypt_key() 101 static inline void add_round_key(uint8_t *s, const unsigned int *k) in add_round_key() argument 103 s[0] ^= (uint8_t)(k[0] >> 24); s[1] ^= (uint8_t)(k[0] >> 16); in add_round_key() 104 s[2] ^= (uint8_t)(k[0] >> 8); s[3] ^= (uint8_t)(k[0]); in add_round_key() 105 s[4] ^= (uint8_t)(k[1] >> 24); s[5] ^= (uint8_t)(k[1] >> 16); in add_round_key() 106 s[6] ^= (uint8_t)(k[1] >> 8); s[7] ^= (uint8_t)(k[1]); in add_round_key() [all …]
|
/nrf52832-nimble/rt-thread/components/net/uip/apps/webclient/ |
H A D | webclient.c | 83 static struct webclient_state s; variable 89 return s.mimetype; in webclient_mimetype() 95 return s.file; in webclient_filename() 101 return s.host; in webclient_hostname() 107 return s.port; in webclient_port() 119 s.state = WEBCLIENT_STATE_STATUSLINE; in init_connection() 121 s.getrequestleft = sizeof(http_get) - 1 + 1 + in init_connection() 127 strlen(s.file) + strlen(s.host); in init_connection() 128 s.getrequestptr = 0; in init_connection() 130 s.httpheaderlineptr = 0; in init_connection() [all …]
|
/nrf52832-nimble/packages/NimBLE-latest/nimble/host/src/ |
H A D | ble_gatts_lcl.c | 106 console_printf("%" FIELD_INDENT "s %" FIELD_NAME_LEN "s " in ble_gatt_show_local_chr() 107 "%s\n", " ", "uuid", in ble_gatt_show_local_chr() 109 console_printf("%" FIELD_INDENT "s %" FIELD_NAME_LEN "s " in ble_gatt_show_local_chr() 111 console_printf("%" FIELD_INDENT "s %" FIELD_NAME_LEN "s " in ble_gatt_show_local_chr() 113 console_printf("%" FIELD_INDENT "s %" FIELD_NAME_LEN "s " in ble_gatt_show_local_chr() 115 console_printf("%" FIELD_INDENT "s %" FIELD_NAME_LEN "s " in ble_gatt_show_local_chr() 116 "%s\n", " ", "flags", in ble_gatt_show_local_chr() 122 console_printf("%" FIELD_INDENT "s %" FIELD_NAME_LEN "s " in ble_gatt_show_local_chr() 123 "%s\n", " ", "uuid", in ble_gatt_show_local_chr() 125 console_printf("%" FIELD_INDENT "s %" FIELD_NAME_LEN "s " in ble_gatt_show_local_chr() [all …]
|
/nrf52832-nimble/rt-thread/components/net/uip/apps/dhcpc/ |
H A D | dhcpc.c | 47 static struct dhcpc_state s; variable 111 memcpy(optptr, s.serverid, 4); in add_server_id() 120 memcpy(optptr, s.ipaddr, 4); in add_req_ipaddr() 147 m->hlen = s.mac_len; in create_msg() 157 memcpy(m->chaddr, s.mac_addr, s.mac_len); in create_msg() 158 memset(&m->chaddr[s.mac_len], 0, sizeof(m->chaddr) - s.mac_len); in create_msg() 207 memcpy(s.netmask, optptr + 2, 4); in parse_options() 210 memcpy(s.default_router, optptr + 2, 4); in parse_options() 213 memcpy(s.dnsaddr, optptr + 2, 4); in parse_options() 219 memcpy(s.serverid, optptr + 2, 4); in parse_options() [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-2.0.2/src/include/lwip/ |
H A D | sockets.h | 55 /* If your port already typedef's sa_family_t, define SA_FAMILY_T_DEFINED 60 /* If your port already typedef's in_port_t, define IN_PORT_T_DEFINED 105 /* If your port already typedef's socklen_t, define SOCKLEN_T_DEFINED 121 int s; member 347 * Ioctl's have the command encoded in the lower word, 360 old ioctl's */ 377 #define SIOCSHIWAT _IOW('s', 0, unsigned long) /* set high watermark */ 378 #define SIOCGHIWAT _IOR('s', 1, unsigned long) /* get high watermark */ 379 #define SIOCSLOWAT _IOW('s', 2, unsigned long) /* set low watermark */ 380 #define SIOCGLOWAT _IOR('s', 3, unsigned long) /* get low watermark */ [all …]
|
/nrf52832-nimble/rt-thread/components/net/sal_socket/socket/ |
H A D | net_sockets.c | 19 int accept(int s, struct sockaddr *addr, socklen_t *addrlen) in accept() argument 22 int socket = dfs_net_getsocket(s); in accept() 71 int bind(int s, const struct sockaddr *name, socklen_t namelen) in bind() argument 73 int socket = dfs_net_getsocket(s); in bind() 79 int shutdown(int s, int how) in shutdown() argument 84 d = fd_get(s); in shutdown() 92 socket = dfs_net_getsocket(s); in shutdown() 107 int getpeername(int s, struct sockaddr *name, socklen_t *namelen) in getpeername() argument 109 int socket = dfs_net_getsocket(s); in getpeername() 115 int getsockname(int s, struct sockaddr *name, socklen_t *namelen) in getsockname() argument [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-2.1.0/src/include/lwip/ |
H A D | sockets.h | 58 /* If your port already typedef's sa_family_t, define SA_FAMILY_T_DEFINED 63 /* If your port already typedef's in_port_t, define IN_PORT_T_DEFINED 108 /* If your port already typedef's socklen_t, define SOCKLEN_T_DEFINED 396 * Ioctl's have the command encoded in the lower word, 409 old ioctl's */ 426 #define SIOCSHIWAT _IOW('s', 0, unsigned long) /* set high watermark */ 427 #define SIOCGHIWAT _IOR('s', 1, unsigned long) /* get high watermark */ 428 #define SIOCSLOWAT _IOW('s', 2, unsigned long) /* set low watermark */ 429 #define SIOCGLOWAT _IOR('s', 3, unsigned long) /* get low watermark */ 430 #define SIOCATMARK _IOR('s', 7, unsigned long) /* at oob mark? */ [all …]
|
/nrf52832-nimble/rt-thread/components/net/uip/apps/telnetd/ |
H A D | telnetd.c | 58 static struct telnetd_state s; variable 81 s.state = STATE_CLOSE; in shell_quit() 90 if(s.lines[i] == NULL) { in sendline() 91 s.lines[i] = line; in sendline() 149 while(s.numsent > 0) { in acked() 150 dealloc_line(s.lines[0]); in acked() 152 s.lines[i - 1] = s.lines[i]; in acked() 154 s.lines[TELNETD_CONF_NUMLINES - 1] = NULL; in acked() 155 --s.numsent; in acked() 167 for(s.numsent = 0; s.numsent < TELNETD_CONF_NUMLINES && in senddata() [all …]
|
/nrf52832-nimble/rt-thread/components/net/uip/apps/hello-world/ |
H A D | hello-world.c | 33 static int handle_connection(struct hello_world_state *s); 34 static int rt_show_info(struct hello_world_state *s); 50 * hello_world_appcall so that this funcion is uIP's application 63 struct hello_world_state *s = &(uip_conn->appstate); in hello_world_appcall() local 70 PSOCK_INIT(&s->p, s->inputbuffer, sizeof(s->inputbuffer)); in hello_world_appcall() 71 rt_show_info(s); in hello_world_appcall() 79 handle_connection(s); in hello_world_appcall() 88 static int rt_show_info(struct hello_world_state *s) in rt_show_info() argument 90 PSOCK_BEGIN(&s->p); in rt_show_info() 91 PSOCK_SEND_STR(&s->p,"RT-Thread RTOS"); in rt_show_info() [all …]
|
/nrf52832-nimble/rt-thread/components/libc/compilers/minilibc/ |
H A D | stdlib.c | 16 int atoi(const char* s) in atoi() argument 20 while ( *s == ' ' || (unsigned int)(*s - 9) < 5u) s++; in atoi() 21 switch (*s) in atoi() 26 ++s; in atoi() 28 while ((unsigned int) (*s - '0') < 10u) in atoi() 30 v=v*10+*s-'0'; in atoi() 31 ++s; in atoi() 36 long int atol(const char* s) in atol() argument 40 while ( *s == ' ' || (unsigned int)(*s - 9) < 5u) ++s; in atol() 41 switch (*s) in atol() [all …]
|
/nrf52832-nimble/rt-thread/examples/libc/ |
H A D | printf.c | 47 (void) printf("%15s :, \"", fmt); in intchk() 59 (void) printf("%15s :, \"", fmt); in fltchk() 74 printf("%s\n\n", "# vim:syntax=off:"); in printf_test() 114 printf("#%+15s#\n","ABCDEF"); in printf_test() 116 printf("{ %4d, %-*.*s },\t/* %s */\n", 139, 16, 16, "KEY_A1", "key_a1"); in printf_test() 117 printf("{ %4d, %-*.*s },\t/* %s */\n", 139, 16, 2, "KEY_A1", "key_a1"); in printf_test() 118 printf("{ %4d, %-*.*s },\t/* %s */\n", 139, 2, 16, "KEY_A1", "key_a1"); in printf_test() 119 printf("{ %4d, %-*.*s },\t/* %s */\n", 139, 16, 0, "KEY_A1", "key_a1"); in printf_test() 120 printf("{ %4d, %-*.*s },\t/* %s */\n", 139, 0, 16, "KEY_A1", "key_a1"); in printf_test() 121 printf("{ %4d, %-*.*s },\t/* %s */\n", 139, 0, 0, "KEY_A1", "key_a1"); in printf_test() [all …]
|
/nrf52832-nimble/rt-thread/tools/kconfig-frontends/libs/parser/ |
H A D | util.c | 50 fprintf(out, "\t%s \\\n", file->name); in file_write_dep() 52 fprintf(out, "\t%s\n", file->name); in file_write_dep() 54 fprintf(out, "\n%s: \\\n" in file_write_dep() 68 fprintf(out, "ifneq \"$(%s)\" \"%s\"\n", env_sym->name, value); in file_write_dep() 69 fprintf(out, "%s: FORCE\n", conf_get_autoconfig_name()); in file_write_dep() 84 gs.s = xmalloc(sizeof(char) * 64); in str_new() 87 strcpy(gs.s, "\0"); in str_new() 94 if (gs->s) in str_free() 95 free(gs->s); in str_free() 96 gs->s = NULL; in str_free() [all …]
|
/nrf52832-nimble/rt-thread/components/net/uip/uip/ |
H A D | psock.c | 145 send_data(register struct psock *s) in send_data() argument 147 if(s->state != STATE_DATA_SENT || uip_rexmit()) { in send_data() 148 if(s->sendlen > uip_mss()) { in send_data() 149 uip_send(s->sendptr, uip_mss()); in send_data() 151 uip_send(s->sendptr, s->sendlen); in send_data() 153 s->state = STATE_DATA_SENT; in send_data() 160 data_acked(register struct psock *s) in data_acked() argument 162 if(s->state == STATE_DATA_SENT && uip_acked()) { in data_acked() 163 if(s->sendlen > uip_mss()) { in data_acked() 164 s->sendlen -= uip_mss(); in data_acked() [all …]
|