History log of /haiku/src/add-ons/kernel/network/ppp/pppoe/PPPoEDevice.cpp
Revision Date Author Comments
# 5d179107 28-Aug-2019 Jaroslaw Pelczar <jarek@jpelczar.com>

PPPoEDevice.cpp: Add missing header for htons

Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: Icbb7d71a155da2ecbeaba578bdf022dac7b4d04f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1778
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# ceff2b88 05-Apr-2017 Alexander von Gluck IV <kallisti5@unixzen.com>

ppp: Basic build fixes on x86_64


# e3724c38 04-Jan-2014 mshlyn <linlongzhou@163.com>

PPP: Port to the new stack.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>

This is a squash of the 42 commits by @mshlyn, as I couldn't find a
way to break them into logical chunks. I did not include these in the build,
as it appears that they only partially work anyway, and much more cleanup is
still needed. However, this is a huge improvement on what was in the tree
before, which looked horrendous and didn't even compile (as it was designed
for the old stack).

Mostly fixes #812.


# 2f13f213 16-Jul-2006 Waldemar Kornewald <wkornew@nowhere.fake>

* Made the PPP code more single-threaded.
* Removed ppp_up code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18161 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 758b1d0e 12-Nov-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixes that make Haiku build with gcc 4. Mainly out of the following
categories:
* Missing includes (like <stdlib.h> and <string.h>).
* Linking against $(TARGET_LIBSTDC++) instead of libstdc++.r4.so.
* Local variables shadowing parameters.
* Default parameters in function definitions (as opposed to function
declarations).
* All C++ stuff (nothrow, map, set, vector, min, max,...) must be imported
explicitly from the std:: namespace now.
* "new (sometype)[...]" must read "new sometype[...]", even if sometype is
something like "const char *".
* __FUNCTION__ is no longer a string literal (but a string expression), i.e.
'printf(__FUNCTION__ ": ...\n")' is invalid code.
* A type cast results in a non-lvalue. E.g. "(char *)buffer += bytes"
is an invalid expression.
* "friend class SomeClass" only works when SomeClass is known before.
Otherwise the an inner class with that name is considered as friend.
gcc 4 is much pickier about scopes.
* gcc 4 is generally stricter with respect to type conversions in C.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14878 a95241bf-73f2-0310-859d-f6bbb57e9c96


# abdb7d1a 10-Oct-2005 Waldemar Kornewald <wkornew@nowhere.fake>

- updated email-address
- removed profiles, ppp_up, and some TODOs
- simplified KPPPReportManager and reports API, KPPPInterface::Up()+Down(), and PPPInterfaceListener (also removed some features from the last one)
- KPPPInterface now sends the last PPP_CONNECTION_REPORT message to every newly registered report receiver
- added net_server to the build, but removed old net_server testing-stuff

all changes are completely untested


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14338 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 84b580c4 20-Nov-2004 Waldemar Kornewald <wkornew@nowhere.fake>

DialOnDemand will be handled differently. Instead of setting it manually in the prefs we have one default interface. Still not finished.
Moved ppp_up code to KPPPManager.
Experimenting with IPCP DialOnDemand support.
Many changes I do not remember.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10117 a95241bf-73f2-0310-859d-f6bbb57e9c96


# abf44d1a 02-Mar-2004 Waldemar Kornewald <wkornew@nowhere.fake>

Some changes I did a long time ago. I think this also contains a fix for the last dead-lock I could find.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6857 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5a483e4d 06-Feb-2004 Waldemar Kornewald <wkornew@nowhere.fake>

Fixed a couple of possible dead-locks.
Fixed some minor bugs.
PPPoE: added experimental support for AccessConcentrator and ServiceName settings.
Changed libppp to import strlcat.c from libroot instead of duplicating code.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6511 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1cea3d85 24-Jan-2004 Waldemar Kornewald <wkornew@nowhere.fake>

Updated according to name changes in kernel classes.
IPCP and PAP (hopefully) make use of profiles.
Minor changes.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6284 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6cfb4dca 19-Jan-2004 Waldemar Kornewald <wkornew@nowhere.fake>

