Commit Graph

12 Commits (676e97cbe5a041d9f01ff7a91fcea9ba275ceaee)

Author SHA1 Message Date
Daniel Thompson 9ef2ec9110 zephyr: Exploit "make outputexports"
The outputexpors target, which exports Zephyr environment variables, was
recently added to Zephyr. By exploiting this feature we can hugely simplify
the build system, improving robustness at the same time.

Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
2016-10-09 21:17:09 +01:00
Paul Sokolovsky 7b562a2be8 zephyr/modsocket: Check pending exception during (some) blocking ops. 2016-09-29 17:35:49 -07:00
Paul Sokolovsky fa1b9593ed zephyr/modsocket: Be sure to define default gateway address (uip_draddr).
Talking to Internet won't work without this.
2016-09-29 15:23:10 -07:00
Paul Sokolovsky 718b896f48 zephyr/modsocket: Don't consult uip_connr flags when deciding conn state.
The fact that *now* connection closed doesn't mean there's no data in the
queue. We should process packet queue in order, and consider connection
closed only when hit corresponding state change packet (the latter requires
patches to Zephyr, because otherwise it doesn't deliver connection state
change packets to an app).
2016-09-29 15:22:59 -07:00
Paul Sokolovsky c5b33851d7 zephyr/modsocket: socket_write: Send only data fitting in a netbuf. 2016-09-29 10:16:24 -07:00
Paul Sokolovsky 9290942f3a zephyr/modsocket: Detect connection reset in connect().
TODO: Think about connection reset in other places too.
2016-09-29 10:16:24 -07:00
Paul Sokolovsky 3893a04f48 zephyr/modsocket: Add DEBUG_printf() logging. 2016-09-29 10:16:24 -07:00
Paul Sokolovsky 2d387aa794 zephyr/modsocket: socket_read: Handle zero-length packets.
Zephyr actually filters these out, and requires patching to let them thru.
And underlying uIP uses them to e.g. communicate changes in connection
state (like peer closed connection). Without this change (and associated
Zephyr patch), socket read requests may hang if peer close happened after
read request was issued.
2016-09-29 10:16:24 -07:00
Paul Sokolovsky 1e8605882a zephyr/modsocket: repr(): Dump even more internal socket info. 2016-09-29 10:16:24 -07:00
Paul Sokolovsky b7ac314861 zephyr/modsocket: Implement partial reads/writes. 2016-09-29 10:16:23 -07:00
Paul Sokolovsky 545b5a21c6 zephyr/modsocket: Initial implementation of stream protocol. 2016-09-29 10:16:23 -07:00
Paul Sokolovsky 6ea9c13fee zephyr/modsocket: Add initial implementation of usocket module. 2016-09-29 10:16:23 -07:00