-
Notifications
You must be signed in to change notification settings - Fork 6.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial PPP implementation #16217
Initial PPP implementation #16217
Conversation
All checks are passing now. Review history of this comment for details about previous failed status. |
Resolved merge conflicts |
First version that works properly against Linux pppd with IPv4 and IPv6. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of it seems fine to me.
There is just (well it is not a small change) the logic of config_info_* functions and ppp_send_pkt: that has to be reworked so net_pkt is allocated first so all its API can be used instead of the net_buf one.
Whit that done, I think it will be good to go.
This is in the TODO list (also marked in the code), but as this is a bigger change, I want to postpone this a bit and to be done as a bug fix. |
Updated according to comments. |
Fixed the sanitychecker errors. |
Resolved merge conflicts. |
This implements ppp L2 component, LCP and IPCP modules. Fixes zephyrproject-rtos#14034 Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Initial version for PPP IPv6 Control Protocol. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
In order to simplify ppp testing, use ppp specific serial port when starting qemu. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The ppp driver uses uart_pipe driver for data transfer. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The traffic class printing section was too convoluted because of many #ifdef's. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Print point-to-point network information properly. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Make sure that we are able to parse incoming PPP data correctly. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
By default PPP is started immediately when the network interface goes up. This can be problematic especially when debugging the beast so allow user to delay the startup. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If we receive a protocol that we do not currently handle, then return Protocol-Reject to peer. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If the network interface is point-to-point one which does not need IP address etc, then no need to start DAD etc for those interfaces. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
We had a big endian helper but little endian one was missing. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
We had a big endian helper but little endian one was missing. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
A sample overlay config file for PPP added. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Currently only net-shell calls net_ppp_ping() command, so make it return the amount of time that it took to receive Echo-Reply so the net-shell can print the round trip time value. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
We must discard the received Discard-Request silently. See RFC 1661 chapter 5.9 for details. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add information about PPP into Zephyr documentation. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
As we now have PPP support, use more generic "serial-net" string instead of "slip" when setting what kind of networking the board supports. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's get this in. However, the logic of creation packet with options will have to be reworked, too late for this now.
LOG_DBG("Saving byte %02x", byte); | ||
} | ||
|
||
/* This is not very intuitive but we must allocate new buffer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove that comment. If that matters, net_pkt documentation should be improved.
It was always designed so 1st it allocates the buffer 2nd it operates on the buffer. (allocate only allocates, write only writes, read only reads etc...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I prefer leaving this comment here for time being. I spent hours debugging this as it was not clear why the api requires that. At least for me, it would be difficult to understand why we have the ppp->available==1 check without the comment. The documentation of net-pkt should be improved in this respect.
Initial implementation for Point-to-point protocol (PPP). It implements LCP, IPCP and IPV6CP modules. See these RFCs for details.
This is still work-in-progress and following things need more TLC:
Fixes #14034