Replaced all printf and spawn_thread functions with their kernel counterparts.
IPCP: changed route initialization a little bit. Still cannot remove default route correctly.
Renamed interface_id to ppp_interface_id.
Some minor changes.
Worked on libppp.a (userland PPP library).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6159 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 86c13dda 05-Jan-2004 Waldemar Kornewald <wkornew@nowhere.fake>

Yeah! It finally works! The default route was missing, that was the only problem!
I established a connection with PPPoE and pinged goole and osnews. Net+ loaded half of www.osnews.com but then crashed because of a bug in our DNS resolver.
There is one more bug to fix: our core stack module does not remove the routes when an interface is deleted.
Thus, there will always remain the route(s) from the last connection(s).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5910 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8dad9b1e 27-Dec-2003 Waldemar Kornewald <wkornew@nowhere.fake>

Added modem driver (completely untested, currently no support for settings speed because modem API is missing).
Some minor changes.
Added TODO file to almost all modules.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5768 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 93a59056 26-Nov-2003 Waldemar Kornewald <wkornew@nowhere.fake>

Fixed bugs.
IPCP: fixed setting of local and peer address (in_control).
Renamed some variables to comply with our style defs.
Fixed a dead-lock in ppp interface and libkernelppp.a.

TODO:
Unfortunately, our stack does not want to ping the remote host. :(
I do not know if this is my fault or a problem with our stack.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5487 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4e0ad752 07-Nov-2003 Waldemar Kornewald <wkornew@nowhere.fake>

Fixed many bugs and added debug output.
You can now successfully (dis-)connect to(/from) a PPP server using the PPPoE device module.
To be useful we need the PAP and IPCP modules (in the works).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5276 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8f79376c 24-Oct-2003 Waldemar Kornewald <wkornew@nowhere.fake>

Allow to build as userland add-on.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5151 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ad0928eb 24-Oct-2003 Waldemar Kornewald <wkornew@nowhere.fake>

Allow to build as userland modules.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5150 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b0bff411 24-Oct-2003 Waldemar Kornewald <wkornew@nowhere.fake>

Bug fixes.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5148 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5a4503c3 23-Oct-2003 Waldemar Kornewald <wkornew@nowhere.fake>

Added PPPoE module.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5121 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2f13f213de8e2b44640b88a2b3d42ed921f637cb 16-Jul-2006 Waldemar Kornewald <wkornew@nowhere.fake>

* Made the PPP code more single-threaded.
* Removed ppp_up code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18161 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 758b1d0e05fe1042cce6e00d194a147802d4f9be 12-Nov-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixes that make Haiku build with gcc 4. Mainly out of the following
categories:
* Missing includes (like <stdlib.h> and <string.h>).
* Linking against $(TARGET_LIBSTDC++) instead of libstdc++.r4.so.
* Local variables shadowing parameters.
* Default parameters in function definitions (as opposed to function
declarations).
* All C++ stuff (nothrow, map, set, vector, min, max,...) must be imported
explicitly from the std:: namespace now.
* "new (sometype)[...]" must read "new sometype[...]", even if sometype is
something like "const char *".
* __FUNCTION__ is no longer a string literal (but a string expression), i.e.
'printf(__FUNCTION__ ": ...\n")' is invalid code.
* A type cast results in a non-lvalue. E.g. "(char *)buffer += bytes"
is an invalid expression.
* "friend class SomeClass" only works when SomeClass is known before.
Otherwise the an inner class with that name is considered as friend.
gcc 4 is much pickier about scopes.
* gcc 4 is generally stricter with respect to type conversions in C.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14878 a95241bf-73f2-0310-859d-f6bbb57e9c96


# abdb7d1abbf1686ecb8f7132e576d332f6cc01ed 10-Oct-2005 Waldemar Kornewald <wkornew@nowhere.fake>

- updated email-address
- removed profiles, ppp_up, and some TODOs
- simplified KPPPReportManager and reports API, KPPPInterface::Up()+Down(), and PPPInterfaceListener (also removed some features from the last one)
- KPPPInterface now sends the last PPP_CONNECTION_REPORT message to every newly registered report receiver
- added net_server to the build, but removed old net_server testing-stuff

all changes are completely untested


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14338 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 84b580c425e26370792255dbb5e1879250434372 20-Nov-2004 Waldemar Kornewald <wkornew@nowhere.fake>

DialOnDemand will be handled differently. Instead of setting it manually in the prefs we have one default interface. Still not finished.
Moved ppp_up code to KPPPManager.
Experimenting with IPCP DialOnDemand support.
Many changes I do not remember.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10117 a95241bf-73f2-0310-859d-f6bbb57e9c96


# abf44d1a2b878b33fcf39a6cf0d0b1625d78edfe 02-Mar-2004 Waldemar Kornewald <wkornew@nowhere.fake>

Some changes I did a long time ago. I think this also contains a fix for the last dead-lock I could find.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6857 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5a483e4d35557e2c0803bc8a8b091beaffdc8d26 06-Feb-2004 Waldemar Kornewald <wkornew@nowhere.fake>

Fixed a couple of possible dead-locks.
Fixed some minor bugs.
PPPoE: added experimental support for AccessConcentrator and ServiceName settings.
Changed libppp to import strlcat.c from libroot instead of duplicating code.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6511 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1cea3d8564d4b4351a69aba0e5e6171cbdf5e907 24-Jan-2004 Waldemar Kornewald <wkornew@nowhere.fake>

Updated according to name changes in kernel classes.
IPCP and PAP (hopefully) make use of profiles.
Minor changes.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6284 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6cfb4dcac25af9c27f1b69ea71ba47d12e1c64fb 19-Jan-2004 Waldemar Kornewald <wkornew@nowhere.fake>

Replaced all printf and spawn_thread functions with their kernel counterparts.
IPCP: changed route initialization a little bit. Still cannot remove default route correctly.
Renamed interface_id to ppp_interface_id.
Some minor changes.
Worked on libppp.a (userland PPP library).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6159 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 86c13dda5a831b614ef044139c2e89f4f3352621 05-Jan-2004 Waldemar Kornewald <wkornew@nowhere.fake>

Yeah! It finally works! The default route was missing, that was the only problem!
I established a connection with PPPoE and pinged goole and osnews. Net+ loaded half of www.osnews.com but then crashed because of a bug in our DNS resolver.
There is one more bug to fix: our core stack module does not remove the routes when an interface is deleted.
Thus, there will always remain the route(s) from the last connection(s).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5910 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8dad9b1eb24c679b79309f1380a91eb8c0246de5 27-Dec-2003 Waldemar Kornewald <wkornew@nowhere.fake>

Added modem driver (completely untested, currently no support for settings speed because modem API is missing).
Some minor changes.
Added TODO file to almost all modules.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5768 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 93a59056e2b575c038d74055e4c9b865596364a8 26-Nov-2003 Waldemar Kornewald <wkornew@nowhere.fake>

Fixed bugs.
IPCP: fixed setting of local and peer address (in_control).
Renamed some variables to comply with our style defs.
Fixed a dead-lock in ppp interface and libkernelppp.a.

TODO:
Unfortunately, our stack does not want to ping the remote host. :(
I do not know if this is my fault or a problem with our stack.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5487 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4e0ad75221194c01b01ad7f13afe0a7aa6256a83 07-Nov-2003 Waldemar Kornewald <wkornew@nowhere.fake>

Fixed many bugs and added debug output.
You can now successfully (dis-)connect to(/from) a PPP server using the PPPoE device module.
To be useful we need the PAP and IPCP modules (in the works).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5276 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8f79376c490d53c23383bd7269945f729e98a207 24-Oct-2003 Waldemar Kornewald <wkornew@nowhere.fake>

Allow to build as userland add-on.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5151 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ad0928ebe3c884ffe90f09b0f8db8dd95a42a735 24-Oct-2003 Waldemar Kornewald <wkornew@nowhere.fake>

Allow to build as userland modules.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5150 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b0bff411f1dabdfeec2ac95592eaec4ed46a6883 24-Oct-2003 Waldemar Kornewald <wkornew@nowhere.fake>

Bug fixes.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5148 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5a4503c3ff53541df235e97891a6e33af0c42cf1 23-Oct-2003 Waldemar Kornewald <wkornew@nowhere.fake>

Added PPPoE module.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5121 a95241bf-73f2-0310-859d-f6bbb57e9c96