Can lwip be configured to both IPv4 and IPv6 at the same time?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Can lwip be configured to both IPv4 and IPv6 at the same time?

1,634件の閲覧回数
larrydemuth
Contributor III

Can lwip do both IPv4 and IPv6 at the same time? Same question for the HTTP server. I know for a fact that it could be done in MQX5.0, because I did it. I don't know about lwip though. It looks as if the HTTP server can not due to the following code snipet:

static int32_t httpsrv_set_params(HTTPSRV_STRUCT *server, HTTPSRV_PARAM_STRUCT *params)
{
#if LWIP_IPV4
server->params.address.sa_family = AF_INET;
((struct sockaddr_in *)(&server->params.address))->sin_port = PP_HTONS(HTTPSRV_CFG_DEFAULT_HTTP_PORT);
#elif LWIP_IPV6
server->params.address.sa_family = AF_INET6;
((struct sockaddr_in6 *)(&server->params.address))->sin6_port = PP_HTONS(HTTPSRV_CFG_DEFAULT_HTTP_PORT);
#endif

Sure wish you guys would have just kept the MQX RTCS instead of going to lwip...

 

0 件の賞賛
返信
4 返答(返信)

1,618件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

Hi @larrydemuth :

 

Theoretically, IPv4 and IPv6 can run at the same time.  But from the code snippet you past, it seems not in MQX v5 HTTPSRV. 

I would suggest you contact Embedded Access directly, who is the owner of MQX now.

https://embedded-access.com/

 

Regards

Daniel

0 件の賞賛
返信

1,607件の閲覧回数
larrydemuth
Contributor III

OK, after further testing I was able to get IPv4 and IPv6 ping to work, so it appears lwip can support both at the same time. However the HTTP interface does NOT!  Is there a plan to update the HTTP server to do both at the same time? It shouldn't be that difficult since pretty much all of the HTTP server code was taken straight from MQX, and it supported both at the same time.

0 件の賞賛
返信

1,598件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

@larrydemuth   I will create a feature request to the software team. Thanks for your feedback.

Regards

Daniel

1,615件の閲覧回数
larrydemuth
Contributor III

I was asking about lwip and not MQX 5.0. I'm evaluating the IMXRT1024 and am using MCUXpresso and SDK 2.11.1 which uses lwip. I tried building with both LWIP_IPV4 and LWIP_IPV6 defined. When I tried to ping only IPv4 got a response, IPv6 did not. I also could not access the web page using IPv6. 

I know it works using MQX 5.0 and a K66 part since I did it, I just have doubts about lwip in SDK 2.11.1.

0 件の賞賛
返信