Changeset 387 for asp3_tinet_ecnl_arm
- Timestamp:
- May 22, 2019, 4:09:18 PM (4 years ago)
- Location:
- asp3_tinet_ecnl_arm/trunk
- Files:
-
- 8 added
- 71 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
asp3_tinet_ecnl_arm/trunk/app1_usb_watt_meter/Debug/Makefile
r374 r387 204 204 APPLDIRS := $(APPLDIRS) $(SRCDIR)/$(TINETDIR)/netapp 205 205 APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o ntp_cli.o net_misc.o 206 APPLDIRS := $(APPLDIRS) ../../ntshell/ tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src207 APPL_COBJS := $(APPL_COBJS) netcmd.o fdtable.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o sdfs.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o206 APPLDIRS := $(APPLDIRS) ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src 207 APPL_COBJS := $(APPL_COBJS) netcmd.o fdtable.o stdio_stub.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o sdfs.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o 208 208 APPLDIRS := $(APPLDIRS) ../../ntshell/lcd 209 209 APPL_COBJS := $(APPL_COBJS) draw_font.o shnm12_font.o -
asp3_tinet_ecnl_arm/trunk/app1_usb_watt_meter/DebugEnbt/Makefile
r374 r387 204 204 APPLDIRS := $(APPLDIRS) $(SRCDIR)/$(TINETDIR)/netapp 205 205 APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o ntp_cli.o net_misc.o 206 APPLDIRS := $(APPLDIRS) ../../ntshell/ tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src207 APPL_COBJS := $(APPL_COBJS) netcmd.o fdtable.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o sdfs.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o206 APPLDIRS := $(APPLDIRS) ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src 207 APPL_COBJS := $(APPL_COBJS) netcmd.o fdtable.o stdio_stub.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o sdfs.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o 208 208 APPLDIRS := $(APPLDIRS) ../../ntshell/lcd 209 209 APPL_COBJS := $(APPL_COBJS) draw_font.o shnm12_font.o -
asp3_tinet_ecnl_arm/trunk/app1_usb_watt_meter/DebugEther/Makefile
r374 r387 204 204 APPLDIRS := $(APPLDIRS) $(SRCDIR)/$(TINETDIR)/netapp 205 205 APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o ntp_cli.o net_misc.o 206 APPLDIRS := $(APPLDIRS) ../../ntshell/ tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src207 APPL_COBJS := $(APPL_COBJS) netcmd.o fdtable.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o sdfs.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o206 APPLDIRS := $(APPLDIRS) ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src 207 APPL_COBJS := $(APPL_COBJS) netcmd.o fdtable.o stdio_stub.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o sdfs.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o 208 208 APPLDIRS := $(APPLDIRS) ../../ntshell/lcd 209 209 APPL_COBJS := $(APPL_COBJS) draw_font.o shnm12_font.o -
asp3_tinet_ecnl_arm/trunk/app1_usb_watt_meter/src/main.c
r374 r387 66 66 #include "ffarch.h" 67 67 #include "ff.h" 68 #include "core/ntshell.h"69 #include "core/ntlibc.h"70 68 #include <stdio.h> 71 69 #include "usrcmd.h" 72 #include "util/ntopt.h"73 #include "socket_stub.h"74 70 #include "gpio_api.h" 75 71 #include "usb_hbth.h" -
asp3_tinet_ecnl_arm/trunk/app1_usb_watt_meter/src/main.cdl
r352 r387 22 22 * ターゲット依存部の取り込み 23 23 */ 24 import(" target.cdl");24 import("ntshell.cdl"); 25 25 26 26 /* -
asp3_tinet_ecnl_arm/trunk/app2_light/Debug/Makefile
r374 r387 189 189 APPLDIRS := $(APPLDIRS) $(SRCDIR)/$(TINETDIR)/netapp 190 190 APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o ntp_cli.o net_misc.o 191 APPLDIRS := $(APPLDIRS) ../../ntshell/ tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src192 APPL_COBJS := $(APPL_COBJS) netcmd.o fdtable.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o sdfs.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o191 APPLDIRS := $(APPLDIRS) ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src 192 APPL_COBJS := $(APPL_COBJS) netcmd.o fdtable.o stdio_stub.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o sdfs.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o 193 193 194 194 # -
asp3_tinet_ecnl_arm/trunk/app2_light/DebugEther/Makefile
r374 r387 187 187 APPLDIRS := $(APPLDIRS) $(SRCDIR)/$(TINETDIR)/netapp 188 188 APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o ntp_cli.o net_misc.o 189 APPLDIRS := $(APPLDIRS) ../../ntshell/ tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src190 APPL_COBJS := $(APPL_COBJS) netcmd.o fdtable.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o sdfs.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o189 APPLDIRS := $(APPLDIRS) ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src 190 APPL_COBJS := $(APPL_COBJS) netcmd.o fdtable.o stdio_stub.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o sdfs.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o 191 191 192 192 # -
asp3_tinet_ecnl_arm/trunk/app2_light/src/main.c
r374 r387 65 65 #include "ffarch.h" 66 66 #include "ff.h" 67 #include "core/ntshell.h"68 #include "core/ntlibc.h"69 67 #include <stdio.h> 70 68 #include "usrcmd.h" 71 #include "util/ntopt.h"72 #include "socket_stub.h"73 69 #include "gpio_api.h" 74 70 #include "usb_hbth.h" -
asp3_tinet_ecnl_arm/trunk/app2_light/src/main.cdl
r352 r387 22 22 * ターゲット依存部の取り込み 23 23 */ 24 import(" target.cdl");24 import("ntshell.cdl"); 25 25 26 26 /* -
asp3_tinet_ecnl_arm/trunk/app3_human_detec/Debug/Makefile
r374 r387 189 189 APPLDIRS := $(APPLDIRS) $(SRCDIR)/$(TINETDIR)/netapp 190 190 APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o ntp_cli.o net_misc.o 191 APPLDIRS := $(APPLDIRS) ../../ntshell/ tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src192 APPL_COBJS := $(APPL_COBJS) netcmd.o fdtable.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o sdfs.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o191 APPLDIRS := $(APPLDIRS) ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src 192 APPL_COBJS := $(APPL_COBJS) netcmd.o fdtable.o stdio_stub.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o sdfs.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o 193 193 194 194 # -
asp3_tinet_ecnl_arm/trunk/app3_human_detec/DebugEther/Makefile
r374 r387 187 187 APPLDIRS := $(APPLDIRS) $(SRCDIR)/$(TINETDIR)/netapp 188 188 APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o ntp_cli.o net_misc.o 189 APPLDIRS := $(APPLDIRS) ../../ntshell/ tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src190 APPL_COBJS := $(APPL_COBJS) netcmd.o fdtable.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o sdfs.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o189 APPLDIRS := $(APPLDIRS) ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src 190 APPL_COBJS := $(APPL_COBJS) netcmd.o fdtable.o stdio_stub.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o sdfs.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o 191 191 192 192 # -
asp3_tinet_ecnl_arm/trunk/app3_human_detec/src/main.c
r374 r387 65 65 #include "ffarch.h" 66 66 #include "ff.h" 67 #include "core/ntshell.h"68 #include "core/ntlibc.h"69 67 #include <stdio.h> 70 68 #include "usrcmd.h" 71 #include "util/ntopt.h"72 #include "socket_stub.h"73 69 #include "gpio_api.h" 74 70 #include "usb_hbth.h" -
asp3_tinet_ecnl_arm/trunk/app3_human_detec/src/main.cdl
r352 r387 22 22 * ターゲット依存部の取り込み 23 23 */ 24 import(" target.cdl");24 import("ntshell.cdl"); 25 25 26 26 /* -
asp3_tinet_ecnl_arm/trunk/app4_aircon/Debug/Makefile
r374 r387 195 195 APPLDIRS := $(APPLDIRS) $(SRCDIR)/$(TINETDIR)/netapp 196 196 APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o ntp_cli.o net_misc.o 197 APPLDIRS := $(APPLDIRS) ../../ntshell/ tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src198 APPL_COBJS := $(APPL_COBJS) netcmd.o fdtable.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o sdfs.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o197 APPLDIRS := $(APPLDIRS) ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src 198 APPL_COBJS := $(APPL_COBJS) netcmd.o fdtable.o stdio_stub.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o sdfs.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o 199 199 APPLDIRS := $(APPLDIRS) ../../ntshell/lcd 200 200 APPL_COBJS := $(APPL_COBJS) draw_font.o shnm12_font.o -
asp3_tinet_ecnl_arm/trunk/app4_aircon/DebugEther/Makefile
r374 r387 193 193 APPLDIRS := $(APPLDIRS) $(SRCDIR)/$(TINETDIR)/netapp 194 194 APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o ntp_cli.o net_misc.o 195 APPLDIRS := $(APPLDIRS) ../../ntshell/ tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src196 APPL_COBJS := $(APPL_COBJS) netcmd.o fdtable.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o sdfs.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o195 APPLDIRS := $(APPLDIRS) ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src 196 APPL_COBJS := $(APPL_COBJS) netcmd.o fdtable.o stdio_stub.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o sdfs.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o 197 197 APPLDIRS := $(APPLDIRS) ../../ntshell/lcd 198 198 APPL_COBJS := $(APPL_COBJS) draw_font.o shnm12_font.o -
asp3_tinet_ecnl_arm/trunk/app4_aircon/src/main.c
r374 r387 65 65 #include "ffarch.h" 66 66 #include "ff.h" 67 #include "core/ntshell.h"68 #include "core/ntlibc.h"69 67 #include <stdio.h> 70 68 #include "usrcmd.h" 71 #include "util/ntopt.h"72 #include "socket_stub.h"73 69 #include "gpio_api.h" 74 70 #include "usb_hbth.h" -
asp3_tinet_ecnl_arm/trunk/app4_aircon/src/main.cdl
r352 r387 22 22 * ターゲット依存部の取り込み 23 23 */ 24 import(" target.cdl");24 import("ntshell.cdl"); 25 25 26 26 /* -
asp3_tinet_ecnl_arm/trunk/app5_temp_sensor/Debug/Makefile
r374 r387 195 195 APPLDIRS := $(APPLDIRS) $(SRCDIR)/$(TINETDIR)/netapp 196 196 APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o ntp_cli.o net_misc.o 197 APPLDIRS := $(APPLDIRS) ../../ntshell/ tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src198 APPL_COBJS := $(APPL_COBJS) netcmd.o fdtable.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o sdfs.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o197 APPLDIRS := $(APPLDIRS) ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src 198 APPL_COBJS := $(APPL_COBJS) netcmd.o fdtable.o stdio_stub.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o sdfs.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o 199 199 APPLDIRS := $(APPLDIRS) ../../ntshell/lcd 200 200 APPL_COBJS := $(APPL_COBJS) draw_font.o shnm12_font.o -
asp3_tinet_ecnl_arm/trunk/app5_temp_sensor/DebugEther/Makefile
r374 r387 193 193 APPLDIRS := $(APPLDIRS) $(SRCDIR)/$(TINETDIR)/netapp 194 194 APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o ntp_cli.o net_misc.o 195 APPLDIRS := $(APPLDIRS) ../../ntshell/ tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src196 APPL_COBJS := $(APPL_COBJS) netcmd.o fdtable.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o sdfs.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o195 APPLDIRS := $(APPLDIRS) ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src 196 APPL_COBJS := $(APPL_COBJS) netcmd.o fdtable.o stdio_stub.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o sdfs.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o 197 197 APPLDIRS := $(APPLDIRS) ../../ntshell/lcd 198 198 APPL_COBJS := $(APPL_COBJS) draw_font.o shnm12_font.o -
asp3_tinet_ecnl_arm/trunk/app5_temp_sensor/src/main.c
r374 r387 65 65 #include "ffarch.h" 66 66 #include "ff.h" 67 #include "core/ntshell.h"68 #include "core/ntlibc.h"69 67 #include <stdio.h> 70 68 #include "usrcmd.h" 71 #include "util/ntopt.h"72 #include "socket_stub.h"73 69 #include "gpio_api.h" 74 70 #include "usb_hbth.h" -
asp3_tinet_ecnl_arm/trunk/app5_temp_sensor/src/main.cdl
r352 r387 22 22 * ターゲット依存部の取り込み 23 23 */ 24 import(" target.cdl");24 import("ntshell.cdl"); 25 25 26 26 /* -
asp3_tinet_ecnl_arm/trunk/app6_hot_water_pot/Debug/Makefile
r374 r387 189 189 APPLDIRS := $(APPLDIRS) $(SRCDIR)/$(TINETDIR)/netapp 190 190 APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o ntp_cli.o net_misc.o 191 APPLDIRS := $(APPLDIRS) ../../ntshell/ tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src192 APPL_COBJS := $(APPL_COBJS) netcmd.o fdtable.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o sdfs.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o191 APPLDIRS := $(APPLDIRS) ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src 192 APPL_COBJS := $(APPL_COBJS) netcmd.o fdtable.o stdio_stub.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o sdfs.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o 193 193 194 194 # -
asp3_tinet_ecnl_arm/trunk/app6_hot_water_pot/DebugEther/Makefile
r374 r387 187 187 APPLDIRS := $(APPLDIRS) $(SRCDIR)/$(TINETDIR)/netapp 188 188 APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o ntp_cli.o net_misc.o 189 APPLDIRS := $(APPLDIRS) ../../ntshell/ tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src190 APPL_COBJS := $(APPL_COBJS) netcmd.o fdtable.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o sdfs.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o189 APPLDIRS := $(APPLDIRS) ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src 190 APPL_COBJS := $(APPL_COBJS) netcmd.o fdtable.o stdio_stub.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o sdfs.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o 191 191 192 192 # -
asp3_tinet_ecnl_arm/trunk/app6_hot_water_pot/src/main.c
r374 r387 65 65 #include "ffarch.h" 66 66 #include "ff.h" 67 #include "core/ntshell.h"68 #include "core/ntlibc.h"69 67 #include <stdio.h> 70 68 #include "usrcmd.h" 71 #include "util/ntopt.h"72 #include "socket_stub.h"73 69 #include "gpio_api.h" 74 70 #include "usb_hbth.h" -
asp3_tinet_ecnl_arm/trunk/app6_hot_water_pot/src/main.cdl
r352 r387 22 22 * ターゲット依存部の取り込み 23 23 */ 24 import(" target.cdl");24 import("ntshell.cdl"); 25 25 26 26 /* -
asp3_tinet_ecnl_arm/trunk/app7_buzzer/Debug/Makefile
r374 r387 189 189 APPLDIRS := $(APPLDIRS) $(SRCDIR)/$(TINETDIR)/netapp 190 190 APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o ntp_cli.o net_misc.o 191 APPLDIRS := $(APPLDIRS) ../../ntshell/ tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src192 APPL_COBJS := $(APPL_COBJS) netcmd.o fdtable.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o sdfs.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o191 APPLDIRS := $(APPLDIRS) ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src 192 APPL_COBJS := $(APPL_COBJS) netcmd.o fdtable.o stdio_stub.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o sdfs.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o 193 193 194 194 # -
asp3_tinet_ecnl_arm/trunk/app7_buzzer/DebugEther/Makefile
r374 r387 187 187 APPLDIRS := $(APPLDIRS) $(SRCDIR)/$(TINETDIR)/netapp 188 188 APPL_COBJS := $(APPL_COBJS) ping.o ping6.o resolver.o dhcp4_cli.o netapp_subr.o ntp_cli.o net_misc.o 189 APPLDIRS := $(APPLDIRS) ../../ntshell/ tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src190 APPL_COBJS := $(APPL_COBJS) netcmd.o fdtable.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o sdfs.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o189 APPLDIRS := $(APPLDIRS) ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src 190 APPL_COBJS := $(APPL_COBJS) netcmd.o fdtable.o stdio_stub.o io_stub.o socket_stub.o ffarch.o diskio.o ff.o sdfs.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o 191 191 192 192 # -
asp3_tinet_ecnl_arm/trunk/app7_buzzer/src/main.c
r374 r387 65 65 #include "ffarch.h" 66 66 #include "ff.h" 67 #include "core/ntshell.h"68 #include "core/ntlibc.h"69 67 #include <stdio.h> 70 68 #include "usrcmd.h" 71 #include "util/ntopt.h"72 #include "socket_stub.h"73 69 #include "gpio_api.h" 74 70 #include "usb_hbth.h" -
asp3_tinet_ecnl_arm/trunk/app7_buzzer/src/main.cdl
r352 r387 22 22 * ターゲット依存部の取り込み 23 23 */ 24 import(" target.cdl");24 import("ntshell.cdl"); 25 25 26 26 /* -
asp3_tinet_ecnl_arm/trunk/asp3_dcre/gdic/adafruit_ssd1306/Makefile.config
r374 r387 39 39 # @(#) $Id$ 40 40 # 41 41 42 42 # 43 43 # Makefile のプロセッサ依存 (adafruit ssd1306:OLED用) -
asp3_tinet_ecnl_arm/trunk/asp3_dcre/mbed/mbed_stub.c
r377 r387 66 66 #include "t_syslog.h" 67 67 68 extern void musl_start(const char *const args); 69 68 70 int main() 69 71 { … … 182 184 } 183 185 184 __attribute__((weak)) 185 void *SYS_brk(void *addr) 186 void *shell_brk(void *addr) 186 187 { 187 188 if (addr == 0) { … … 194 195 } 195 196 196 __attribute__((weak)) 197 void *SYS_mmap2(void *start, size_t length, int prot, int flags, int fd, off_t pgoffset) 197 void *shell_mmap2(void *start, size_t length, int prot, int flags, int fd, off_t pgoffset) 198 198 { 199 199 if (fd != -1) … … 206 206 } 207 207 208 __attribute__((weak)) 209 int SYS_mprotect(void *addr, size_t len, int prot) 208 int shell_mprotect(void *addr, size_t len, int prot) 210 209 { 211 210 //if ((addr >= (void *)&__HeapBase) && (addr + len < (void *)&__HeapLimit)) { … … 216 215 217 216 __attribute__((weak)) 217 long SYS_brk(long a) { 218 return (long)shell_brk((void *)a); 219 } 220 221 __attribute__((weak)) 222 long SYS_mmap2(long a, long b, long c, long d, long e, long f, long g) { 223 return (int)shell_mmap2((void *)a, (size_t)b, (int)c, (int)d, (int)e, ((off_t)f << 32) | (off_t)g); 224 } 225 226 __attribute__((weak)) 227 long SYS_mprotect(long a, long b, long c) { 228 return shell_mprotect((void *)a, (size_t)b, (int)c); 229 } 230 231 __attribute__((weak)) 218 232 long SYS_madvise() 219 233 { … … 235 249 int malloc_lock_sem_count[TNUM_TSKID]; 236 250 251 __attribute__((weak)) 237 252 void __malloc_lock(struct _reent *_r) 238 253 { … … 261 276 } 262 277 278 __attribute__((weak)) 263 279 void __malloc_unlock(struct _reent *_r) 264 280 { -
asp3_tinet_ecnl_arm/trunk/asp3_dcre/mbed/tMbedSerial.c
r374 r387 130 130 131 131 if (serial_readable(obj)) { 132 if (c = serial_getc(obj)) { 133 return((int_t) c); 134 } 132 return serial_getc(obj); 135 133 } 136 134 return(-1); -
asp3_tinet_ecnl_arm/trunk/asp3_dcre/mbed/targets/TARGET_RENESAS/TARGET_RZA1XX/serial_api.c
r374 r387 344 344 } 345 345 } 346 346 347 347 if (uart_data[index].irq_handler != NULL) 348 348 uart_data[index].irq_handler(uart_data[index].serial_irq_id, TxIrq); … … 409 409 } 410 410 } 411 411 412 412 if (uart_data[index].irq_handler != NULL) 413 413 uart_data[index].irq_handler(uart_data[index].serial_irq_id, RxIrq); -
asp3_tinet_ecnl_arm/trunk/asp3_dcre/target/gr_peach_gcc/gr_peach.h
r352 r387 58 58 59 59 /* 60 * ボーレート設定 61 */ 62 #define UART_BAUDRATE 115200 63 64 /* 60 65 * LEDの点灯/消灯 61 66 */ -
asp3_tinet_ecnl_arm/trunk/asp3_dcre/target/gr_peach_gcc/target.cdl
r352 r387 60 60 * ターゲット依存のセルタイプの定義 61 61 */ 62 import(" tPutLogGRPeach.cdl");62 import("syssvc/tPutLogSIOPort.cdl"); 63 63 import("tSIOPortGRPeach.cdl"); 64 64 … … 72 72 * 低レベル出力の組み上げ記述 73 73 */ 74 cell tPutLog GRPeachPutLogTarget {74 cell tPutLogSIOPort PutLogTarget { 75 75 /* SIOドライバとの結合 */ 76 76 cSIOPort = SIOPortTarget1.eSIOPort; -
asp3_tinet_ecnl_arm/trunk/asp3_dcre/target/gr_peach_gcc/target_kernel_impl.c
r374 r387 264 264 */ 265 265 #ifndef TOPPERS_OMIT_TECS 266 tPutLog GRPeach_initialize();266 tPutLogSIOPort_initialize(); 267 267 #endif /* TOPPERS_OMIT_TECS */ 268 268 } -
asp3_tinet_ecnl_arm/trunk/asp3_dcre/tinet/netapp/Makefile.netapp
r352 r387 183 183 NETAPP_COBJS := $(NETAPP_COBJS) udp6_echo_cli.o 184 184 NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIRS)/udp6_echo_cli.cfg 185 185 186 186 ifeq ($(SUPPORT_INET4),true) 187 187 ifeq ($(USE_UDP4_ECHO_CLI),true) … … 191 191 endif 192 192 endif 193 193 else 194 194 ifeq ($(SUPPORT_INET4),true) 195 195 SUPPORT_UDP = true -
asp3_tinet_ecnl_arm/trunk/asp3_dcre/tinet/netinet/in_itron.h
r364 r387 131 131 extern ER_UINT udp6_snd_dat (ID cepid, T_IPV6EP *p_dstaddr, void *data, int_t len, TMO tmout); 132 132 extern ER_UINT udp6_rcv_dat (ID cepid, T_IPV6EP *p_dstaddr, void *data, int_t len, TMO tmout); 133 extern ER udp6_can_cep(ID cepid, FN fncd); 133 134 134 135 /* 【拡張機能】 */ … … 139 140 extern ER udp_cre_cep (ID cepid, T_UDP_CCEP *pk_ccep); 140 141 142 extern ER udp6_del_cep(ID cepid); 143 extern ER udp6_set_opt(ID cepid, int_t optname, void *optval, int_t optlen); 144 extern ER udp6_get_opt(ID cepid, int_t optname, void *optval, int_t optlen); 141 145 extern ER udp6_cre_cep (ID cepid, T_UDP6_CCEP *pk_ccep); 142 146 -
asp3_tinet_ecnl_arm/trunk/asp3_dcre/tinet/netinet/tcp_input.c
r364 r387 521 521 522 522 /* 相手のアドレスをコピーする。*/ 523 524 #if defined(_IP6_CFG) && defined(_IP4_CFG) 525 526 if (cep->flags & TCP_CEP_FLG_IPV4) { 527 (*cep->p_dstaddr4).ipaddr = ntohl(cep->dstaddr.ipaddr.s6_addr32[3]); 528 (*cep->p_dstaddr4).portno = cep->dstaddr.portno; 529 } 530 else 531 *cep->p_dstaddr = cep->dstaddr; 532 533 #else /* of #if defined(_IP6_CFG) && defined(_IP4_CFG) */ 534 523 535 *cep->p_dstaddr = cep->dstaddr; 536 537 #endif /* of #if defined(_IP6_CFG) && defined(_IP4_CFG) */ 524 538 525 539 if (IS_PTR_DEFINED(cep->callback)) { … … 847 861 848 862 /* 相手のアドレスをコピーする。*/ 863 864 #if defined(_IP6_CFG) && defined(_IP4_CFG) 865 866 if (cep->flags & TCP_CEP_FLG_IPV4) { 867 (*cep->p_dstaddr4).ipaddr = ntohl(cep->dstaddr.ipaddr.s6_addr32[3]); 868 (*cep->p_dstaddr4).portno = cep->dstaddr.portno; 869 } 870 else 871 *cep->p_dstaddr = cep->dstaddr; 872 873 #else /* of #if defined(_IP6_CFG) && defined(_IP4_CFG) */ 874 849 875 *cep->p_dstaddr = cep->dstaddr; 876 877 #endif /* of #if defined(_IP6_CFG) && defined(_IP4_CFG) */ 850 878 851 879 if (IS_PTR_DEFINED(cep->callback)) { -
asp3_tinet_ecnl_arm/trunk/asp3_dcre/tinet/netinet/tcpn_usrreq.c
r352 r387 671 671 cep->p_myaddr4 = p_myaddr; 672 672 cep->p_dstaddr = NULL; 673 cep->p_myaddr = N ULL;673 cep->p_myaddr = NADR; 674 674 675 675 #else /* of #if API_PROTO == API_PROTO_IPV4 */ 676 676 677 677 cep->p_dstaddr4 = NULL; 678 cep->p_myaddr4 = N ULL;678 cep->p_myaddr4 = NADR; 679 679 cep->p_dstaddr = p_dstaddr; 680 680 cep->p_myaddr = p_myaddr; -
asp3_tinet_ecnl_arm/trunk/asp3_dcre/tinet/netinet/udp_output.c
r352 r387 182 182 #if defined(_IP6_CFG) && TNUM_UDP6_CEPID > 0 183 183 184 for (ix = tmax_udp6_cepid; ix -- > 0; ) {184 for (ix = TNUM_UDP6_CEPID - 1; ix -- > 0; ) { 185 185 186 186 if (udp6_cep[ix].flags & UDP_CEP_FLG_POST_OUTPUT) { … … 194 194 #if defined(_IP4_CFG) && TNUM_UDP4_CEPID > 0 195 195 196 for (ix = tmax_udp4_cepid; ix -- > 0; ) {196 for (ix = TNUM_UDP4_CEPID - 1; ix -- > 0; ) { 197 197 198 198 if (udp4_cep[ix].flags & UDP_CEP_FLG_POST_OUTPUT) { -
asp3_tinet_ecnl_arm/trunk/asp3_dcre/tinet/netinet/udp_subr.c
r352 r387 146 146 #define UDP_FIND_CEP udp6_find_cep 147 147 #define UDP_NOTIFY udp6_notify 148 #define TMAX_UDP_CEPID tmax_udp6_cepid148 #define TMAX_UDP_CEPID (TNUM_UDP6_CEPID - 1) 149 149 #define UDP_CEP udp6_cep 150 150 #define T_UDP_CEP T_UDP6_CEP … … 183 183 #define UDP_FIND_CEP udp4_find_cep 184 184 #define UDP_NOTIFY udp4_notify 185 #define TMAX_UDP_CEPID tmax_udp4_cepid185 #define TMAX_UDP_CEPID (TNUM_UDP4_CEPID - 1) 186 186 #define T_UDP_CEP T_UDP4_CEP 187 187 #define UDP_CEP udp4_cep -
asp3_tinet_ecnl_arm/trunk/asp3_dcre/tinet/netinet/udpn_usrreq.c
r364 r387 308 308 else 309 309 error = UDP_ALLOC_PORT(cep, pk_ccep->myaddr.portno); 310 311 if (error == E_OK) { 312 313 /* UDP 通信端点生成情報をコピーする。*/ 314 cep->cepatr = pk_ccep->cepatr; /* 通信端点属性 */ 315 cep->myaddr.ipaddr = pk_ccep->myaddr.ipaddr; /* 自分のアドレス */ 316 cep->callback = (void*)pk_ccep->callback; /* コールバック */ 317 318 /* UDP 通信端点を生成済みにする。*/ 319 cep->flags |= UDP_CEP_FLG_VALID; 320 } 321 } 310 311 if (error == E_OK) { 312 /* UDP 通信端点生成情報をコピーする。*/ 313 cep->cepatr = pk_ccep->cepatr; /* 通信端点属性 */ 314 cep->myaddr.ipaddr = pk_ccep->myaddr.ipaddr; /* 自分のアドレス */ 315 cep->callback = (void*)pk_ccep->callback; /* コールバック */ 316 317 /* UDP 通信端点を生成済みにする。*/ 318 cep->flags |= UDP_CEP_FLG_VALID; 319 } 320 } 322 321 323 322 /* 通信端点のロックを解除する。*/ -
asp3_tinet_ecnl_arm/trunk/asp3_dcre/tinet/netinet6/nd6_rtr.c
r352 r387 999 999 return; 1000 1000 1001 1002 1003 1004 1005 1001 /* ルータ要請ヘッダを設定する。*/ 1002 rsh = GET_ROUTER_SOLICIT_HDR(output, IF_IP6_ROUTER_SOLICIT_HDR_OFFSET); 1003 rsh->hdr.type = ND_ROUTER_SOLICIT; 1004 rsh->hdr.code = 0; 1005 rsh->nd_rs_reserved = 0; 1006 1006 1007 1007 /* チェックサムを計算する。*/ -
asp3_tinet_ecnl_arm/trunk/bnep_bridge/Debug/Makefile
r374 r387 58 58 LIBS = $(SRCDIR)/../musl-1.1.18/Debug/libmusl.a \ 59 59 $(SRCDIR)/../btstack/Debug/libbtstack.a \ 60 $(SRCDIR)/../usbhost/Debug/libusbhost.a 60 $(SRCDIR)/../usbhost/Debug/libusbhost.a \ 61 $(SRCDIR)/../zlib-1.2.11/Debug/libzlib.a 61 62 endif 62 63 ifeq ($(SRCLANG),c++) … … 189 190 # 190 191 APPLNAME = bnep_bridge 191 APPLDIRS = ../src ../../ntshell/ tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src $(SRCDIR)/$(TINETDIR)/netapp192 APPLDIRS = ../src ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src $(SRCDIR)/$(TINETDIR)/netapp 192 193 APPL_CFG = main.cfg 193 194 APPL_CDL = main.cdl 194 195 195 APPL_COBJS := $(APPL_COBJS) ntshell_main.o fdtable.o io_stub.o ffarch.o diskio.o ff.o sdfs.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o196 APPL_COBJS := $(APPL_COBJS) ntshell_main.o fdtable.o stdio_stub.o io_stub.o ffarch.o diskio.o ff.o sdfs.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o 196 197 197 198 APPL_DIRS := $(APPLDIRS) $(SRCDIR)/library -
asp3_tinet_ecnl_arm/trunk/bnep_bridge/src/main.c
r374 r387 54 54 #include "ffarch.h" 55 55 #include "ff.h" 56 #include "core/ntshell.h"57 #include "core/ntlibc.h"58 56 #include <stdio.h> 59 57 #include "usrcmd.h" 60 #include "util/ntopt.h"61 58 #include "gpio_api.h" 62 59 #include "usb_hbth.h" -
asp3_tinet_ecnl_arm/trunk/bnep_bridge/src/main.cdl
r352 r387 22 22 * ターゲット依存部の取り込み 23 23 */ 24 import(" target.cdl");24 import("ntshell.cdl"); 25 25 26 26 /* -
asp3_tinet_ecnl_arm/trunk/btstack/include/btstack/hci_cmds.h
r374 r387 422 422 * @param attribute_value 423 423 */ 424 #define SDP_EVENT_QUERY_ATTRIBUTE_VALUE 424 #define SDP_EVENT_QUERY_ATTRIBUTE_VALUE 0x93 425 425 426 426 // not provided by daemon, only used for internal testing -
asp3_tinet_ecnl_arm/trunk/btstack/src/bnep.h
r374 r387 72 72 73 73 /* BNEP UUIDs */ 74 #define BLUETOOTH_SERVICE_CLASS_PANU 75 #define BLUETOOTH_SERVICE_CLASS_NAP 76 #define BLUETOOTH_SERVICE_CLASS_GN 74 #define BLUETOOTH_SERVICE_CLASS_PANU 0x1115 75 #define BLUETOOTH_SERVICE_CLASS_NAP 0x1116 76 #define BLUETOOTH_SERVICE_CLASS_GN 0x1117 77 77 78 78 /* BNEP packet types */ -
asp3_tinet_ecnl_arm/trunk/curl-7.57.0/lib/easy.c
r352 r387 166 166 #endif 167 167 168 #ifdef __c2__169 #define malloc musl_malloc170 #define free musl_free171 #define realloc musl_realloc172 #define calloc musl_calloc173 #endif174 175 168 #ifndef __SYMBIAN32__ 176 169 /* -
asp3_tinet_ecnl_arm/trunk/curl-7.57.0/lib/security.c
r352 r387 8 8 * below. 9 9 * 10 * Copyright (c) 1998, 1999, 2017 Kungliga Tekniska H 旦gskolan10 * Copyright (c) 1998, 1999, 2017 Kungliga Tekniska Hogskolan 11 11 * (Royal Institute of Technology, Stockholm, Sweden). 12 12 * -
asp3_tinet_ecnl_arm/trunk/musl-1.1.18/include/bits/alltypes.h
r352 r387 1 #if defined(_MSC_VER) || defined(__c2__)2 #define close musl_close3 #define execvp musl_execvp4 #define fclose musl_fclose5 #define fdopen musl_fdopen6 #define fflush musl_fflush7 #define fopen musl_fopen8 #define free musl_free9 #define fwrite musl_fwrite10 #define getcwd musl_getcwd11 #define localtime musl_localtime12 #define lseek musl_lseek13 #define open musl_open14 #define read musl_read15 #define malloc musl_malloc16 #define calloc musl_calloc17 #define realloc musl_realloc18 #define time musl_time19 #define unlink musl_unlink20 #define perror musl_perror21 #define strnlen musl_strnlen22 #define strftime musl_strftime23 #define asctime musl_asctime24 #define tzset musl_tzset25 #define clock musl_clock26 #endif27 #ifdef _MSC_VER28 #define __builtin_va_list char *29 #define __NEED_va_list30 #define restrict __restrict31 #endif32 33 1 #define _Addr int 34 2 #define _Int64 long long -
asp3_tinet_ecnl_arm/trunk/musl-1.1.18/include/stddef.h
r352 r387 11 11 #define __NEED_size_t 12 12 #define __NEED_wchar_t 13 #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L13 #if __STDC_VERSION__ >= 201112L || (defined(__cplusplus) && __cplusplus >= 201103L) 14 14 #define __NEED_max_align_t 15 15 #endif -
asp3_tinet_ecnl_arm/trunk/musl-1.1.18/src/locale/__lctrans.c
r352 r387 8 8 } 9 9 10 #ifndef __c2__11 10 weak_alias(dummy, __lctrans_impl); 12 #endif13 11 14 12 const char *__lctrans(const char *msg, const struct __locale_map *lm) -
asp3_tinet_ecnl_arm/trunk/musl-1.1.18/src/locale/__mo_lookup.c
r352 r387 4 4 static inline uint32_t swapc(uint32_t x, int c) 5 5 { 6 return c ? x>>24 | x>>8&0xff00 | x<<8&0xff0000 | x<<24: x;6 return c ? (x>>24) | (x>>8&0xff00) | (x<<8&0xff0000) | (x<<24) : x; 7 7 } 8 8 -
asp3_tinet_ecnl_arm/trunk/musl-1.1.18/src/locale/iconv.c
r352 r387 136 136 { 137 137 e &= 3; 138 return s[e]+0U<<24 | s[e^1]<<16 | s[e^2]<<8 | s[e^3];138 return (s[e]+0U)<<24 | s[e^1]<<16 | s[e^2]<<8 | s[e^3]; 139 139 } 140 140 … … 156 156 unsigned x = c - 128 - map[-1]; 157 157 x = legacy_chars[ map[x*5/4]>>2*x%8 | 158 map[x*5/4+1]<<8-2*x%8 & 1023];158 (map[x*5/4+1]<<(8-2*x%8) & 1023) ]; 159 159 return x ? x : c; 160 160 } … … 348 348 c += (0xa1-0x81); 349 349 d += 0xa1; 350 if (c >= 93 || c>=0xc6-0x81 && d>0x52)350 if (c >= 93 || (c>=0xc6-0x81 && d>0x52)) 351 351 goto ilseq; 352 352 if (d-'A'<26) d = d-'A'; -
asp3_tinet_ecnl_arm/trunk/musl-1.1.18/src/locale/locale_map.c
r352 r387 36 36 37 37 if (!*val) { 38 ( val = getenv("LC_ALL")) && *val||39 ( val = getenv(envvars[cat])) && *val||40 ( val = getenv("LANG")) && *val||38 ((val = getenv("LC_ALL")) && *val) || 39 ((val = getenv(envvars[cat])) && *val) || 40 ((val = getenv("LANG")) && *val) || 41 41 (val = "C.UTF-8"); 42 42 } -
asp3_tinet_ecnl_arm/trunk/musl-1.1.18/src/malloc/memalign.c
r352 r387 46 46 footer = ((size_t *)end)[-2]; 47 47 48 ((size_t *)mem)[-1] = header&7| new-mem;49 ((size_t *)new)[-2] = footer&7| new-mem;50 ((size_t *)new)[-1] = header&7| end-new;51 ((size_t *)end)[-2] = footer&7| end-new;48 ((size_t *)mem)[-1] = (header&7) | new-mem; 49 ((size_t *)new)[-2] = (footer&7) | new-mem; 50 ((size_t *)new)[-1] = (header&7) | end-new; 51 ((size_t *)end)[-2] = (footer&7) | end-new; 52 52 53 53 free(mem); -
asp3_tinet_ecnl_arm/trunk/musl-1.1.18/src/math/fma.c
r352 r387 70 70 if (d < 64) { 71 71 zlo = nz.m<<d; 72 zhi = nz.m>> 64-d;72 zhi = nz.m>>(64-d); 73 73 } else { 74 74 zlo = 0; … … 78 78 if (d == 0) { 79 79 } else if (d < 64) { 80 rlo = rhi<< 64-d | rlo>>d | !!(rlo<<64-d);80 rlo = rhi<<(64-d) | rlo>>d | !!(rlo<<(64-d)); 81 81 rhi = rhi>>d; 82 82 } else { … … 91 91 zlo = nz.m; 92 92 } else if (d < 64) { 93 zlo = nz.m>>d | !!(nz.m<< 64-d);93 zlo = nz.m>>d | !!(nz.m<<(64-d)); 94 94 } else { 95 95 zlo = 1; … … 123 123 d = a_clz_64(rhi)-1; 124 124 /* note: d > 0 */ 125 rhi = rhi<<d | rlo>> 64-d| !!(rlo<<d);125 rhi = rhi<<d | rlo>>(64-d) | !!(rlo<<d); 126 126 } else if (rlo) { 127 127 d = a_clz_64(rlo)-1; … … 174 174 /* only round once when scaled */ 175 175 d = 10; 176 i = ( rhi>>d | !!(rhi<< 64-d) ) << d;176 i = ( rhi>>d | !!(rhi<<(64-d)) ) << d; 177 177 if (sign) 178 178 i = -i; -
asp3_tinet_ecnl_arm/trunk/musl-1.1.18/src/network/lookup_name.c
r352 r387 11 11 #include <pthread.h> 12 12 #include <errno.h> 13 #include <resolv.h> 13 14 #include "lookup.h" 14 15 #include "stdio_impl.h" … … 185 186 if (dots >= conf.ndots || name[l-1]=='.') *search = 0; 186 187 188 /* Strip final dot for canon, fail if multiple trailing dots. */ 189 if (name[l-1]=='.') l--; 190 if (!l || name[l-1]=='.') return EAI_NONAME; 191 187 192 /* This can never happen; the caller already checked length. */ 188 193 if (l >= 256) return EAI_NONAME; … … 311 316 if (!cnt && !(flags & AI_NUMERICHOST)) { 312 317 cnt = name_from_hosts(buf, canon, name, family); 313 if ( !cnt) cnt = name_from_dns_search(buf, canon, name, family);318 if (cnt<=0) cnt = name_from_dns_search(buf, canon, name, family); 314 319 } 315 320 if (cnt<=0) return cnt ? cnt : EAI_NONAME; … … 352 357 * So far the label/precedence table cannot be customized. */ 353 358 for (i=0; i<cnt; i++) { 359 int family = buf[i].family; 354 360 int key = 0; 355 struct sockaddr_in6 sa , da= {361 struct sockaddr_in6 sa6 = { 0 }, da6 = { 356 362 .sin6_family = AF_INET6, 357 363 .sin6_scope_id = buf[i].scopeid, 358 364 .sin6_port = 65535 359 365 }; 360 if (buf[i].family == AF_INET6) { 361 memcpy(da.sin6_addr.s6_addr, buf[i].addr, 16); 366 struct sockaddr_in sa4 = { 0 }, da4 = { 367 .sin_family = AF_INET, 368 .sin_port = 65535 369 }; 370 void *sa, *da; 371 socklen_t salen, dalen; 372 if (family == AF_INET6) { 373 memcpy(da6.sin6_addr.s6_addr, buf[i].addr, 16); 374 da = &da6; dalen = sizeof da6; 375 sa = &sa6; salen = sizeof sa6; 362 376 } else { 363 memcpy( da.sin6_addr.s6_addr,377 memcpy(sa6.sin6_addr.s6_addr, 364 378 "\0\0\0\0\0\0\0\0\0\0\xff\xff", 12); 365 memcpy(da.sin6_addr.s6_addr+12, buf[i].addr, 4); 366 } 367 const struct policy *dpolicy = policyof(&da.sin6_addr); 368 int dscope = scopeof(&da.sin6_addr); 379 memcpy(da6.sin6_addr.s6_addr+12, buf[i].addr, 4); 380 memcpy(da6.sin6_addr.s6_addr, 381 "\0\0\0\0\0\0\0\0\0\0\xff\xff", 12); 382 memcpy(da6.sin6_addr.s6_addr+12, buf[i].addr, 4); 383 memcpy(&da4.sin_addr, buf[i].addr, 4); 384 da = &da4; dalen = sizeof da4; 385 sa = &sa4; salen = sizeof sa4; 386 } 387 const struct policy *dpolicy = policyof(&da6.sin6_addr); 388 int dscope = scopeof(&da6.sin6_addr); 369 389 int dlabel = dpolicy->label; 370 390 int dprec = dpolicy->prec; 371 391 int prefixlen = 0; 372 int fd = socket( AF_INET6, SOCK_DGRAM|SOCK_CLOEXEC, IPPROTO_UDP);392 int fd = socket(family, SOCK_DGRAM|SOCK_CLOEXEC, IPPROTO_UDP); 373 393 if (fd >= 0) { 374 if (!connect(fd, (void *)&da, sizeof da)) {394 if (!connect(fd, da, dalen)) { 375 395 key |= DAS_USABLE; 376 if (!getsockname(fd, (void *)&sa, 377 &(socklen_t){sizeof sa})) { 378 if (dscope == scopeof(&sa.sin6_addr)) 396 if (!getsockname(fd, sa, &salen)) { 397 if (family == AF_INET) memcpy( 398 sa6.sin6_addr.s6_addr+12, 399 &sa4.sin_addr, 4); 400 if (dscope == scopeof(&sa6.sin6_addr)) 379 401 key |= DAS_MATCHINGSCOPE; 380 if (dlabel == labelof(&sa .sin6_addr))402 if (dlabel == labelof(&sa6.sin6_addr)) 381 403 key |= DAS_MATCHINGLABEL; 382 prefixlen = prefixmatch(&sa .sin6_addr,383 &da .sin6_addr);404 prefixlen = prefixmatch(&sa6.sin6_addr, 405 &da6.sin6_addr); 384 406 } 385 407 } -
asp3_tinet_ecnl_arm/trunk/ntshell/fatfs/ffarch.c
r374 r387 80 80 ret2 = get_tim(&now); 81 81 if (ret2 != E_OK){ 82 printf("[ffarch] get_tim error: %s",82 syslog(LOG_NOTICE, "[ffarch] get_tim error: %s", 83 83 itron_strerror(ret2)); 84 84 return; … … 94 94 ret = tslp_tsk(timer); 95 95 if ((ret != E_OK) && (ret != E_TMOUT)) { 96 printf("[ffarch] tslp_tsk error: %s %d",96 syslog(LOG_NOTICE, "[ffarch] tslp_tsk error: %s %d", 97 97 itron_strerror(ret), timer); 98 98 break; … … 101 101 ret2 = get_tim(&now); 102 102 if (ret2 != E_OK) { 103 printf("[ffarch] get_tim error: %s",103 syslog(LOG_NOTICE, "[ffarch] get_tim error: %s", 104 104 itron_strerror(ret2)); 105 105 break; … … 131 131 bool_t SD_begin(); 132 132 133 void ffarch_init( )133 void ffarch_init(void) 134 134 { 135 135 /* SD_CD */ … … 150 150 151 151 if (romdisk_init()) { 152 printf("ROM disk (0:) OK!\n");152 syslog(LOG_NOTICE, "ROM disk (0:) OK!"); 153 153 } 154 154 else { 155 printf("ROM disk (0:) NG!\n");155 syslog(LOG_NOTICE, "ROM disk (0:) NG!"); 156 156 } 157 157 } … … 352 352 } 353 353 354 int ffarch_get_timer( )354 int ffarch_get_timer(void) 355 355 { 356 356 return ffarch_timer; … … 367 367 } 368 368 369 void ffarch_timeout( )369 void ffarch_timeout(void) 370 370 { 371 371 if (ffarch_timer != 0) … … 375 375 case FFS_RETRY_WAIT: 376 376 if (ffarch_retry_count == 0) { 377 printf("SD card (1:) initialize tired...\n");377 syslog(LOG_NOTICE, "SD card (1:) initialize tired..."); 378 378 379 379 ffarch_state = FFS_IDLE; … … 388 388 if ((sdfs._is_initialized & STA_NOINIT) 389 389 || (((sdfs_prev_status & STA_NODISK) != 0) && ((sdfs_new_status & STA_NODISK) == 0))) { 390 printf("SD card initializing ...\n");390 syslog(LOG_NOTICE, "SD card initializing ..."); 391 391 392 392 if (SD_begin()) { 393 printf("SD card (1:) OK!\n");393 syslog(LOG_NOTICE, "SD card (1:) OK!"); 394 394 395 395 /* uploadディレクトリを作成しておく */ … … 401 401 } 402 402 else { 403 printf("SD card (1:) NG!\n");403 syslog(LOG_NOTICE, "SD card (1:) NG!"); 404 404 ffarch_state = FFS_RETRY_WAIT; 405 405 ffarch_timer = 1000 * 1000; … … 408 408 /* SDカードが抜かれた場合 */ 409 409 else if (((sdfs_prev_status & STA_NODISK) == 0) && ((sdfs_new_status & STA_NODISK) != 0)) { 410 printf("SD card unmount\n");410 syslog(LOG_NOTICE, "SD card unmount"); 411 411 412 412 f_mount(&Sd.FatFs, "1:", 0); -
asp3_tinet_ecnl_arm/trunk/ntshell/ntshell/util/ntstdio.c
r352 r387 224 224 handle->xi = xi; 225 225 handle->xo = xo; 226 handle->outptr = 0;227 handle->len = 0;228 226 handle->pos = 0; 229 227 handle->option = option; … … 232 230 static void _putc(ntstdio_t *handle, char c) 233 231 { 234 if (handle->outptr) {235 if ((handle->pos + 1) >= handle->len)236 return;237 handle->outptr[handle->pos] = (unsigned char)c;238 handle->pos++;239 return;240 }241 242 232 if (handle->xo) { 243 233 handle->xo(handle, (unsigned char)c); … … 291 281 } 292 282 283 struct put_buf_t { 284 char *outptr; 285 int len; 286 }; 287 288 static void put_buf(struct ntstdio_t *handle, unsigned char c) 289 { 290 struct put_buf_t *put_buf = (struct put_buf_t *)handle->exinf; 291 if ((handle->pos + 1) >= put_buf->len) 292 return; 293 put_buf->outptr[handle->pos] = (char)c; 294 handle->pos++; 295 } 296 293 297 int ntstdio_snprintf(char *buf, int len, const char *fmt, ...) 294 298 { 295 299 int result; 296 300 ntstdio_t handle; 301 struct put_buf_t exinf; 297 302 va_list arp; 298 303 /* Switch destination for memory */ 304 handle.xo = put_buf; 299 305 handle.option = 0; 300 handle.outptr = buf;301 handle.len = len;302 306 handle.pos = 0; 307 handle.exinf = &exinf; 308 exinf.outptr = buf; 309 exinf.len = len; 310 303 311 va_start(arp, fmt); 304 312 result = xvprintf(&handle, fmt, arp); … … 306 314 307 315 /* Terminate output string with a \0 */ 308 handle.outptr[handle.pos] = '\0';316 buf[handle.pos] = '\0'; 309 317 return result; 310 318 } -
asp3_tinet_ecnl_arm/trunk/ntshell/ntshell/util/ntstdio.h
r374 r387 74 74 NTSTDIO_XI xi; 75 75 NTSTDIO_XO xo; 76 char *outptr;77 int len;78 76 int pos; 79 77 unsigned int option; -
asp3_tinet_ecnl_arm/trunk/ntshell/src/fdtable.c
r374 r387 44 44 #include "syssvc/syslog.h" 45 45 #include "target_syssvc.h" 46 #ifndef NTSHELL_NO_SOCKET 47 #include <tinet_defs.h> 48 #include <tinet_config.h> 49 #include <net/net.h> 50 #include <net/net_endian.h> 51 #include <netinet/in.h> 52 #include <netinet/in_itron.h> 53 #include <tinet_nic_defs.h> 54 #include <tinet_cfg.h> 55 #include <netinet/in_var.h> 56 #include <net/ethernet.h> 57 #include <net/if6_var.h> 58 #include <net/net.h> 59 #include <net/if_var.h> 60 #include <netinet/udp.h> 61 #include <netinet/udp_var.h> 62 #include <netinet/tcp.h> 63 #include <netinet/tcp_var.h> 64 #include <net/net_buf.h> 65 #endif 66 #include "ff.h" 67 #include "socket_stub.h" 46 #include "fdtable.h" 68 47 #include "kernel_cfg.h" 69 48 #include <string.h> … … 75 54 #endif 76 55 77 static int stdio_close(struct SHELL_FILE *fp); 78 static size_t stdio_read(struct SHELL_FILE *fp, unsigned char *data, size_t len); 79 static size_t stdio_write(struct SHELL_FILE *fp, const unsigned char *data, size_t len); 80 static size_t stdin_read(struct SHELL_FILE *fp, unsigned char *data, size_t len); 81 static size_t stdout_write(struct SHELL_FILE *fp, const unsigned char *data, size_t len); 82 static size_t stderr_write(struct SHELL_FILE *fp, const unsigned char *data, size_t len); 83 static void stdio_delete(struct SHELL_FILE *fp); 84 85 static int sio_close(struct SHELL_FILE *fp); 86 static size_t sio_read(struct SHELL_FILE *fp, unsigned char *data, size_t len); 87 static size_t sio_write(struct SHELL_FILE *fp, const unsigned char *data, size_t len); 88 static off_t sio_seek(struct SHELL_FILE *fp, off_t ofs, int org); 89 static int sio_ioctl(struct SHELL_FILE *fp, int req, void *arg); 90 static bool_t sio_readable(struct SHELL_FILE *fp); 91 static void sio_delete(struct SHELL_FILE *fp); 92 93 IO_TYPE IO_TYPE_STDIN = { stdio_close, stdin_read, stdio_write, sio_seek, sio_ioctl, sio_readable, stdio_delete }; 94 IO_TYPE IO_TYPE_STDOUT = { stdio_close, stdio_read, stdout_write, sio_seek, sio_ioctl, sio_readable, stdio_delete }; 95 IO_TYPE IO_TYPE_STDERR = { stdio_close, stdio_read, stderr_write, sio_seek, sio_ioctl, sio_readable, stdio_delete }; 96 IO_TYPE IO_TYPE_SIO = { sio_close, sio_read, sio_write, sio_seek, sio_ioctl, sio_readable, sio_delete }; 97 ntstdio_t ntstdio; 56 extern IO_TYPE IO_TYPE_STDIN; 57 extern IO_TYPE IO_TYPE_STDOUT; 58 extern IO_TYPE IO_TYPE_STDERR; 98 59 99 60 static struct SHELL_FILE fd_table[8 * sizeof(FLGPTN)] = { 100 { 0, &IO_TYPE_STDIN, 0, .exinf = &ntstdio},101 { 1, &IO_TYPE_STDOUT, 0, .exinf = &ntstdio},102 { 2, &IO_TYPE_STDERR, 0,.exinf = &ntstdio},61 { STDIN_FILENO, &IO_TYPE_STDIN, 0 }, 62 { STDOUT_FILENO, &IO_TYPE_STDOUT, 0 }, 63 { STDERR_FILENO, &IO_TYPE_STDERR, 0 }, 103 64 }; 104 65 #define fd_table_count (sizeof(fd_table) / sizeof(fd_table[0])) 105 106 extern ntstdio_t ntstdio;107 extern serial_t stdio_uart;108 109 unsigned char ntstdio_xi(struct ntstdio_t *handle)110 {111 return serial_getc((serial_t *)handle->exinf);112 }113 114 void ntstdio_xo(struct ntstdio_t *handle, unsigned char c)115 {116 serial_putc((serial_t *)handle->exinf, c);117 }118 119 void sys_init(intptr_t exinf)120 {121 ntstdio_init(&ntstdio, NTSTDIO_OPTION_LINE_ECHO | NTSTDIO_OPTION_CANON | NTSTDIO_OPTION_LF_CRLF | NTSTDIO_OPTION_LF_CR, ntstdio_xi, ntstdio_xo);122 ntstdio.exinf = (void *)&stdio_uart;123 }124 125 int stdio_close(struct SHELL_FILE *fp)126 {127 return -EPERM;128 }129 130 size_t stdio_read(struct SHELL_FILE *fp, unsigned char *data, size_t len)131 {132 return -EPERM;133 }134 135 size_t stdio_write(struct SHELL_FILE *fp, const unsigned char *data, size_t len)136 {137 return -EPERM;138 }139 140 size_t stdin_read(struct SHELL_FILE *fp, unsigned char *data, size_t len)141 {142 int i = 0;143 while (i < len) {144 int c = ntstdio_getc((struct ntstdio_t *)fp->exinf);145 data[i++] = c;146 if ((c == EOF) || (c == '\n'))147 break;148 }149 return i;150 }151 152 size_t stdout_write(struct SHELL_FILE *fp, const unsigned char *data, size_t len)153 {154 for (int i = 0; i < len; i++) {155 ntstdio_putc((struct ntstdio_t *)fp->exinf, data[i]);156 }157 return len;158 }159 160 size_t stderr_write(struct SHELL_FILE *fp, const unsigned char *data, size_t len)161 {162 for (int i = 0; i < len; i++) {163 ntstdio_putc((struct ntstdio_t *)fp->exinf, data[i]);164 }165 return len;166 }167 168 void stdio_delete(struct SHELL_FILE *fp)169 {170 }171 172 int sio_close(struct SHELL_FILE *fp)173 {174 return -EPERM;175 }176 177 size_t sio_read(struct SHELL_FILE *fp, unsigned char *data, size_t len)178 {179 return -EPERM;180 }181 182 size_t sio_write(struct SHELL_FILE *fp, const unsigned char *data, size_t len)183 {184 return -EPERM;185 }186 187 off_t sio_seek(struct SHELL_FILE *fp, off_t ofs, int org)188 {189 return -EPERM;190 }191 192 int sio_ioctl(struct SHELL_FILE *fp, int request, void *arg)193 {194 switch (request) {195 case TIOCGWINSZ:196 return 0;197 case TCGETS:198 return sio_tcgetattr(fp->fd, (struct termios *)arg);199 case TCSETS + TCSANOW:200 case TCSETS + TCSADRAIN:201 case TCSETS + TCSAFLUSH:202 return sio_tcsetattr(fp->fd, request - TCSETS, (const struct termios *)arg);203 }204 205 return -EINVAL;206 }207 208 bool_t sio_readable(struct SHELL_FILE *fp)209 {210 return fp->readevt_w != fp->readevt_r;211 }212 213 void sio_delete(struct SHELL_FILE *fp)214 {215 free((serial_t *)((struct ntstdio_t *)fp->exinf)->exinf);216 ((struct ntstdio_t *)fp->exinf)->exinf = NULL;217 free((struct ntstdio_t *)fp->exinf);218 fp->exinf = NULL;219 }220 66 221 67 struct SHELL_FILE *new_fp(IO_TYPE *type, int id, int writable) … … 245 91 if (ret < 0) { 246 92 syslog(LOG_ERROR, "sig_sem => %d", ret); 93 } 94 95 if (fp != NULL) { 96 FLGPTN flgptn = 0; 97 98 FD_SET(fp->fd, (fd_set *)&flgptn); 99 100 ret = clr_flg(FLG_SELECT_WAIT, ~flgptn); 101 if (ret != E_OK) { 102 syslog(LOG_ERROR, "clr_flg => %d", ret); 103 } 247 104 } 248 105 … … 440 297 } 441 298 442 /* TODO:コールバック化したい */443 void stdio_update_evts()444 {445 int fd = STDIN_FILENO;446 struct SHELL_FILE *fp = &fd_table[fd];447 FLGPTN flgptn = 0;448 449 if (serial_readable((serial_t *)((struct ntstdio_t *)fp->exinf)->exinf)) {450 if (fp->readevt_w == fp->readevt_r) fp->readevt_w++;451 452 FD_SET(fd, (fd_set *)&flgptn);453 }454 if (serial_writable((serial_t *)((struct ntstdio_t *)fp->exinf)->exinf)) {455 if (fp->writeevt_w == fp->writeevt_r) fp->writeevt_w++;456 457 FD_SET(fd, (fd_set *)&flgptn);458 }459 460 if (flgptn != 0) {461 set_flg(FLG_SELECT_WAIT, flgptn);462 }463 }464 465 /* TODO:コールバック化したい */466 void stdio_flgptn(FLGPTN *flgptn)467 {468 int fd = STDIN_FILENO;469 struct SHELL_FILE *fp = &fd_table[fd];470 *flgptn = 0;471 472 if (serial_readable((serial_t *)((struct ntstdio_t *)fp->exinf)->exinf)) {473 if (fp->readevt_w == fp->readevt_r) fp->readevt_w++;474 475 FD_SET(fd, (fd_set *)flgptn);476 }477 if (serial_writable((serial_t *)((struct ntstdio_t *)fp->exinf)->exinf)) {478 if (fp->writeevt_w == fp->writeevt_r) fp->writeevt_w++;479 480 FD_SET(fd, (fd_set *)flgptn);481 }482 }483 484 299 ER shell_get_evts(struct fd_events *evts, TMO tmout) 485 300 { 486 301 int count = 0; 487 302 SYSTIM prev, now; 303 FLGPTN flgptn; 488 304 489 305 get_tim(&prev); … … 491 307 for (;;) { 492 308 ER ret; 493 FLGPTN waitptn, flgptn,readfds = 0, writefds = 0;309 FLGPTN waitptn, readfds = 0, writefds = 0; 494 310 struct SHELL_FILE *fp = NULL; 495 496 stdio_update_evts();497 311 498 312 #ifndef NTSHELL_NO_SOCKET … … 504 318 fp = &fd_table[fd]; 505 319 506 #ifndef NTSHELL_NO_SOCKET507 320 if (FD_ISSET(fd, &evts->readfds)) { 508 321 if (fp->type->readable(fp)) { … … 515 328 } 516 329 } 517 #endif 330 518 331 if (FD_ISSET(fd, &evts->writefds)) { 519 if (fp-> writeevt_w == fp->writeevt_r) {332 if (fp->type->writable(fp)) { 520 333 FD_SET(fd, (fd_set *)&writefds); 521 334 count++; … … 547 360 return ret; 548 361 } 549 550 stdio_flgptn(&flgptn); 551 552 if (flgptn == 0) 553 return E_TMOUT; 554 } 555 flgptn &= waitptn; 556 557 /* 受け取ったフラグのみクリア */ 558 ret = clr_flg(FLG_SELECT_WAIT, ~flgptn); 559 if (ret != E_OK) { 560 syslog(LOG_ERROR, "clr_flg => %d", ret); 362 } 363 364 if (flgptn != 0) { 365 flgptn &= waitptn; 366 367 /* 受け取ったフラグのみクリア */ 368 ret = clr_flg(FLG_SELECT_WAIT, ~flgptn); 369 if (ret != E_OK) { 370 syslog(LOG_ERROR, "clr_flg => %d", ret); 371 } 561 372 } 562 373 563 374 count = 0; 564 375 for (int fd = 0; fd < fd_table_count; fd++) { 565 if (!FD_ISSET(fd, (fd_set *)&waitptn))566 continue;567 568 376 fp = &fd_table[fd]; 569 377 570 378 if (fp->readevt_w != fp->readevt_r) { 571 379 fp->readevt_r++; 572 FD_SET(fd, &evts->readfds); 380 if (FD_ISSET(fd, (fd_set *)&waitptn)) 381 FD_SET(fd, &evts->readfds); 573 382 count++; 574 383 } 575 384 if (fp->writeevt_w != fp->writeevt_r) { 576 385 fp->writeevt_r++; 577 fp->writable = 1; 578 } 579 if (fp->writable) { 580 FD_SET(fd, &evts->writefds); 386 if (FD_ISSET(fd, (fd_set *)&waitptn)) 387 FD_SET(fd, &evts->writefds); 581 388 count++; 582 389 } 583 390 if (fp->errorevt_w != fp->errorevt_r) { 584 391 fp->errorevt_r++; 585 FD_SET(fd, &evts->errorfds); 392 if (FD_ISSET(fd, (fd_set *)&waitptn)) 393 FD_SET(fd, &evts->errorfds); 586 394 count++; 587 395 } 588 396 } 589 397 590 if ( count > 0)398 if ((flgptn == 0) || (count > 0)) 591 399 break; 592 400 … … 594 402 595 403 SYSTIM elapse = now - prev; 596 if (elapse > tmout) 597 return E_TMOUT; 404 if (elapse > tmout) { 405 flgptn = 0; 406 break; 407 } 598 408 599 409 prev = now; … … 603 413 evts->count = count; 604 414 605 return E_OK;415 return (flgptn == 0) ? E_TMOUT : E_OK; 606 416 } 607 417 -
asp3_tinet_ecnl_arm/trunk/ntshell/src/fdtable.h
r386 r387 38 38 #define SOCKET_STUB_H 39 39 40 struct addrinfo {41 int ai_flags;42 int ai_family;43 int ai_socktype;44 int ai_protocol;45 socklen_t ai_addrlen;46 struct sockaddr *ai_addr;47 char *ai_canonname;48 struct addrinfo *ai_next;49 };50 51 typedef uint16_t in_port_t;52 typedef uint32_t in_addr_t;53 struct in_addr { in_addr_t s_addr; };54 55 struct sockaddr_in {56 sa_family_t sin_family;57 in_port_t sin_port;58 struct in_addr sin_addr;59 uint8_t sin_zero[8];60 };61 62 struct in6_addr63 {64 union {65 uint8_t __s6_addr[16];66 uint16_t __s6_addr16[8];67 uint32_t __s6_addr32[4];68 } __in6_union;69 };70 //#define s6_addr __in6_union.__s6_addr71 //#define s6_addr16 __in6_union.__s6_addr1672 //#define s6_addr32 __in6_union.__s6_addr3273 74 struct sockaddr_in675 {76 sa_family_t sin6_family;77 in_port_t sin6_port;78 uint32_t sin6_flowinfo;79 struct in6_addr sin6_addr;80 uint32_t sin6_scope_id;81 };82 83 typedef struct socket_t {84 int family;85 int type;86 int protocol;87 int cepid;88 int repid;89 int backlog;90 unsigned int flags;91 union {92 struct sockaddr_in laddr4;93 struct sockaddr_in6 laddr6;94 };95 union {96 struct sockaddr_in raddr4;97 struct sockaddr_in6 raddr6;98 };99 int buf_size;100 unsigned char *buf;101 void *input;102 int len;103 } socket_t;104 105 struct SHELL_DIR {106 FATFS_DIR dir;107 struct dirent dirent;108 };109 110 40 typedef const struct io_type_s IO_TYPE; 111 41 … … 131 61 int (*ioctl)(struct SHELL_FILE *, int, void *); 132 62 bool_t (*readable)(struct SHELL_FILE *); 63 bool_t (*writable)(struct SHELL_FILE *); 133 64 void (*delete)(struct SHELL_FILE *); 134 65 }; -
asp3_tinet_ecnl_arm/trunk/ntshell/src/io_stub.c
r374 r387 45 45 #include "syssvc/serial.h" 46 46 #include "syssvc/syslog.h" 47 #include " socket_stub.h"47 #include "fdtable.h" 48 48 #include "util/ntstdio.h" 49 49 #include "usrcmd.h" … … 51 51 #include "kernel_cfg.h" 52 52 #include "target_syssvc.h" 53 54 struct SHELL_DIR { 55 FATFS_DIR dir; 56 struct dirent dirent; 57 }; 53 58 54 59 int fresult2errno(FRESULT res) … … 85 90 static int file_ioctl(struct SHELL_FILE *fp, int req, void *arg); 86 91 static bool_t file_readable(struct SHELL_FILE *fp); 92 static bool_t file_writable(struct SHELL_FILE *fp); 87 93 static void file_delete(struct SHELL_FILE *fp); 88 94 … … 93 99 static int dir_ioctl(struct SHELL_FILE *fp, int req, void *arg); 94 100 static bool_t dir_readable(struct SHELL_FILE *fp); 101 static bool_t dir_writable(struct SHELL_FILE *fp); 95 102 static void dir_delete(struct SHELL_FILE *fp); 96 103 97 IO_TYPE IO_TYPE_FILE = { file_close, file_read, file_write, file_seek, file_ioctl, file_readable, file_ delete };98 IO_TYPE IO_TYPE_DIR = { dir_close, dir_read, dir_write, dir_seek, dir_ioctl, dir_readable, dir_ delete };104 IO_TYPE IO_TYPE_FILE = { file_close, file_read, file_write, file_seek, file_ioctl, file_readable, file_writable, file_delete }; 105 IO_TYPE IO_TYPE_DIR = { dir_close, dir_read, dir_write, dir_seek, dir_ioctl, dir_readable, dir_writable, dir_delete }; 99 106 100 107 int shell_open(const char *path, int flags, void *arg) … … 114 121 FRESULT res; 115 122 if ((res = f_opendir(dir, path)) != FR_OK) { 123 delete_fp(fp); 116 124 return fresult2errno(res); 117 125 } … … 165 173 } 166 174 175 delete_fp(fp); 167 176 return fresult2errno(res); 168 177 } … … 239 248 } 240 249 250 bool_t file_writable(struct SHELL_FILE *fp) 251 { 252 return fp->writable && (fp->writeevt_w == fp->writeevt_r); 253 } 254 241 255 void file_delete(struct SHELL_FILE *fp) 242 256 { … … 356 370 { 357 371 return shell_ioctl(fd, cmd, arg); 358 }359 360 extern IO_TYPE IO_TYPE_SIO;361 362 int sio_tcgetattr(int fd, struct termios *termios)363 {364 struct SHELL_FILE *fp = fd_to_fp(fd);365 if ((fp == NULL) || (fp->type != &IO_TYPE_SIO))366 return -EBADF;367 368 ntstdio_t *ntstdio = (ntstdio_t *)fp->exinf;369 370 memset(termios, 0, sizeof(*termios));371 372 if (ntstdio->option & NTSTDIO_OPTION_LINE_ECHO) {373 termios->c_lflag |= ECHO;374 }375 else {376 termios->c_lflag &= ~ECHO;377 }378 if (ntstdio->option & NTSTDIO_OPTION_CANON) {379 termios->c_lflag |= ICANON;380 }381 else {382 termios->c_lflag &= ~ICANON;383 }384 if (ntstdio->option & NTSTDIO_OPTION_LF_CR) {385 termios->c_iflag |= INLCR;386 }387 else {388 termios->c_iflag &= ~INLCR;389 }390 if (ntstdio->option & NTSTDIO_OPTION_LF_CRLF) {391 termios->c_oflag |= ONLCR;392 }393 else {394 termios->c_oflag &= ~ONLCR;395 }396 397 return 0;398 }399 400 int sio_tcsetattr(int fd, int optional_actions, const struct termios *termios)401 {402 struct SHELL_FILE *fp = fd_to_fp(fd);403 if ((fp == NULL) || (fp->type != &IO_TYPE_SIO))404 return -EBADF;405 406 ntstdio_t *ntstdio = (ntstdio_t *)fp->exinf;407 408 if (optional_actions == TCSANOW) {409 if (termios->c_lflag & ECHO) {410 ntstdio->option |= NTSTDIO_OPTION_LINE_ECHO;411 }412 else {413 ntstdio->option &= ~NTSTDIO_OPTION_LINE_ECHO;414 }415 if (termios->c_lflag & ICANON) {416 ntstdio->option |= NTSTDIO_OPTION_CANON;417 }418 else {419 ntstdio->option &= ~NTSTDIO_OPTION_CANON;420 }421 if (termios->c_iflag & INLCR) {422 ntstdio->option |= NTSTDIO_OPTION_LF_CR;423 }424 else {425 ntstdio->option &= ~NTSTDIO_OPTION_LF_CR;426 }427 if (termios->c_oflag & ONLCR) {428 ntstdio->option |= NTSTDIO_OPTION_LF_CRLF;429 }430 else {431 ntstdio->option &= ~NTSTDIO_OPTION_LF_CRLF;432 }433 return 0;434 }435 436 shell_abort();437 return 0;438 372 } 439 373 … … 688 622 } 689 623 624 bool_t dir_writable(struct SHELL_FILE *fp) 625 { 626 return false; 627 } 628 690 629 void dir_delete(struct SHELL_FILE *fp) 691 630 { … … 710 649 return 0; 711 650 } 712 713 #ifndef _MSC_VER714 extern uint32_t __HeapBase;715 extern uint32_t __HeapLimit;716 #else717 uint8_t __HeapBase[14 * 4096];718 #define __HeapLimit __HeapBase[sizeof(__HeapBase)]719 #endif720 721 void *shell_brk(void *addr)722 {723 if (addr == 0) {724 return (void *)(&__HeapBase);725 }726 if ((addr >= (void *)&__HeapBase) && (addr < (void *)&__HeapLimit)) {727 return addr;728 }729 return (void *)-1;730 }731 732 void *shell_mmap2(void *start, size_t length, int prot, int flags, int fd, off_t pgoffset)733 {734 if (fd != -1)735 return (void *)-EINVAL;736 737 if ((length >= 0) && (length <= sizeof(&__HeapBase))) {738 return &__HeapBase;739 }740 return (void *)-1;741 }742 743 int shell_mprotect(void *addr, size_t len, int prot)744 {745 //if ((addr >= (void *)&__HeapBase) && (addr + len < (void *)&__HeapLimit)) {746 return 0;747 //}748 //return -1;749 } -
asp3_tinet_ecnl_arm/trunk/ntshell/src/net_misc.c
r374 r387 95 95 96 96 get_tid(&nc->tskid); 97 printf("[NET MISC:%d,%d] started.", nc->tskid, (ID)exinf);97 syslog(LOG_NOTICE, "[NET MISC:%d,%d] started.", nc->tskid, (ID)exinf); 98 98 99 99 /* 初期化 */ … … 103 103 ret = get_tim(&time); 104 104 if (ret != E_OK) { 105 printf("[NET MISC,%d] get_tim error: %7lu,%s",105 syslog(LOG_NOTICE, "[NET MISC,%d] get_tim error: %7lu,%s", 106 106 nc->cepid, time / SYSTIM_HZ, itron_strerror(ret)); 107 107 return; … … 117 117 error = tslp_tsk(timer); 118 118 if ((error != E_OK) && (error != E_TMOUT)) { 119 printf("[NET MISC,%d] tslp_tsk error: %s %d",119 syslog(LOG_NOTICE, "[NET MISC,%d] tslp_tsk error: %s %d", 120 120 nc->cepid, itron_strerror(error), timer); 121 121 break; … … 124 124 ret = get_tim(&time); 125 125 if (ret != E_OK) { 126 printf("[NET MISC,%d] get_tim error: %s",126 syslog(LOG_NOTICE, "[NET MISC,%d] get_tim error: %s", 127 127 nc->cepid, itron_strerror(ret)); 128 128 break; -
asp3_tinet_ecnl_arm/trunk/ntshell/src/ntp_cli.c
r374 r387 277 277 } 278 278 279 printf("[NTP CLI,%d] recv time: %s .%09u\n",279 syslog(LOG_NOTICE, "[NTP CLI,%d] recv time: %s .%09u", 280 280 nc->cepid, nc->buf, tp.tv_nsec); 281 281 } … … 309 309 line = lookup_ipaddr(&nc->ipaddr6, NTP_SRV_URL, API_PROTO_IPV4); 310 310 if (line == NULL || !in6_is_addr_ipv4mapped(&nc->ipaddr6)) { 311 printf("[NTP CLI,%d] sleep %d.%03u[s], unknown host.",311 syslog(LOG_NOTICE, "[NTP CLI,%d] sleep %d.%03u[s], unknown host.", 312 312 nc->cepid, SLP_ITV / SYSTIM_HZ, SLP_ITV % SYSTIM_HZ); 313 313 nc->timer = SLP_ITV; … … 317 317 #else /* of #if defined(SUPPORT_INET6) && defined(SUPPORT_INET4) */ 318 318 if ((line = lookup_ipaddr(&nc->snd_rmt.ipaddr, NTP_SRV_URL, DEFAULT_API_PROTO)) == NULL) { 319 printf("[NTP CLI,%d] sleep %d.%03u[s], unknown host.",319 syslog(LOG_NOTICE, "[NTP CLI,%d] sleep %d.%03u[s], unknown host.", 320 320 nc->cepid, SLP_ITV / SYSTIM_HZ, SLP_ITV % SYSTIM_HZ); 321 321 nc->timer = SLP_ITV; … … 421 421 422 422 if ((error = udp_snd_dat(nc->cepid, &nc->snd_rmt, ntp, len, TMO_NBLK)) != E_WBLK) { 423 printf("[NTP CLI,%d] udp_snd_dat error: %s",423 syslog(LOG_NOTICE, "[NTP CLI,%d] udp_snd_dat error: %s", 424 424 nc->cepid, itron_strerror(error)); 425 425 return error; 426 426 } 427 427 else 428 syslog(LOG_DEBUG, "[NTP CLI,%d] udp_snd_dat: to: %s.%d \n",428 syslog(LOG_DEBUG, "[NTP CLI,%d] udp_snd_dat: to: %s.%d", 429 429 nc->cepid, ip2str(NULL, &nc->snd_rmt.ipaddr), nc->snd_rmt.portno); 430 430 … … 439 439 ret = get_tim(&time); 440 440 if (ret != E_OK) { 441 printf("[NTP CLI,%d] get_tim error: %s",441 syslog(LOG_NOTICE, "[NTP CLI,%d] get_tim error: %s", 442 442 nc->cepid, itron_strerror(ret)); 443 443 tp->tv_sec = 0; … … 459 459 ret = set_tim(time); 460 460 if (ret != E_OK) { 461 printf("[NTP CLI,%d] set_tim error: %s",461 syslog(LOG_NOTICE, "[NTP CLI,%d] set_tim error: %s", 462 462 nc->cepid, itron_strerror(ret)); 463 463 } … … 477 477 if (len < 0 && len != E_RLWAI) { 478 478 /* E_RLWAI 以外で、0 以下の場合は、エラーを意味している。*/ 479 printf("[NTP CLI,%d] callback error: %s, fncd: %s", nc->cepid,479 syslog(LOG_NOTICE, "[NTP CLI,%d] callback error: %s, fncd: %s", nc->cepid, 480 480 itron_strerror(len), in_strtfn(fncd)); 481 481 } … … 484 484 if ((len = udp_rcv_dat(nc->cepid, &nc->rcv_rmt, &nc->ntp_msg, len, TMO_POL)) < 0) 485 485 { 486 printf("[NTP CLI,%d] udp_rcv_dat error: %s", nc->cepid,486 syslog(LOG_NOTICE, "[NTP CLI,%d] udp_rcv_dat error: %s", nc->cepid, 487 487 itron_strerror(len)); 488 488 } … … 516 516 517 517 get_tid(&nc->tskid); 518 printf("[NTP CLI:%d,%d] started.", nc->tskid, (ID)exinf);518 syslog(LOG_NOTICE, "[NTP CLI:%d,%d] started.", nc->tskid, (ID)exinf); 519 519 520 520 /* 初期化 */ … … 523 523 ret = get_tim(&time); 524 524 if (ret != E_OK) { 525 printf("[NTP CLI,%d] get_tim error: %7lu,%s",525 syslog(LOG_NOTICE, "[NTP CLI,%d] get_tim error: %7lu,%s", 526 526 nc->cepid, time / SYSTIM_HZ, itron_strerror(ret)); 527 527 return; … … 537 537 error = tslp_tsk(timer); 538 538 if ((error != E_OK) && (error != E_TMOUT)) { 539 printf("[NTP CLI,%d] tslp_tsk error: %s %d",539 syslog(LOG_NOTICE, "[NTP CLI,%d] tslp_tsk error: %s %d", 540 540 nc->cepid, itron_strerror(error), timer); 541 541 break; … … 544 544 ret = get_tim(&time); 545 545 if (ret != E_OK) { 546 printf("[NTP CLI,%d] get_tim error: %s",546 syslog(LOG_NOTICE, "[NTP CLI,%d] get_tim error: %s", 547 547 nc->cepid, itron_strerror(ret)); 548 548 break; -
asp3_tinet_ecnl_arm/trunk/ntshell/src/ntshell_main.c
r374 r387 58 58 #include "util/ntopt.h" 59 59 #include "ntshell_main.h" 60 #include " socket_stub.h"60 #include "fdtable.h" 61 61 62 62 char command[NTOPT_TEXT_MAXLEN]; … … 78 78 } 79 79 80 void stdio_open(ID portid); 80 81 static int usrcmd_ntopt_callback(long *args, void *extobj); 81 82 … … 86 87 void ntshell_task_init(ID portid) 87 88 { 88 s erial_ctl_por(portid, IOCTL_CRLF | IOCTL_FCSND | IOCTL_FCRCV);89 stdio_open(portid); 89 90 } 90 91 … … 95 96 { 96 97 ntshell_state = 1; 97 ntshell_exit_code = ntopt_parse(command, usrcmd_ntopt_callback, NULL); 98 99 if (setjmp(process_exit) == 0) { 100 ntshell_exit_code = ntopt_parse(command, usrcmd_ntopt_callback, NULL); 101 } 102 103 fflush(stdout); 104 clean_fd(); 105 98 106 ntshell_state = 2; 99 107 } … … 139 147 printf("Unknown command found.\n"); 140 148 141 clean_fd();142 143 149 return result; 144 150 } … … 285 291 } 286 292 287 struct sigaction sigtable[7]; 288 289 int shell_sigaction(int sig, const struct sigaction *restrict sa, struct sigaction *restrict old) 290 { 291 struct sigaction *sat; 293 // musl-1.1.18\src\internal\ksigaction.h 294 struct k_sigaction { 295 void(*handler)(int); 296 unsigned long flags; 297 void(*restorer)(void); 298 unsigned mask[2]; 299 }; 300 301 struct k_sigaction sigtable[7]; 302 303 int shell_sigaction(int sig, const struct k_sigaction *__restrict sa, 304 struct k_sigaction *__restrict old, size_t size) 305 { 306 struct k_sigaction *sat; 292 307 293 308 switch(sig){ … … 318 333 319 334 if (old != NULL) 320 memcpy(old, sat, sizeof(struct sigaction));321 322 memcpy(sat, sa, sizeof(struct sigaction));335 memcpy(old, sat, offsetof(struct k_sigaction, mask) + size); 336 337 memcpy(sat, sa, offsetof(struct k_sigaction, mask) + size); 323 338 324 339 return 0; … … 368 383 } 369 384 385 int shell_nanosleep(const struct timespec *req, struct timespec *rem) 386 { 387 ER ret; 388 TMO tmo; 389 SYSTIM prev, now, diff; 390 391 if ((req == NULL) || (req->tv_nsec < 0) || (req->tv_nsec >= 1000000000)) 392 return -EINVAL; 393 394 get_tim(&prev); 395 396 tmo = req->tv_sec * 1000000 + req->tv_nsec / 1000; 397 ret = tslp_tsk(tmo); 398 if (ret == E_OK) { 399 if (rem != NULL) { 400 get_tim(&now); 401 diff = now - prev; 402 rem->tv_sec = diff / 1000000ll; 403 rem->tv_nsec = (diff - (rem->tv_sec * 1000000ll)) * 1000ll; 404 } 405 return 0; 406 } 407 else if (ret == E_TMOUT) { 408 if (rem != NULL) { 409 rem->tv_sec = 0; 410 rem->tv_nsec = 0; 411 } 412 return 0; 413 } 414 415 return -EFAULT; 416 } -
asp3_tinet_ecnl_arm/trunk/ntshell/src/shellif.h
r374 r387 74 74 #define NCCS 32 75 75 76 #include < bits/fcntl.h>77 #include < bits/termios.h>78 #include < bits/stat.h>76 #include <fcntl.h> 77 #include <termios.h> 78 #include <sys/stat.h> 79 79 #include <sys/select.h> 80 80 #include <time.h> … … 85 85 #include <sys/utsname.h> 86 86 #include <dirent.h> 87 #include < bits/ioctl.h>88 #include < bits/errno.h>87 #include <sys/ioctl.h> 88 #include <errno.h> 89 89 #include <sys/socket.h> 90 90 #else … … 132 132 // time.h 133 133 #define CLOCK_REALTIME 0 134 int shell_nanosleep(const struct timespec *req, struct timespec *rem); 134 135 135 136 // dirent.h … … 177 178 // signal.h 178 179 int shell_sigprocmask(int how, const sigset_t *__restrict set, sigset_t *__restrict old); 179 int shell_sigaction(int sig, const struct sigaction *__restrict sa, struct sigaction *__restrict old); 180 struct k_sigaction; 181 int shell_sigaction(int sig, const struct k_sigaction *__restrict sa, 182 struct k_sigaction *__restrict old, size_t size); 180 183 // socket.h 181 184 int shell_socket(int, int, int); … … 197 200 // syslog.h 198 201 void vsyslog (int, const char *, va_list); 199 // termios.h200 int sio_tcgetattr (int, struct termios *);201 int sio_tcsetattr(int, int, const struct termios *);202 202 // fcntl.h 203 203 int shell_open(const char *, int, void *arg); -
asp3_tinet_ecnl_arm/trunk/ntshell/src/socket_stub.c
r375 r387 62 62 #include <netinet/tcp_var.h> 63 63 #include <netapp/resolver.h> 64 extern const ID tmax_tcp_cepid; 65 #include "ff.h" 66 #include "socket_stub.h" 64 #include "fdtable.h" 67 65 #include "kernel_cfg.h" 68 66 67 #ifdef _DEBUG 68 static const char THIS_FILE[] = __FILE__; 69 #endif 70 69 71 #define SOCKET_TIMEOUT 2000000 72 73 struct addrinfo { 74 int ai_flags; 75 int ai_family; 76 int ai_socktype; 77 int ai_protocol; 78 socklen_t ai_addrlen; 79 struct sockaddr *ai_addr; 80 char *ai_canonname; 81 struct addrinfo *ai_next; 82 }; 83 84 typedef uint16_t in_port_t; 85 typedef uint32_t in_addr_t; 86 struct in_addr { in_addr_t s_addr; }; 87 88 struct sockaddr_in { 89 sa_family_t sin_family; 90 in_port_t sin_port; 91 struct in_addr sin_addr; 92 uint8_t sin_zero[8]; 93 }; 94 95 struct in6_addr 96 { 97 union { 98 uint8_t __s6_addr[16]; 99 uint16_t __s6_addr16[8]; 100 uint32_t __s6_addr32[4]; 101 } __in6_union; 102 }; 103 //#define s6_addr __in6_union.__s6_addr 104 //#define s6_addr16 __in6_union.__s6_addr16 105 //#define s6_addr32 __in6_union.__s6_addr32 106 107 struct sockaddr_in6 108 { 109 sa_family_t sin6_family; 110 in_port_t sin6_port; 111 uint32_t sin6_flowinfo; 112 struct in6_addr sin6_addr; 113 uint32_t sin6_scope_id; 114 }; 115 116 typedef struct socket_t { 117 int family; 118 int type; 119 int protocol; 120 int cepid; 121 int repid; 122 int backlog; 123 unsigned int flags; 124 union { 125 struct sockaddr_in laddr4; 126 struct sockaddr_in6 laddr6; 127 }; 128 union { 129 struct sockaddr_in raddr4; 130 struct sockaddr_in6 raddr6; 131 }; 132 int buf_size; 133 unsigned char *buf; 134 void *input; 135 int len; 136 } socket_t; 70 137 71 138 #define tcp6_cre_cep tcp_cre_cep … … 82 149 #define tcp6_set_opt tcp_set_opt 83 150 84 #define udp6_del_cep udp_del_cep85 #define udp6_get_opt udp_get_opt86 #define udp6_set_opt udp_set_opt87 88 151 #ifndef SUPPORT_INET6 89 152 … … 93 156 94 157 ER udp6_cre_cep (ID cepid, T_UDP6_CCEP *pk_ccep) { return E_SYS; } 158 ER udp6_del_cep (ID cepid) { return E_SYS; } 95 159 ER_UINT udp6_snd_dat (ID cepid, T_IPV6EP *p_dstaddr, void *data, int_t len, TMO tmout) { return E_SYS; } 96 160 ER_UINT udp6_rcv_dat (ID cepid, T_IPV6EP *p_dstaddr, void *data, int_t len, TMO tmout) { return E_SYS; } 161 ER udp6_set_opt (ID cepid, int_t optname, void *optval, int_t optlen) { return E_SYS; } 162 ER udp6_get_opt (ID cepid, int_t optname, void *optval, int_t optlen) { return E_SYS; } 97 163 98 164 const T_IN6_ADDR *in6_get_ifaddr (int_t index) { return NULL; } … … 111 177 static int tcp_fd_ioctl(struct SHELL_FILE *fp, int req, void *arg); 112 178 static bool_t tcp_fd_readable(struct SHELL_FILE *fp); 179 static bool_t tcp_fd_writable(struct SHELL_FILE *fp); 113 180 static void tcp_fd_delete(struct SHELL_FILE *fp); 114 181 … … 119 186 static int udp_fd_ioctl(struct SHELL_FILE *fp, int req, void *arg); 120 187 static bool_t udp_fd_readable(struct SHELL_FILE *fp); 188 static bool_t udp_fd_writable(struct SHELL_FILE *fp); 121 189 static void udp_fd_delete(struct SHELL_FILE *fp); 122 190 123 IO_TYPE IO_TYPE_TCP = { tcp_fd_close, tcp_fd_read, tcp_fd_write, tcp_fd_seek, tcp_fd_ioctl, tcp_fd_readable, tcp_fd_ delete };124 IO_TYPE IO_TYPE_UDP = { udp_fd_close, udp_fd_read, udp_fd_write, udp_fd_seek, udp_fd_ioctl, udp_fd_readable, udp_fd_ delete };191 IO_TYPE IO_TYPE_TCP = { tcp_fd_close, tcp_fd_read, tcp_fd_write, tcp_fd_seek, tcp_fd_ioctl, tcp_fd_readable, tcp_fd_writable, tcp_fd_delete }; 192 IO_TYPE IO_TYPE_UDP = { udp_fd_close, udp_fd_read, udp_fd_write, udp_fd_seek, udp_fd_ioctl, udp_fd_readable, udp_fd_writable, udp_fd_delete }; 125 193 126 194 typedef struct id_table_t { … … 185 253 186 254 #endif 255 256 void addrcpy(void *_dst, const void *_src, int len) 257 { 258 #if _NET_CFG_BYTE_ORDER == _NET_CFG_BIG_ENDIAN 259 memcpy(_dst, _src, len); 260 #else 261 uint8_t *dst = (uint8_t *)_dst, *src = &((uint8_t *)_src)[len]; 262 while (src != _src) 263 *dst++ = *--src; 264 #endif 265 } 187 266 188 267 ID new_id(id_table_t *table, int count) … … 347 426 } 348 427 case SOCK_DGRAM: { 349 ID cepid = new_id(udp _cepid_table, udp_cepid_table_count);428 ID cepid = new_id(udp6_cepid_table, udp6_cepid_table_count); 350 429 if (cepid < 0) 351 430 return -ENOMEM; 352 431 353 T_UDP6_CCEP ccep = { 0, { ntohl(addr_in6->sin6_addr.__in6_union.__s6_addr), ntohs(addr_in6->sin6_port)}, (FP)socket_udp6_callback };432 T_UDP6_CCEP ccep = { 0, { { ntohl(addr_in6->sin6_addr.__in6_union.__s6_addr) }, ntohs(addr_in6->sin6_port)}, (FP)socket_udp6_callback }; 354 433 ret = udp6_cre_cep(cepid, &ccep); 355 434 if (ret != E_OK) { 356 delete_id(udp _cepid_table, udp_cepid_table_count, cepid);435 delete_id(udp6_cepid_table, udp6_cepid_table_count, cepid); 357 436 return -ENOMEM; 358 437 } … … 407 486 408 487 struct sockaddr_in6 *laddr = &socket->laddr6; 409 T_TCP6_CREP crep = { 0, { ntohl(laddr->sin6_addr.__in6_union.__s6_addr), ntohs(laddr->sin6_port)} };488 T_TCP6_CREP crep = { 0, { { ntohl(laddr->sin6_addr.__in6_union.__s6_addr) }, ntohs(laddr->sin6_port)} }; 410 489 ret = tcp6_cre_rep(repid, &crep); 411 490 if (ret != E_OK) { … … 423 502 } 424 503 425 int shell_connect(int fd, const struct sockaddr *addr, socklen_t len)504 int shell_connect(int fd, const struct sockaddr *addr, socklen_t alen) 426 505 { 427 506 SOCKET *fp = fd_to_fp(fd); … … 435 514 switch (socket->family) { 436 515 case AF_INET: { 437 if ( len < 8) {516 if (alen < sizeof(struct sockaddr_in)) { 438 517 return -EINVAL; 439 518 } … … 455 534 } 456 535 fp->handle = cepid; 536 fp->writable = 1; 457 537 socket->cepid = cepid; 458 538 } 459 539 struct sockaddr_in *laddr = &socket->laddr4; 460 540 struct sockaddr_in *raddr = &socket->raddr4; 461 memset(raddr, 0, sizeof(*raddr)); 462 memcpy(raddr, addr, len); 541 memcpy(raddr, addr, sizeof(struct sockaddr_in)); 463 542 T_IPV4EP lep = { ntohl(laddr->sin_addr.s_addr), ntohs(laddr->sin_port) }; 464 543 T_IPV4EP rep = { ntohl(raddr->sin_addr.s_addr), ntohs(raddr->sin_port) }; 465 544 ret = tcp_con_cep(socket->cepid, &lep, &rep, SOCKET_TIMEOUT); 466 if (ret < 0) { 545 if (ret == E_TMOUT) { 546 return -ETIMEDOUT; 547 } 548 else if (ret < 0) { 467 549 return -EHOSTUNREACH; 468 550 } … … 470 552 } 471 553 case AF_INET6: { 472 if ( len < 20) {554 if (alen < sizeof(struct sockaddr_in6)) { 473 555 return -EINVAL; 474 556 } … … 490 572 } 491 573 fp->handle = cepid; 574 fp->writable = 1; 492 575 socket->cepid = cepid; 493 576 } 494 577 struct sockaddr_in6 *laddr = &socket->laddr6; 495 578 struct sockaddr_in6 *raddr = &socket->raddr6; 496 memset(raddr, 0, sizeof(*raddr)); 497 memcpy(raddr, addr, len); 498 T_IPV6EP lep = { ntohl(laddr->sin6_addr.__in6_union.__s6_addr), ntohs(laddr->sin6_port) }; 499 T_IPV6EP rep = { ntohl(raddr->sin6_addr.__in6_union.__s6_addr), ntohs(raddr->sin6_port) }; 579 memcpy(raddr, addr, sizeof(struct sockaddr_in6)); 580 T_IPV6EP lep; 581 addrcpy(&lep.ipaddr, &laddr->sin6_addr, 16); 582 lep.portno = ntohs(laddr->sin6_port); 583 T_IPV6EP rep; 584 addrcpy(&rep.ipaddr, &raddr->sin6_addr, 16); 585 rep.portno = ntohs(raddr->sin6_port); 500 586 ret = tcp6_con_cep(socket->cepid, &lep, &rep, SOCKET_TIMEOUT); 501 if (ret < 0) { 587 if (ret == E_TMOUT) { 588 return -ETIMEDOUT; 589 } 590 else if (ret < 0) { 502 591 return -EHOSTUNREACH; 503 592 } … … 508 597 } 509 598 599 if (fp->writeevt_w != fp->writeevt_r) fp->writeevt_r++; 600 510 601 return 0; 511 602 } 512 603 513 int shell_accept(int fd, struct sockaddr *__restrict addr, socklen_t *__restrict len)604 int shell_accept(int fd, struct sockaddr *__restrict addr, socklen_t *__restrict alen) 514 605 { 515 606 SOCKET *lfp = fd_to_fp(fd); … … 550 641 } 551 642 fp->handle = cepid; 643 fp->writable = 1; 552 644 socket->cepid = cepid; 553 645 } … … 555 647 cepid = ((socket_t *)lfp->exinf)->cepid; 556 648 fp->handle = cepid; 649 fp->writable = 1; 557 650 lfp->handle = tmax_tcp_cepid + ((socket_t *)lfp->exinf)->repid; 558 651 ((socket_t *)lfp->exinf)->cepid = 0; … … 566 659 } 567 660 struct sockaddr_in *raddr = &socket->raddr4; 568 memset(raddr, 0, sizeof( *raddr));661 memset(raddr, 0, sizeof(struct sockaddr_in)); 569 662 raddr->sin_family = AF_INET; 570 663 raddr->sin_port = htons(rep.portno); 571 664 raddr->sin_addr.s_addr = htonl(rep.ipaddr); 572 665 573 if (addr != NULL && len != NULL) {574 int sz = * len;575 if (sz < 8) {666 if (addr != NULL && alen != NULL) { 667 int sz = *alen; 668 if (sz < sizeof(struct sockaddr_in)) { 576 669 return -EINVAL; 577 670 } 578 671 struct sockaddr_in *raddr = &socket->raddr4; 579 if (sz > sizeof( *raddr))580 sz = sizeof( *raddr);672 if (sz > sizeof(struct sockaddr_in)) 673 sz = sizeof(struct sockaddr_in); 581 674 memcpy(addr, raddr, sz); 582 * len = sizeof(*raddr);675 *alen = sz; 583 676 } 584 677 break; … … 603 696 } 604 697 fp->handle = cepid; 698 fp->writable = 1; 605 699 socket->cepid = cepid; 606 700 } … … 608 702 cepid = ((socket_t *)lfp->exinf)->cepid; 609 703 fp->handle = cepid; 704 fp->writable = 1; 610 705 lfp->handle = tmax_tcp6_cepid + ((socket_t *)lfp->exinf)->repid; 611 706 ((socket_t *)lfp->exinf)->cepid = 0; … … 613 708 ((socket_t *)lfp->exinf)->buf = 0; 614 709 } 615 T_IPV6EP rep = { 0, 0 };710 T_IPV6EP rep = { { 0 }, 0 }; 616 711 ret = tcp6_acp_cep(socket->cepid, socket->repid, &rep, TMO_FEVR); 617 712 if (ret < 0) { … … 619 714 } 620 715 struct sockaddr_in6 *raddr = &socket->raddr6; 621 memset(raddr, 0, sizeof( *raddr));716 memset(raddr, 0, sizeof(struct sockaddr_in6)); 622 717 raddr->sin6_family = AF_INET; 623 718 raddr->sin6_port = htons(rep.portno); 624 #if _NET_CFG_BYTE_ORDER == _NET_CFG_BIG_ENDIAN 625 memcpy(raddr->sin6_addr.__in6_union.__s6_addr, rep.ipaddr.__u6_addr.__u6_addr8, 16); 626 #else 627 for (int i = 0; i < 16; i++) 628 raddr->sin6_addr.__in6_union.__s6_addr[i] = rep.ipaddr.__u6_addr.__u6_addr8[i]; 629 #endif 630 631 if (addr != NULL && len != NULL) { 632 int sz = *len; 633 if (sz < 8) { 719 addrcpy(&raddr->sin6_addr, &rep.ipaddr, 16); 720 721 if (addr != NULL && alen != NULL) { 722 int sz = *alen; 723 if (sz < sizeof(struct sockaddr_in6)) { 634 724 return -EINVAL; 635 725 } 636 726 struct sockaddr_in6 *raddr = &socket->raddr6; 637 if (sz > sizeof( *raddr))638 sz = sizeof( *raddr);727 if (sz > sizeof(struct sockaddr_in6)) 728 sz = sizeof(struct sockaddr_in6); 639 729 memcpy(addr, raddr, sz); 640 * len = sizeof(*raddr);730 *alen = sz; 641 731 } 642 732 break; … … 645 735 return -ENOPROTOOPT; 646 736 } 737 738 if (fp->writeevt_w != fp->writeevt_r) fp->writeevt_r++; 647 739 648 740 return fp->fd; … … 673 765 } 674 766 else { 767 int temp = len; 675 768 for (;;) { 676 769 ret = tcp_snd_dat(socket->cepid, (void *)buf, len, SOCKET_TIMEOUT); 677 770 if (ret < 0) { 678 if (ret == E_TMOUT) 679 return -ETIME; 680 return -ECOMM; 771 return (ret == E_TMOUT) ? -EAGAIN : -ECOMM; 681 772 } 682 773 len -= ret; … … 685 776 buf = (const void *)&((uint8_t *)buf)[ret]; 686 777 } 778 ret = temp; 687 779 } 688 780 break; 689 781 } 690 782 case SOCK_DGRAM: { 691 int sz = alen; 692 if ((addr == NULL) || (sz < 8)) { 783 if ((addr == NULL) || (alen < sizeof(struct sockaddr_in))) { 693 784 return -EINVAL; 694 785 } 695 786 struct sockaddr_in *raddr = &socket->raddr4; 696 memset(raddr, 0, sizeof(*raddr)); 697 memcpy(raddr, addr, sz); 787 memcpy(raddr, addr, sizeof(struct sockaddr_in)); 698 788 T_IPV4EP rep = { ntohl(raddr->sin_addr.s_addr), ntohs(raddr->sin_port) }; 699 789 ret = udp_snd_dat(socket->cepid, &rep, (void *)buf, len, 700 790 (socket->flags & O_NONBLOCK) ? TMO_POL : SOCKET_TIMEOUT); 701 791 if (ret < 0) { 702 return (ret == E_TMOUT) ? -E TIME: -ECOMM;792 return (ret == E_TMOUT) ? -EAGAIN : -ECOMM; 703 793 } 704 794 break; … … 721 811 } 722 812 else { 813 int temp = len; 723 814 for (;;) { 724 815 ret = tcp6_snd_dat(socket->cepid, (void *)buf, len, SOCKET_TIMEOUT); 725 816 if (ret < 0) { 726 if (ret == E_TMOUT) 727 return -ETIME; 728 return -ECOMM; 817 return (ret == E_TMOUT) ? -EAGAIN : -ECOMM; 729 818 } 730 819 len -= ret; … … 732 821 break; 733 822 buf = (const void *)&((uint8_t *)buf)[ret]; 734 } 823 } 824 ret = temp; 735 825 } 736 826 break; 737 827 } 738 828 case SOCK_DGRAM: { 739 int sz = alen; 740 if ((addr == NULL) || (sz < 8)) { 829 if ((addr == NULL) || (alen < sizeof(struct sockaddr_in6))) { 741 830 return -EINVAL; 742 831 } 743 832 struct sockaddr_in6 *raddr = &socket->raddr6; 744 memset(raddr, 0, sizeof(*raddr)); 745 memcpy(raddr, addr, sz); 746 T_IPV6EP rep = { ntohl(raddr->sin6_addr.__in6_union.__s6_addr), ntohs(raddr->sin6_port) }; 833 memcpy(raddr, addr, sizeof(struct sockaddr_in6)); 834 T_IPV6EP rep; 835 addrcpy(&rep.ipaddr, &raddr->sin6_addr, 16); 836 rep.portno = ntohs(raddr->sin6_port); 747 837 ret = udp6_snd_dat(socket->cepid, &rep, (void *)buf, len, 748 838 (socket->flags & O_NONBLOCK) ? TMO_POL : SOCKET_TIMEOUT); 749 839 if (ret < 0) { 750 return (ret == E_TMOUT) ? -E TIME: -ECOMM;840 return (ret == E_TMOUT) ? -EAGAIN : -ECOMM; 751 841 } 752 842 break; … … 758 848 return -ENOPROTOOPT; 759 849 } 850 851 if (fp->writeevt_w != fp->writeevt_r) fp->writeevt_r++; 760 852 761 853 return ret; … … 800 892 syslog(LOG_ERROR, "sig_sem => %d", ret); 801 893 } 802 ret = tcp_rcv_buf(socket->cepid, &socket->input, TMO_FEVR); 894 ret = tcp_rcv_buf(socket->cepid, &socket->input, 895 (socket->flags & O_NONBLOCK) ? TMO_POL : SOCKET_TIMEOUT); 803 896 if (ret < 0) { 804 syslog(LOG_ERROR, "tcp_rcv_buf => %d", ret); 805 return -ECOMM; 897 if ((socket->flags & O_NONBLOCK) == 0) 898 syslog(LOG_ERROR, "tcp_rcv_buf => %d", ret); 899 return (ret == E_TMOUT) ? -EAGAIN : -ECOMM; 806 900 } 807 901 rsz = ret; … … 858 952 if ((socket->flags & O_NONBLOCK) == 0) 859 953 syslog(LOG_ERROR, "udp_rcv_buf => %d", ret); 860 return (ret == E_TMOUT) ? -E TIME: -ECOMM;954 return (ret == E_TMOUT) ? -EAGAIN : -ECOMM; 861 955 } 862 956 rsz = ret; … … 867 961 } 868 962 int sz = *alen; 869 memset(raddr, 0, sizeof(s ocket->raddr4));963 memset(raddr, 0, sizeof(struct sockaddr_in)); 870 964 raddr->sin_family = AF_INET; 871 965 raddr->sin_port = htons(rep.portno); 872 966 raddr->sin_addr.s_addr = htonl(rep.ipaddr); 873 if (sz > sizeof(s ocket->raddr4))874 sz = sizeof(s ocket->raddr4);967 if (sz > sizeof(struct sockaddr_in)) 968 sz = sizeof(struct sockaddr_in); 875 969 memcpy(addr, raddr, sz); 876 970 *alen = sz; … … 889 983 if ((addr != NULL) && (alen != NULL)) { 890 984 int sz = *alen; 891 if (sz > sizeof(s ocket->raddr4))892 sz = sizeof(s ocket->raddr4);985 if (sz > sizeof(struct sockaddr_in)) 986 sz = sizeof(struct sockaddr_in); 893 987 memcpy(addr, raddr, sz); 894 988 *alen = sz; … … 934 1028 syslog(LOG_ERROR, "sig_sem => %d", ret); 935 1029 } 936 ret = tcp6_rcv_buf(socket->cepid, &socket->input, TMO_FEVR); 1030 ret = tcp6_rcv_buf(socket->cepid, &socket->input, 1031 (socket->flags & O_NONBLOCK) ? TMO_POL : SOCKET_TIMEOUT); 937 1032 if (ret < 0) { 938 syslog(LOG_ERROR, "tcp6_rcv_buf => %d", ret); 939 return -ECOMM; 1033 if ((socket->flags & O_NONBLOCK) == 0) 1034 syslog(LOG_ERROR, "tcp6_rcv_buf => %d", ret); 1035 return (ret == E_TMOUT) ? -EAGAIN : -ECOMM; 940 1036 } 941 1037 rsz = ret; … … 986 1082 } 987 1083 988 T_IPV6EP rep = { 0, 0 };1084 T_IPV6EP rep = { { 0 }, 0 }; 989 1085 ret = udp6_rcv_dat(socket->cepid, &rep, buf, len, 990 1086 (socket->flags & O_NONBLOCK) ? TMO_POL : SOCKET_TIMEOUT); … … 992 1088 if ((socket->flags & O_NONBLOCK) == 0) 993 1089 syslog(LOG_ERROR, "udp6_rcv_buf => %d", ret); 994 return (ret == E_TMOUT) ? -E TIME: -ECOMM;1090 return (ret == E_TMOUT) ? -EAGAIN : -ECOMM; 995 1091 } 996 1092 rsz = ret; … … 1001 1097 } 1002 1098 int sz = *alen; 1003 memset(raddr, 0, sizeof(s ocket->raddr6));1099 memset(raddr, 0, sizeof(struct sockaddr_in6)); 1004 1100 raddr->sin6_family = AF_INET; 1005 1101 raddr->sin6_port = htons(rep.portno); 1006 #if _NET_CFG_BYTE_ORDER == _NET_CFG_BIG_ENDIAN 1007 memcpy(raddr->sin6_addr.__in6_union.__s6_addr, rep.ipaddr.__u6_addr.__u6_addr8, 16); 1008 #else 1009 for (int i = 0; i < 16; i++) 1010 raddr->sin6_addr.__in6_union.__s6_addr[i] = rep.ipaddr.__u6_addr.__u6_addr8[i]; 1011 #endif 1012 if (sz > sizeof(socket->raddr6)) 1013 sz = sizeof(socket->raddr6); 1102 addrcpy(&raddr->sin6_addr, &rep.ipaddr, 16); 1103 if (sz > sizeof(struct sockaddr_in6)) 1104 sz = sizeof(struct sockaddr_in6); 1014 1105 memcpy(addr, raddr, sz); 1015 1106 *alen = sz; … … 1028 1119 if ((addr != NULL) && (alen != NULL)) { 1029 1120 int sz = *alen; 1030 if (sz > sizeof(s ocket->raddr6))1031 sz = sizeof(s ocket->raddr6);1121 if (sz > sizeof(struct sockaddr_in6)) 1122 sz = sizeof(struct sockaddr_in6); 1032 1123 memcpy(addr, raddr, sz); 1033 1124 *alen = sz; … … 1054 1145 return -ENOPROTOOPT; 1055 1146 } 1147 1148 if (fp->readevt_w != fp->readevt_r) fp->readevt_r++; 1056 1149 1057 1150 return ret; … … 1427 1520 struct sockaddr_in6 laddr; 1428 1521 laddr.sin6_family = AF_INET; 1429 #if _NET_CFG_BYTE_ORDER == _NET_CFG_BIG_ENDIAN 1430 memcpy(laddr.sin6_addr.__in6_union.__s6_addr, laddr6->__u6_addr.__u6_addr8, 16); 1431 #else 1432 for (int i = 0; i < 16; i++) 1433 laddr.sin6_addr.__in6_union.__s6_addr[i] = laddr6->__u6_addr.__u6_addr8[i]; 1434 #endif 1522 addrcpy(&laddr.sin6_addr, laddr6, 16); 1435 1523 laddr.sin6_port = socket->laddr6.sin6_port; 1436 1524 *len = sizeof(struct sockaddr_in6); … … 1465 1553 delete_id(tcp_cepid_table, tcp_cepid_table_count, cepid); 1466 1554 if ((ret < 0) || (ret2 < 0)) { 1467 return (ret == E_TMOUT) ? -ETIME : -EINVAL;1555 return (ret == E_TMOUT) ? -ETIMEDOUT : -EIO; 1468 1556 } 1469 1557 } … … 1494 1582 delete_id(tcp6_cepid_table, tcp6_cepid_table_count, cepid); 1495 1583 if ((ret < 0) || (ret2 < 0)) { 1496 return (ret == E_TMOUT) ? -ETIME : -EINVAL;1584 return (ret == E_TMOUT) ? -ETIMEDOUT : -EIO; 1497 1585 } 1498 1586 } … … 1535 1623 int tcp_fd_ioctl(struct SHELL_FILE *fp, int req, void *arg) 1536 1624 { 1625 socket_t *socket = (socket_t *)fp->exinf; 1626 1627 switch (req) { 1628 case F_GETFL: 1629 return socket->flags; 1630 case F_SETFL: 1631 socket->flags = (unsigned int)arg; 1632 return 0; 1633 } 1634 1537 1635 return -EINVAL; 1538 1636 } … … 1571 1669 } 1572 1670 1671 bool_t tcp_fd_writable(struct SHELL_FILE *fp) 1672 { 1673 //socket_t *socket = (socket_t *)fp->exinf; 1674 1675 return /*fp->writable &&*/ (fp->writeevt_w == fp->writeevt_r); 1676 } 1677 1573 1678 void tcp_fd_delete(struct SHELL_FILE *fp) 1574 1679 { … … 1590 1695 return E_PAR; 1591 1696 1697 socket_t *socket = (socket_t *)fp->exinf; 1592 1698 int fd = fp->fd; 1593 1699 FD_SET(fd, (fd_set *)&flgptn); … … 1603 1709 syslog(LOG_ERROR, "wai_sem => %d", ret); 1604 1710 } 1605 socket_t *socket = (socket_t *)fp->exinf;1606 1711 socket->len += len; 1607 1712 ret = sig_sem(SEM_FILEDESC); … … 1670 1775 return E_PAR; 1671 1776 1777 socket_t *socket = (socket_t *)fp->exinf; 1672 1778 int fd = fp->fd; 1673 1779 FD_SET(fd, (fd_set *)&flgptn); … … 1683 1789 syslog(LOG_ERROR, "wai_sem => %d", ret); 1684 1790 } 1685 socket_t *socket = (socket_t *)fp->exinf;1686 1791 socket->len += len; 1687 1792 ret = sig_sem(SEM_FILEDESC); … … 1806 1911 } 1807 1912 1913 bool_t udp_fd_writable(struct SHELL_FILE *fp) 1914 { 1915 //socket_t *socket = (socket_t *)fp->exinf; 1916 1917 return fp->writable && (fp->writeevt_w == fp->writeevt_r); 1918 } 1919 1808 1920 void udp_fd_delete(struct SHELL_FILE *fp) 1809 1921 { … … 1849 1961 socket->input = udppara->input; 1850 1962 socket->buf = GET_UDP_SDU(udppara->input, udppara->off); 1851 memset(&socket->raddr4, 0, sizeof(s ocket->raddr4));1963 memset(&socket->raddr4, 0, sizeof(struct sockaddr_in)); 1852 1964 socket->raddr4.sin_family = AF_INET; 1853 1965 socket->raddr4.sin_port = htons(udppara->rep4.portno); … … 1932 2044 socket->input = udppara->input; 1933 2045 socket->buf = GET_UDP_SDU(udppara->input, udppara->off); 1934 memset(&socket->raddr6, 0, sizeof(s ocket->raddr6));2046 memset(&socket->raddr6, 0, sizeof(struct sockaddr_in6)); 1935 2047 socket->raddr6.sin6_family = AF_INET; 1936 2048 socket->raddr6.sin6_port = htons(udppara->rep6.portno); 1937 #if _NET_CFG_BYTE_ORDER == _NET_CFG_BIG_ENDIAN 1938 memcpy(socket->raddr6.sin6_addr.__in6_union.__s6_addr, udppara->rep6.ipaddr.__u6_addr.__u6_addr8, 16); 1939 #else 1940 for (int i = 0; i < 16; i++) 1941 socket->raddr6.sin6_addr.__in6_union.__s6_addr[i] = udppara->rep6.ipaddr.__u6_addr.__u6_addr8[i]; 1942 #endif 2049 addrcpy(&socket->raddr6.sin6_addr, &udppara->rep6.ipaddr, 16); 1943 2050 udppara->input->flags |= NB_FLG_NOREL_IFOUT; 1944 2051 ret = sig_sem(SEM_FILEDESC); -
asp3_tinet_ecnl_arm/trunk/ntshell/src/syscall.c
r374 r387 336 336 } 337 337 338 long SYS_rt_sigaction(long a, long b, long c ) {339 return shell_sigaction((int)a, (const struct sigaction *)b, (struct sigaction *)c);338 long SYS_rt_sigaction(long a, long b, long c, long d) { 339 return shell_sigaction((int)a, (const struct k_sigaction *)b, (struct k_sigaction *)c, (size_t)d); 340 340 } 341 341 … … 429 429 } 430 430 431 long SYS_nanosleep(long a, long b) 432 { 433 return shell_nanosleep((const struct timespec *)a, (struct timespec *)b); 434 } 435 431 436 long SYS_dup(long a) { 432 437 //int dup(int fd) … … 532 537 { 533 538 return no_implement("tgkill\n"); 534 }535 536 long SYS_nanosleep(long a, long b) {537 //int nanosleep(const struct timespec *req, struct timespec *rem)538 return no_implement("nanosleep\n");539 539 } 540 540
Note:
See TracChangeset
for help on using the changeset viewer.