diff options
author | Vijay Kumar Banerjee <vijay@rtems.org> | 2021-06-14 18:42:56 -0600 |
---|---|---|
committer | Kinsey Moore <kinsey.moore@oarcorp.com> | 2022-07-08 16:14:55 -0500 |
commit | 5857da3fa8f88d7028d80fe270d03e779706e533 (patch) | |
tree | d660fc757b82de55573b0358525f6bf536ec623e /cpsw/src/include/lwip_bbb.h | |
parent | b9f8a984bef5861b79dbfaddc68dfc1ab1ec32e9 (diff) |
lwip: Add bbb and tms570 drivers
+ Add networking01 and telnetd01 tests
Diffstat (limited to 'cpsw/src/include/lwip_bbb.h')
-rw-r--r-- | cpsw/src/include/lwip_bbb.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/cpsw/src/include/lwip_bbb.h b/cpsw/src/include/lwip_bbb.h new file mode 100644 index 0000000..c7624b5 --- /dev/null +++ b/cpsw/src/include/lwip_bbb.h @@ -0,0 +1,51 @@ +#ifndef __LWIP_BBB_H__ +#define __LWIP_BBB_H__ + +#include "lwip/ip_addr.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef LEN_MAC_ADDRESS +#define LEN_MAC_ADDRESS (6) +#endif + +/** + * @brief The possible IP modes, Static, DHCP or AutoIP + * For use in the lwipIf struct. + */ +typedef enum IPMode +{ + IPADDR_USE_STATIC, + IPADDR_USE_DHCP, + IPADDR_USE_AUTOIP +} IPMode; + +/** + * @brief Used to pass the addresses for the LWIP + * initialization routines(Ip address, NetMask, GW, mode and MAC). + * + */ +typedef struct lwipIf +{ + ip4_addr_t ipAddr; /* IP Address */ + ip4_addr_t netMask; /* Net Mask */ + ip4_addr_t gwAddr; /* Gate Way Address */ + IPMode ipMode; /* IP Address mode*/ + unsigned char macArray[LEN_MAC_ADDRESS]; /* MAC Address to be used*/ +}LWIP_IF; + +/** + * @brief Starts the Lwip stack and initializes low level devices. + * + * @param ipConf The desired addresses and/or modes. + * @return True if everything went fine, false otherwise. + */ +bool startLwip(LWIP_IF* ipConf); + +#ifdef __cplusplus +} +#endif + +#endif // __LWIP_BBB_H__ |