Sylvain Rochet
f7584fa883
PPP, CORE, fixed callbacks return value
...
Fixed return value in case of abnormal termination.
Set pcb->err_code in case of failed setup link.
2015-02-17 23:22:14 +01:00
Sylvain Rochet
18074ff98f
PPP, PPPoE, improved removal from linked list
...
Replaced naive link list removal code to a more clever one.
2015-02-17 23:22:14 +01:00
Sylvain Rochet
4ad60b477c
PPP, PPPoS, structure size optimisation
...
Reordered PPPoS structure so there is no alignment hole for 32 and 64 bits
systems. Reduced types which were too large.
2015-02-17 23:22:14 +01:00
Sylvain Rochet
69469496e2
PPP, PPPoS, moved out_accm from PPP core to PPPoS
...
Last PPPoS variable in PPP core moved to PPPoS.
2015-02-17 23:22:14 +01:00
Sylvain Rochet
baaa2592a6
PPP, PPPoS, removed xmit_accm, almost duplicate of out_accm
...
xmit_accm was meant to be a user configurable asyncmap, it was actually
broken since the introduction of ppp_new by the way we now reset the PPP
initial state, looks like no one until now is needing it anymore. If
necessary we will reintroduce this feature later properly instead of a
dirty and ugly hack into the PPP code.
2015-02-17 23:22:14 +01:00
Sylvain Rochet
ecb8aa6fc1
PPP, PPPoS, merged ppp(os)_pcb_rx to pppos_pcb
...
Merged ppp(os)_pcb_rx to pppos_pcb, saved 8 bytes of pointers
and unecessary init steps.
2015-02-17 23:22:14 +01:00
Sylvain Rochet
34210901bf
PPP, PPPoS, moved ppp.rx to pppos.rx
...
PPP rx control block moved to PPPoS
2015-02-17 23:22:14 +01:00
Sylvain Rochet
7132893863
PPP, PPPoS, re-enabled PPPCTLG_FD
...
Found a fine way to get PPP fd without making this call crash for for PPPoE
or PPPoL2TP.
2015-02-17 23:22:14 +01:00
Sylvain Rochet
cfe04d4453
PPP, PPPoS, using PPPoS PCB pointer on VJ and pppos_ configuration functions
...
Slightly more consistent this way, and prevent using link_ctx_cb pointer
from PPPoS protocol file.
2015-02-17 23:22:14 +01:00
Sylvain Rochet
f98f2890f3
PPP, PPPoS, check if PPPoS configuration functions are used on PPPoS
...
We don't have callbacks which can be set or cleared for PPPoS
configuration, there is too much callbacks to create and PPPoS must be
kept light, therefore PPPoS functions can be called when PPP core
configure a PPPoE or PPPoL2TP interface, this is very unlikely to
happens because protocols not supported by PPPoE or PPPoL2TP are
disabled at LCP/IPCP negotiation but being safe is still better.
Check if passed PPP pointer to PPPoS configuration functions is a PPPoS
interface by using a linked list of exiting PPPoS interfaces.
2015-02-17 23:22:14 +01:00
Sylvain Rochet
d93c21349f
PPP, PPPoS, fixed build with PPP_FCS_TABLE=1
...
Oops, I managed to break builds with PPP_FCS_TABLE=1, fixed.
2015-02-17 23:22:14 +01:00
Sylvain Rochet
9358dbbd99
PPP, PPPoS, various static and const added
...
ppp_get_fcs() is now static, const modifier added on ppp_accm_mask
2015-02-17 23:22:13 +01:00
Sylvain Rochet
2b9d304816
PPP, PPPoS, renamed *sc pointer to *pppos, renamed *pcb pointers to *pppos and *ppp
...
It was a bit confusing and error prone having *pcb pointers for both
ppp_pcb* and pppos_pcb*, fixed confusion with a strict naming for both.
2015-02-17 23:22:13 +01:00
Sylvain Rochet
e6465a6f44
PPP, PPPoS, moved VJ from PPP core to PPPoS
...
VJ is only available for PPPoS, moved VJ from PPP CORE to PPPoS.
2015-02-17 23:22:13 +01:00
Sylvain Rochet
4aa9244b92
PPP, PPPoS moved fd from ppp_pcb to pppos_pcb
...
Moved fd from ppp_pcb to pppos_pcb.
However PPP ioctl PPPCTLG_FD is temporarily disabled until I found a
better solution.
2015-02-17 23:22:13 +01:00
Sylvain Rochet
1ac4d1b793
PPP, PPPoS needs vj.h
2015-02-17 23:22:13 +01:00
Sylvain Rochet
ea205f2fcd
PPP, add PPPoS CB for PPPoS private data
...
Created a new PPPoS CB going to have PPPoS private data, so allocating a
PPPoE or a PPPoL2TP interface does not allocate as well PPPoS variables.
2015-02-17 23:22:13 +01:00
Sylvain Rochet
9c15ffbb74
PPP: Moved PPPoS from ppp.c to pppos.c
...
Started removing from PPP core most of low level protocol PPPoS
handling to separate files, using the new low level PPP callbacks.
2015-02-17 23:22:13 +01:00
Sylvain Rochet
09b4485870
PPP, generalized callbacks calls from PPP core, removed all PPPoE and PPPoL2TP references
...
Almost there, removed all PPPoE and PPPoL2TP references from PPP core,
using the generic callbacks interface everywhere.
2015-02-17 23:22:13 +01:00
Sylvain Rochet
19282d6d6c
PPP, moved low level protocol connect init to low level protocol files
...
Low level protocol init machine state does not belong to PPP core,
moved those init to respective low level protocol files.
2015-02-17 23:22:13 +01:00
Sylvain Rochet
ee85aaccd2
PPP, removed low level create functions from PPP core
...
ppp_over_ethernet_create() moved from ppp.c to pppoe.c
ppp_over_l2tp_create() moved from ppp.c to pppol2tp.c
2015-02-17 23:22:13 +01:00
Sylvain Rochet
0afc34f6fc
PPP, moved ppp_write and ppp_netif_output low level protocols functions to respective low level protocol files
...
Moved ppp_write_over_ethernet() and ppp_netif_output_over_ethernet() to pppoe.c
Moved ppp_write_over_l2tp() and ppp_netif_output_over_l2tp() to pppol2tp.c
2015-02-17 23:22:13 +01:00
Sylvain Rochet
45bfccfddc
PPP, prepare new callbacks for low level protocols
...
New callbacks: write and netif_output
2015-02-17 23:22:13 +01:00
Sylvain Rochet
f8501478f6
PPP: prepared callbacks from PPP core to low level protocols
...
New PPP callback from PPP core to low level protocols, first
step about removing named calls to low level protocols from PPP core.
2015-02-17 23:22:13 +01:00
Sylvain Rochet
a5582e0960
PPP: re-order functions in the common sense API order
...
Re-order ppp.[ch] functions in the order functions should be called from
user application. Moved create functions, which actually return a PPP
control block before functions needing a PPP control block.
2015-02-17 23:22:13 +01:00
Sylvain Rochet
b4fe72c4a2
PPP: removed duplicated code in ppp_close()
...
Looks like previous refactoring and cleaning made ppp_close()
consistent for all our low level protocol backends, cleaned
up duplicated code.
2015-02-17 23:22:13 +01:00
Sylvain Rochet
48f7678771
PPP: re-order prototypes, ppp_init before ppp_new
...
Cosmetic only.
2015-02-17 23:22:13 +01:00
Sylvain Rochet
808098413c
PPP: removed PPPoE and PPPoL2TP callback status notifier
...
Added necessary PPP core functions for PPPoE and PPPoL2TP status
notificaton (ppp_link_failed and ppp_link_end), removed callback,
low level protocol are now calling PPP core "link" functions.
2015-02-17 23:22:12 +01:00
Sylvain Rochet
74fd2dc9ad
PPP: moved ppp_new() to low level protocol init for PPPoE and PPPoL2TP
...
First step of a rework of how low level protocols are using the
PPP core. Low level protocols are now going to use the core instead
of core using the low level protocols.
Final goal: separate PPP core code from low level protocols.
2015-02-17 23:22:12 +01:00
Sylvain Rochet
443b2551c7
PPP: moved duplicated init code from ppp_over_X_create() to ppp_new()
...
Some init code were duplicated for all low-level PPP protocols, moved
uselessly duplicated code to ppp_new().
2015-02-17 23:22:12 +01:00
Sylvain Rochet
7b681bc94a
PPP: re-order functions in the common sense API order
...
Re-order ppp.[ch] functions in the order functions should be called from
user application. Moved create functions, which actually return a PPP
control block before functions needing a PPP control block.
2015-02-17 23:22:12 +01:00
Sylvain Rochet
bd29f7168c
PPP: ppp_init() is not a public function, moving it in private part
...
ppp_init() is not a public fonction anymore, move this function
in ppp.c "private" functions.
2015-02-17 23:22:12 +01:00
Sylvain Rochet
c8c0dc2f53
PPP: using a macro for ppp_set_default() instead of a function
...
This function is only calling netif_set_default(), a macro
is adequate.
2015-02-17 23:22:12 +01:00
Sylvain Rochet
17c6be6a9b
PPP: removed ppp_delete(), merged with ppp_free()
...
The only benefit of ppp_delete() call was about having a persistent
netif interface. netif was moved out of PPP pcb so we don't need
ppp_delete() anymore, second step in simplifying the weird
new/open/free/delete PPP API.
2015-02-17 23:22:12 +01:00
Sylvain Rochet
318e752fd6
PPP: removed ppp_new(), merged with ppp_over_X_create()
...
The only benefit of ppp_new() call was about having a persistent netif
interface. netif was moved out of PPP pcb so we don't need ppp_new()
anymore, first step in simplifying the weird new/open/free/delete PPP
API.
2015-02-17 23:22:12 +01:00
Sylvain Rochet
3dcfd7ba41
PPP: moved netif out of PPP control block
...
Users might want to share a netif control block between an Ethernet
interface and a PPPoS interface (I want actually) in case PPP is just
used as redundancy if Ethernet is down (eg. PPPoS GPRS fail over).
Moved netif out of PPP control block in a similar way it is currently
done for Ethernet interfaces. Furthermore, this is a first step on
removing the "new/create/free/delete" API which is awful but currently
necessary to handle fail over from PPPoX to another PPPoX (eg. from PPoE
on xDSL to PPPoS on GPRS fail over) without free()ing the netif which
might be used on udp_sendto() or L2TP VPN links.
2015-02-17 23:22:12 +01:00
sg
604a92dc3d
fixed bug #38853 "connect() use a wrong errno": return ERR_ALREADY/EALRADY during connect, ERR_ISCONN/EISCONN when already connected
2015-02-17 22:10:23 +01:00
sg
b146ae96a7
sockets.c: removed LWIP_TCPIP_CORE_LOCKING hack in lwip_sendto(): since all functions are static when LWIP_NETCONN==0, the speedup gained by this hack should now be minimal and not worth the duplicate code.
2015-02-17 21:26:40 +01:00
goldsimon
0963e91c34
api_msg_c: fixed compiler warning (added brackets in if statement)
2015-02-17 09:38:20 +01:00
goldsimon
5d13b5a2fb
fixed bug #37614 "Errors from ipX_output are not processed". Now tcp_output(_segment) checks for the return value of ipX_output and does not try to send more on error. A netif driver can call tcp_txnow() (from tcpip_thread!) to try to send again if TX buffers are available again.
2015-02-17 08:02:34 +01:00
sg
90db821036
patch #8361 "Add support for NTP option in DHCP" (slighly modified)
2015-02-16 21:23:06 +01:00
Sylvain Rochet
99d1fdd270
snmp: syntax error fix on endif comment
...
*/ omitted on comment, added.
2015-02-14 19:38:35 +01:00
Sylvain Rochet
10ab72855d
opt: fix build without SNMP_COMMUNITY_EXT
...
define value omitted on #define SNMP_COMMUNITY_EXT in opt.h, default is 0
2015-02-14 19:38:29 +01:00
sg
0d18516af8
added support for write-access community and dedicated community for sending traps
2015-02-14 15:44:32 +01:00
sg
e22c815444
patch by Freddie Chopin: SNMP: const-correctness around snmp traps and enterprise
2015-02-14 15:11:44 +01:00
sg
e579e98469
minor coding style fix: tab -> spaces
2015-02-14 15:05:12 +01:00
sg
723eaa1f40
Fixed compiler warning in snmp.h introduced by last patches
2015-02-14 15:04:55 +01:00
Freddie Chopin
4ebeeaf1e0
msg_in.c, msg_in.c: add snmp_get_community() and snmp_set_community() accessors
...
Signed-off-by: Freddie Chopin <freddie.chopin@gmail.com>
2015-02-14 14:49:42 +01:00
Freddie Chopin
2c9ceea3cf
msg_in.c, snmp_msg.h: convert snmp_community to a modifiable pointer
...
Signed-off-by: Freddie Chopin <freddie.chopin@gmail.com>
2015-02-14 14:49:41 +01:00
Freddie Chopin
c289872ab7
msg_in.c, msg_out.c, snmp_msg.h: rename snmp_publiccommunity to snmp_community, update descriptions
...
Signed-off-by: Freddie Chopin <freddie.chopin@gmail.com>
2015-02-14 14:49:39 +01:00