- Timestamp:
-
11/19/18 20:34:12 (6 years ago)
- Author:
-
Pavel Pisa
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v15
|
v16
|
|
109 | 109 | }}} |
110 | 110 | |
| 111 | This simple way how to map RTEMS descriptors to LwIP ones can be found in file |
| 112 | |
| 113 | https://github.com/ppisa/rtems-devel/blob/master/rtems-omk-template/applwiptest/rtems_lwip_io.c |
| 114 | |
| 115 | Because LwIP sockaddr type can in general differ and AF_XXX and PF_XXX differ |
| 116 | between NewLib and LwIP there is implemented layer to translate NewLib application |
| 117 | types and defines to from/to LwIP ones |
| 118 | |
| 119 | https://github.com/ppisa/rtems-devel/blob/master/rtems-omk-template/applwiptest/rtems_lwip_int.h |
| 120 | |
| 121 | https://github.com/ppisa/rtems-devel/blob/master/rtems-omk-template/applwiptest/rtems_lwip_io.c |
111 | 122 | |
112 | 123 | But simple solution has disadvantage that there are consulted two tables (FD_RTEMS -> RTEMS iop data, FD_LwIP to LwIP connection state) in each operation function. even worse both tables and objects have to be separately allocated and freed. Better solution is to not use LwIP provided FD allocation layer and use directly API working with connection state through structure pointers to struct netconn. LwIP FD API |