History log of /haiku/src/add-ons/kernel/network/ppp/shared/libppp/PPPInterface.cpp
Revision Date Author Comments
# 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.


# fc1cf1a3 26-Mar-2007 Axel Dörfler <axeld@pinc-software.de>

Style cleanup, patch by Vasilis Kaoutsis - thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20430 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


# a89ad654 12-Oct-2005 Waldemar Kornewald <wkornew@nowhere.fake>

Thank you, Kristian Knuechel, for reporting a bug (now fixed).
Fixed the build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14359 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


# 484a5f0e 12-Jan-2005 Waldemar Kornewald <wkornew@nowhere.fake>

Fixed some stupid bugs. Added atomic.S (only atomic_xxx64 functions). This will be removed later because Haiku has it built-in.
Added some little functions.


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


# e91b7374 27-Dec-2004 Waldemar Kornewald <wkornew@nowhere.fake>

Implemented support for default interface and ConnectOnDemand within core. IPCP will probably need more tweaking, did not have a look at that.
Interface statistics are now maintained.
If I did not forget anything the core stack is now feature-complete.
Only ppp_up must be finished, bugs and hacks found, and modem support added; that's it for R1, I hope.
Everyting untested!


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10541 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


# 3f3689bb 01-Jun-2004 Waldemar Kornewald <wkornew@nowhere.fake>

Finished doxygen comments for the PPP API.
Minor changes to simplify PAP authenticator.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7730 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


# 683165b7 24-Jan-2004 Waldemar Kornewald <wkornew@nowhere.fake>

Added profile and interface naming support.
Added some small doxygen comments.
Minor changes.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6283 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


# 52fad5f5 25-Oct-2003 Waldemar Kornewald <wkornew@nowhere.fake>

Use the NET_STACK_DRIVER_PATH environment variable if available.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5157 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


# 4fbbad30 23-Oct-2003 Waldemar Kornewald <wkornew@nowhere.fake>

The beginnings of libppp.a. This is a userland library to talk to the PPP stack. It hides the ioctl() stuff from the user.


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


# fc1cf1a3d24bc28201c314c56be8d2816550f3f6 26-Mar-2007 Axel Dörfler <axeld@pinc-software.de>

Style cleanup, patch by Vasilis Kaoutsis - thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20430 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


# a89ad654b05396249aa61a51c2ec2441e3c111b9 12-Oct-2005 Waldemar Kornewald <wkornew@nowhere.fake>

Thank you, Kristian Knuechel, for reporting a bug (now fixed).
Fixed the build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14359 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


# 484a5f0ec2a2657494fdb86a2a5d96f3d01f9973 12-Jan-2005 Waldemar Kornewald <wkornew@nowhere.fake>

Fixed some stupid bugs. Added atomic.S (only atomic_xxx64 functions). This will be removed later because Haiku has it built-in.
Added some little functions.


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


# e91b73741246bd6859046aac533269726d8c485a 27-Dec-2004 Waldemar Kornewald <wkornew@nowhere.fake>

Implemented support for default interface and ConnectOnDemand within core. IPCP will probably need more tweaking, did not have a look at that.
Interface statistics are now maintained.
If I did not forget anything the core stack is now feature-complete.
Only ppp_up must be finished, bugs and hacks found, and modem support added; that's it for R1, I hope.
Everyting untested!


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10541 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


# 3f3689bb79f1fa6e5bf21e925e17463016c3372e 01-Jun-2004 Waldemar Kornewald <wkornew@nowhere.fake>

Finished doxygen comments for the PPP API.
Minor changes to simplify PAP authenticator.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7730 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


# 683165b7d17d6d6ab67f06cc34b65921fe53c218 24-Jan-2004 Waldemar Kornewald <wkornew@nowhere.fake>

Added profile and interface naming support.
Added some small doxygen comments.
Minor changes.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6283 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


# 52fad5f56b110f9e8a6b568a0f94176ab1e30354 25-Oct-2003 Waldemar Kornewald <wkornew@nowhere.fake>

Use the NET_STACK_DRIVER_PATH environment variable if available.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5157 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


# 4fbbad300911af710e4ca7ad8d3fcfea75a5282c 23-Oct-2003 Waldemar Kornewald <wkornew@nowhere.fake>

The beginnings of libppp.a. This is a userland library to talk to the PPP stack. It hides the ioctl() stuff from the user.


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