lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] Problem with PPP: No response to PAP authenticate-requests


From: Schmudlach, Guenter
Subject: [lwip-devel] Problem with PPP: No response to PAP authenticate-requests
Date: Thu, 28 Apr 2011 09:03:44 +0200

Hello

 

We use LwIp V1.3.2 and adapted arch.c to a “generic OS API”. Our goal is a PPP connection and the usage of raw/native API (UDP only).

 

We have a problem when connecting PPP with pppOverSerialOpen:

·         At the beginning a perfect PPP dialog starts, but at a certain moment the remote side doesn’t reply anymore (No response to PAP authenticate-requests).

·         When using the same Hardware with Windows, we can establish a PPP connection with RasDial! So, the overall configuration is correct!

·         In the following log you see the PPP_DEBUG statements, mixed with received (rec) and sent (snd) RS232 raw data.

·         After the log you find the “config file” of the LwIp-Stack (lwipopts.h)

 

Somebody has an idea, whats wrong?

G

 

PS: The “Generic OS API” can be realized with uCOS or Window. The current log was created by the Windows implementation.

 

 

Lvl=5 lcp_init: xmit_accm=0 0 0 0

Lvl=5 pppMain: unit 0: Connecting

Lvl=7 pppStartCB: unit 0

Lvl=5 ppp_set_xaccm[0]: outACCM=0 0 0 0

Lvl=5 ppp_send_config[0]: outACCM=FF FF FF FF

Lvl=5 ppp_recv_config[0]: inACCM=0 0 0 0

Lvl=5 lcp_lowerup: asyncmap=0 0 0 0

Lvl=5 LCP: lowerup state 0 (LS_INITIAL) -> 2 (LS_CLOSED)

Lvl=5 auth_reset: 0

Lvl=5 lcp_addci: L opt=2 0

Lvl=5 lcp_addci: L opt=5 52181044

Lvl=5 lcp_addci: opt=7

Lvl=5 lcp_addci: opt=8

Lvl=5 pppWrite[0]: len=47

snd: 7e ff 7d 23 c0 21 7d 21 7d 21 7d 20 7d 34 7d 22 7d 26 7d 20 7d 20 7d 20 7d 20 7d 25 7d 26 52 7d 38 7d 30 44 7d 27 7d 22 7d 28 7d 22 6e e1 7e

Lvl=5 fsm_sdata(LCP): Sent code 1,1,20.

Lvl=5 LCP: sending Configure-Request, id 1

Lvl=5 LCP: open state 2 (LS_CLOSED) -> 6 (LS_REQSENT)

rec: 7e ff 7d 23 c0 21 7d 21 7d 22 7d 20 7d 3c 7d 21 7d 24 7d 26 40 7d 23 7d 24 c0 23 7d 25 7d 26 b1 49 61 30 7d 22 7d 26 7d 20 7d 20 7d 20 7d 20 7d 27 7d 22 7d 28 7d 22 78 75 7e 7e ff 7d 23 c0 21 7d 21 7d 23 7d 20 7d 3c 7d 21 7d 24 7d 26 40 7d 23 7d 24 c0 23 7d 25 7d 26 b1 49 61 30 7d 22 7d 26 7d 20 7d 20 7d 20 7d 20 7d 27 7d 22 7d 28 7d 22 30 27 7e 7e ff 7d 23 c0 21 7d 21 7d 24 7d 20 7d 3c 7d 21 7d 24 7d 26 40 7d 23 7d 24 c0 23 7d 25 7d 26 b1 49 61 30 7d 22 7d 26 7d 20 7d 20 7d 20 7d 20 7d 27 7d 22 7d 28 7d 22 d9 90 7e 7e ff 7d 23 c0 21 7d 21 7d 25 7d 20 7d 3c 7d 21 7d 24 7d 26 40 7d 23 7d 24 c0 23 7d 25 7d 26 b1 49 61 30 7d 22 7d 26 7d 20 7d 20 7d 20 7d 20 7d 27 7d 22 7d 28 7d 22 91 c2 7e

Lvl=7 pppInProc[0]: got 232 bytes

Lvl=5 pppInput[0]: LCP len=28

Lvl=5 fsm_input(LCP):1,2,28

Lvl=5 fsm_rconfreq(LCP): Rcvd id 2 state=6 (LS_REQSENT)

Lvl=5 lcp_reqci: rcvd MRU 1600 PAP (C023) MAGICNUMBER (B1496130) ASYNCMAP=0

Lvl=5 lcp_reqci:  PCOMPRESSION ACCOMPRESSION

Lvl=5 lcp_reqci: returning CONFACK.

Lvl=5 pppWrite[0]: len=58

snd: 7e ff 7d 23 c0 21 7d 22 7d 22 7d 20 7d 3c 7d 21 7d 24 7d 26 40 7d 23 7d 24 c0 23 7d 25 7d 26 b1 49 61 30 7d 22 7d 26 7d 20 7d 20 7d 20 7d 20 7d 27 7d 22 7d 28 7d 22 4b 2f 7e

Lvl=5 fsm_sdata(LCP): Sent code 2,2,28.

Lvl=5 pppInput[0]: LCP len=28

Lvl=5 fsm_input(LCP):1,3,28

Lvl=5 fsm_rconfreq(LCP): Rcvd id 3 state=8 (LS_ACKSENT)

Lvl=5 lcp_reqci: rcvd MRU 1600 PAP (C023) MAGICNUMBER (B1496130) ASYNCMAP=0

Lvl=5 lcp_reqci:  PCOMPRESSION ACCOMPRESSION

Lvl=5 lcp_reqci: returning CONFACK.

Lvl=5 pppWrite[0]: len=60

rec: 7e ff 7d 23 c0 21 7d 22 7d 21 7d 20 7d 34 7d 22 7d 26 7d 20 7d 20 7d 20 7d 20 7d 25 7d 26 52 7d 38 7d 30 44 7d 27 7d 22 7d 28 7d 22 85 88 7e 7e ff 7d 23 c0 21 7d 21 7d 26 7d 20 7d 3c 7d 21 7d 24 7d 26 40 7d 23 7d 24 c0 23 7d 25 7d 26 b1 49 61 30 7d 22 7d 26 7d 20 7d 20 7d 20 7d 20 7d 27 7d 22 7d 28 7d 22 49 34 7e

Lvl=7 pppInProc[0]: got 105 bytes

snd: 7e ff 7d 23 c0 21 7d 22 7d 23 7d 20 7d 3c 7d 21 7d 24 7d 26 40 7d 23 7d 24 c0 23 7d 25 7d 26 b1 49 61 30 7d 22 7d 26 7d 20 7d 20 7d 20 7d 20 7d 27 7d 22 7d 28 7d 22 7d 23 7d 5d 7e

Lvl=5 fsm_sdata(LCP): Sent code 2,3,28.

Lvl=5 pppInput[0]: LCP len=28

Lvl=5 fsm_input(LCP):1,4,28

Lvl=5 fsm_rconfreq(LCP): Rcvd id 4 state=8 (LS_ACKSENT)

Lvl=5 lcp_reqci: rcvd MRU 1600 PAP (C023) MAGICNUMBER (B1496130) ASYNCMAP=0

Lvl=5 lcp_reqci:  PCOMPRESSION ACCOMPRESSION

Lvl=5 lcp_reqci: returning CONFACK.

Lvl=5 pppWrite[0]: len=57

rec: 7e ff 7d 23 c0 21 7d 21 7d 27 7d 20 7d 3c 7d 21 7d 24 7d 26 40 7d 23 7d 24 c0 23 7d 25 7d 26 b1 49 61 30 7d 22 7d 26 7d 20 7d 20 7d 20 7d 20 7d 27 7d 22 7d 28 7d 22 7d 21 66 7e

Lvl=7 pppInProc[0]: got 59 bytes

snd: ff 7d 23 c0 21 7d 22 7d 24 7d 20 7d 3c 7d 21 7d 24 7d 26 40 7d 23 7d 24 c0 23 7d 25 7d 26 b1 49 61 30 7d 22 7d 26 7d 20 7d 20 7d 20 7d 20 7d 27 7d 22 7d 28 7d 22 ea ca 7e

Lvl=5 fsm_sdata(LCP): Sent code 2,4,28.

Lvl=5 pppInput[0]: LCP len=28

Lvl=5 fsm_input(LCP):1,5,28

Lvl=5 fsm_rconfreq(LCP): Rcvd id 5 state=8 (LS_ACKSENT)

Lvl=5 lcp_reqci: rcvd MRU 1600 PAP (C023) MAGICNUMBER (B1496130) ASYNCMAP=0

Lvl=5 lcp_reqci:  PCOMPRESSION ACCOMPRESSION

Lvl=5 lcp_reqci: returning CONFACK.

Lvl=5 pppWrite[0]: len=58

rec: 7e ff 7d 23 c0 21 7d 21 7d 28 7d 20 7d 3c 7d 21 7d 24 7d 26 40 7d 23 7d 24 c0 23 7d 25 7d 26 b1 49 61 30 7d 22 7d 26 7d 20 7d 20 7d 20 7d 20 7d 27 7d 22 7d 28 7d 22 8a 53 7e

Lvl=7 pppInProc[0]: got 58 bytes

snd: 7e ff 7d 23 c0 21 7d 22 7d 25 7d 20 7d 3c 7d 21 7d 24 7d 26 40 7d 23 7d 24 c0 23 7d 25 7d 26 b1 49 61 30 7d 22 7d 26 7d 20 7d 20 7d 20 7d 20 7d 27 7d 22 7d 28 7d 22 a2 98 7e

Lvl=5 fsm_sdata(LCP): Sent code 2,5,28.

Lvl=5 pppInput[0]: LCP len=20

Lvl=5 fsm_input(LCP):2,1,20

Lvl=5 fsm_rconfack(LCP): Rcvd id 1 state=8 (LS_ACKSENT)

Lvl=5 lcp_acki: Ack

Lvl=5 ppp_send_config[0]: outACCM=0 0 0 0

Lvl=5 ppp_recv_config[0]: inACCM=0 0 0 0

Lvl=5 link_established: 0

Lvl=5 upap_lowerup: 0 s=0

Lvl=5 IPCP: lowerup state 0 (LS_INITIAL) -> 2 (LS_CLOSED)

Lvl=5 upap_authwithpeer: 0 user=none password=none s=1

Lvl=5 pppWrite[0]: len=22

snd: 7e ff 03 c0 23 01 01 00 0e 04 6e 6f 6e 65 04 6e 6f 6e 65 de 60 7e

Lvl=5 pap_sauth: Sent id 1

rec: 7e ff 7d 23 c0 21 7d 21 7d 29 7d 20 7d 3c 7d 21 7d 24 7d 26 40 7d 23 7d 24 c0 23 7d 25 7d 26 b1 49 61 30 7d 22 7d 26 7d 20 7d 20 7d 20 7d 20 7d 27 7d 22 7d 28 7d 22 c2 7d 21 7e

Lvl=5 pppInput[0]: LCP len=28

Lvl=7 pppInProc[0]: got 59 bytes

Lvl=5 fsm_input(LCP):1,6,28

Lvl=5 fsm_rconfreq(LCP): Rcvd id 6 state=9 (LS_OPENED)

Lvl=5 link_down: 0

Lvl=5 upap_lowerdown: 0 s=3

Lvl=5 IPCP: lowerdown state 2 (LS_CLOSED) -> 0 (LS_INITIAL)

Lvl=5 IPCP: close reason=LCP down state 0 (LS_INITIAL) -> 0 (LS_INITIAL)

Lvl=7 pppLinkDown: unit 0

Lvl=7 pppMainWakeup: unit 0

Lvl=5 ppp_send_config[0]: outACCM=FF FF FF FF

Lvl=5 ppp_recv_config[0]: inACCM=0 0 0 0

Lvl=5 auth_reset: 0

Lvl=5 lcp_addci: L opt=2 0

Lvl=5 lcp_addci: L opt=5 C483476D

Lvl=5 lcp_addci: opt=7

Lvl=5 lcp_addci: opt=8

Lvl=5 pppWrite[0]: len=45

rec: 7e ff 7d 23 c0 21 7d 21 7d 2a 7d 20 7d 3c 7d 21 7d 24 7d 26 40 7d 23 7d 24 c0 23 7d 25 7d 26 b1 49 61 30 7d 22 7d 26 7d 20 7d 20 7d 20 7d 20 7d 27 7d 22 7d 28 7d 22 7d 3a f7 7e

Lvl=7 pppInProc[0]: got 59 bytes

snd: 7e ff 7d 23 c0 21 7d 21 7d 22 7d 20 7d 34 7d 22 7d 26 7d 20 7d 20 7d 20 7d 20 7d 25 7d 26 c4 83 47 6d 7d 27 7d 22 7d 28 7d 22 9c f9 7e

Lvl=5 fsm_sdata(LCP): Sent code 1,2,20.

Lvl=5 LCP: sending Configure-Request, id 2

Lvl=5 lcp_reqci: rcvd MRU 1600 PAP (C023) MAGICNUMBER (B1496130) ASYNCMAP=0

Lvl=5 lcp_reqci:  PCOMPRESSION ACCOMPRESSION

Lvl=5 lcp_reqci: returning CONFACK.

Lvl=5 pppWrite[0]: len=58

rec: 7e ff 7d 23 c0 21 7d 22 7d 22 7d 20 7d 34 7d 22 7d 26 7d 20 7d 20 7d 20 7d 20 7d 25 7d 26 c4 83 47 6d 7d 27 7d 22 7d 28 7d 22 77 90 7e 0d 0a 4e 4f 20 43 41 52 52 49 45 52 0d 0a

Lvl=7 pppInProc[0]: got 59 bytes

snd: 7e ff 7d 23 c0 21 7d 22 7d 26 7d 20 7d 3c 7d 21 7d 24 7d 26 40 7d 23 7d 24 c0 23 7d 25 7d 26 b1 49 61 30 7d 22 7d 26 7d 20 7d 20 7d 20 7d 20 7d 27 7d 22 7d 28 7d 22 7a 6e 7e

Lvl=5 fsm_sdata(LCP): Sent code 2,6,28.

Lvl=5 pppInput[0]: LCP len=28

Lvl=5 fsm_input(LCP):1,7,28

Lvl=5 fsm_rconfreq(LCP): Rcvd id 7 state=8 (LS_ACKSENT)

Lvl=5 lcp_reqci: rcvd MRU 1600 PAP (C023) MAGICNUMBER (B1496130) ASYNCMAP=0

Lvl=5 lcp_reqci:  PCOMPRESSION ACCOMPRESSION

Lvl=5 lcp_reqci: returning CONFACK.

Lvl=5 pppWrite[0]: len=58

snd: 7e ff 7d 23 c0 21 7d 22 7d 27 7d 20 7d 3c 7d 21 7d 24 7d 26 40 7d 23 7d 24 c0 23 7d 25 7d 26 b1 49 61 30 7d 22 7d 26 7d 20 7d 20 7d 20 7d 20 7d 27 7d 22 7d 28 7d 22 32 3c 7e

Lvl=5 fsm_sdata(LCP): Sent code 2,7,28.

Lvl=5 pppInput[0]: LCP len=28

Lvl=5 fsm_input(LCP):1,8,28

Lvl=5 fsm_rconfreq(LCP): Rcvd id 8 state=8 (LS_ACKSENT)

Lvl=5 lcp_reqci: rcvd MRU 1600 PAP (C023) MAGICNUMBER (B1496130) ASYNCMAP=0

Lvl=5 lcp_reqci:  PCOMPRESSION ACCOMPRESSION

Lvl=5 lcp_reqci: returning CONFACK.

Lvl=5 pppWrite[0]: len=59

snd: 7e ff 7d 23 c0 21 7d 22 7d 28 7d 20 7d 3c 7d 21 7d 24 7d 26 40 7d 23 7d 24 c0 23 7d 25 7d 26 b1 49 61 30 7d 22 7d 26 7d 20 7d 20 7d 20 7d 20 7d 27 7d 22 7d 28 7d 22 b9 7d 29 7e

Lvl=5 fsm_sdata(LCP): Sent code 2,8,28.

Lvl=5 pppInput[0]: LCP len=28

Lvl=5 fsm_input(LCP):1,9,28

Lvl=5 fsm_rconfreq(LCP): Rcvd id 9 state=8 (LS_ACKSENT)

Lvl=5 lcp_reqci: rcvd MRU 1600 PAP (C023) MAGICNUMBER (B1496130) ASYNCMAP=0

Lvl=5 lcp_reqci:  PCOMPRESSION ACCOMPRESSION

Lvl=5 lcp_reqci: returning CONFACK.

Lvl=5 pppWrite[0]: len=57

snd: ff 7d 23 c0 21 7d 22 7d 29 7d 20 7d 3c 7d 21 7d 24 7d 26 40 7d 23 7d 24 c0 23 7d 25 7d 26 b1 49 61 30 7d 22 7d 26 7d 20 7d 20 7d 20 7d 20 7d 27 7d 22 7d 28 7d 22 f1 5b 7e

Lvl=5 fsm_sdata(LCP): Sent code 2,9,28.

Lvl=5 pppInput[0]: LCP len=28

Lvl=5 fsm_input(LCP):1,10,28

Lvl=5 fsm_rconfreq(LCP): Rcvd id 10 state=8 (LS_ACKSENT)

Lvl=5 lcp_reqci: rcvd MRU 1600 PAP (C023) MAGICNUMBER (B1496130) ASYNCMAP=0

Lvl=5 lcp_reqci:  PCOMPRESSION ACCOMPRESSION

Lvl=5 lcp_reqci: returning CONFACK.

Lvl=5 pppWrite[0]: len=58

snd: 7e ff 7d 23 c0 21 7d 22 7d 2a 7d 20 7d 3c 7d 21 7d 24 7d 26 40 7d 23 7d 24 c0 23 7d 25 7d 26 b1 49 61 30 7d 22 7d 26 7d 20 7d 20 7d 20 7d 20 7d 27 7d 22 7d 28 7d 22 29 ad 7e

Lvl=5 fsm_sdata(LCP): Sent code 2,10,28.

Lvl=5 pppInput[0]: LCP len=20

Lvl=5 fsm_input(LCP):2,2,20

Lvl=5 fsm_rconfack(LCP): Rcvd id 2 state=8 (LS_ACKSENT)

Lvl=5 lcp_acki: Ack

Lvl=5 ppp_send_config[0]: outACCM=0 0 0 0

Lvl=5 ppp_recv_config[0]: inACCM=0 0 0 0

Lvl=5 link_established: 0

Lvl=5 upap_lowerup: 0 s=0

Lvl=5 IPCP: lowerup state 0 (LS_INITIAL) -> 2 (LS_CLOSED)

Lvl=5 upap_authwithpeer: 0 user=none password=none s=1

Lvl=5 pppWrite[0]: len=21

snd: ff 03 c0 23 01 02 00 0e 04 6e 6f 6e 65 04 6e 6f 6e 65 29 6e 7e

Lvl=5 pap_sauth: Sent id 2

Lvl=5 upap_timeout: 0 timeout 6 expired s=3

Lvl=5 pppWrite[0]: len=22

snd: 7e ff 03 c0 23 01 03 00 0e 04 6e 6f 6e 65 04 6e 6f 6e 65 84 6b 7e

Lvl=5 pap_sauth: Sent id 3

Lvl=5 upap_timeout: 0 timeout 6 expired s=3

Lvl=5 pppWrite[0]: len=22

snd: 7e ff 03 c0 23 01 04 00 0e 04 6e 6f 6e 65 04 6e 6f 6e 65 c7 73 7e

Lvl=5 pap_sauth: Sent id 4

Lvl=5 upap_timeout: 0 timeout 6 expired s=3

Lvl=5 pppWrite[0]: len=22

snd: 7e ff 03 c0 23 01 05 00 0e 04 6e 6f 6e 65 04 6e 6f 6e 65 6a 76 7e

Lvl=5 pap_sauth: Sent id 5

Lvl=5 upap_timeout: 0 timeout 6 expired s=3

Lvl=5 pppWrite[0]: len=22

snd: 7e ff 03 c0 23 01 06 00 0e 04 6e 6f 6e 65 04 6e 6f 6e 65 9d 78 7e

Lvl=5 pap_sauth: Sent id 6

Lvl=5 upap_timeout: 0 timeout 6 expired s=3

Lvl=5 pppWrite[0]: len=23

snd: 7e ff 03 c0 23 01 07 00 0e 04 6e 6f 6e 65 04 6e 6f 6e 65 30 7d 5d 7e

Lvl=5 pap_sauth: Sent id 7

Lvl=5 upap_timeout: 0 timeout 6 expired s=3

Lvl=5 pppWrite[0]: len=22

snd: 7e ff 03 c0 23 01 08 00 0e 04 6e 6f 6e 65 04 6e 6f 6e 65 1b 48 7e

Lvl=5 pap_sauth: Sent id 8

The thread 'Win32 Thread' (0x39c) has exited with code 0 (0x0).

Lvl=5 upap_timeout: 0 timeout 6 expired s=3

Lvl=5 pppWrite[0]: len=22

snd: 7e ff 03 c0 23 01 09 00 0e 04 6e 6f 6e 65 04 6e 6f 6e 65 b6 4d 7e

Lvl=5 pap_sauth: Sent id 9

Lvl=5 upap_timeout: 0 timeout 6 expired s=3

Lvl=5 pppWrite[0]: len=22

snd: 7e ff 03 c0 23 01 0a 00 0e 04 6e 6f 6e 65 04 6e 6f 6e 65 41 43 7e

Lvl=5 pap_sauth: Sent id 10

Lvl=5 upap_timeout: 0 timeout 6 expired s=3

Lvl=5 pppWrite[0]: len=22

snd: 7e ff 03 c0 23 01 0b 00 0e 04 6e 6f 6e 65 04 6e 6f 6e 65 ec 46 7e

Lvl=5 pap_sauth: Sent id 11

Lvl=5 upap_timeout: 0 timeout 6 expired s=3

Lvl=1 No response to PAP authenticate-requests

Lvl=5 auth_withpeer_fail: 0 proto=C023

 

 

 

/**

  ******************************************************************************

  * @file    lwipopts.h

  * @author  MCD Application Team

  * @version V1.0.0

  * @date    11/20/2009

  * @brief   lwIP Options Configuration.

  *          This file is based on Utilities\lwip-1.3.1\src\include\lwip\opt.h

  *          and contains the lwIP configuration for the STM32F107 demonstration.

  ******************************************************************************

  * @copy

  *

  * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS

  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE

  * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY

  * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING

  * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE

  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

  *

  * <h2><center>&copy; COPYRIGHT 2009 STMicroelectronics</center></h2>

  */

 

#ifndef __LWIPOPTS_H__

#define __LWIPOPTS_H__

 

/**

* SYS_LIGHTWEIGHT_PROT==1: if you want inter-task protection for certain

* critical regions during buffer allocation, deallocation and memory

* allocation and deallocation.

*/

#define SYS_LIGHTWEIGHT_PROT    0

 

/**

* NO_SYS==1: Provides VERY minimal functionality. Otherwise,

* use lwIP facilities.

*/

//MSch #define NO_SYS                  1

#define NO_SYS                  0

 

/* ---------- Memory options ---------- */

/* MEM_ALIGNMENT: should be set to the alignment of the CPU for which

   lwIP is compiled. 4 byte alignment -> define MEM_ALIGNMENT to 4, 2

   byte alignment -> define MEM_ALIGNMENT to 2. */

#define MEM_ALIGNMENT           4

 

/* MEM_SIZE: the size of the heap memory. If the application will send

a lot of data that needs to be copied, this should be set high. */

//MSch #define MEM_SIZE                (20*1024)

#define MEM_SIZE                (4*1024)

 

/* MEMP_NUM_PBUF: the number of memp struct pbufs. If the application

   sends a lot of data out of ROM (or other static memory), this

   should be set high. */

#define MEMP_NUM_PBUF           10

/* MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One

   per active UDP "connection". */

//MSch #define MEMP_NUM_UDP_PCB        6

#define MEMP_NUM_UDP_PCB        4

/* MEMP_NUM_TCP_PCB: the number of simulatenously active TCP

   connections. */

//MSch #define MEMP_NUM_TCP_PCB        10

#define MEMP_NUM_TCP_PCB        1

/* MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP

   connections. */

//MSch #define MEMP_NUM_TCP_PCB_LISTEN 6

#define MEMP_NUM_TCP_PCB_LISTEN 0

/* MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP

   segments. */

//MSch #define MEMP_NUM_TCP_SEG        12

#define MEMP_NUM_TCP_SEG        1

 

/* MEMP_NUM_SYS_TIMEOUT: the number of simulateously active

   timeouts. */

//MSch #define MEMP_NUM_SYS_TIMEOUT    3

#define MEMP_NUM_SYS_TIMEOUT    6

 

/* ---------- Pbuf options ---------- */

/* PBUF_POOL_SIZE: the number of buffers in the pbuf pool. */

//MSch #define PBUF_POOL_SIZE          10

//Smug 4->10

#define PBUF_POOL_SIZE          10

 

/* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. */

#define PBUF_POOL_BUFSIZE       1500

 

 

/* ---------- TCP options ---------- */

//MSch #define LWIP_TCP                1

#define LWIP_TCP                0

#define TCP_TTL                 255

 

/* Controls if TCP should queue segments that arrive out of

   order. Define to 0 if your device is low on memory. */

#define TCP_QUEUE_OOSEQ         0

 

/* TCP Maximum segment size. */

#define TCP_MSS                 (1500 - 40)      /* TCP_MSS = (Ethernet MTU - IP header size - TCP header size) */

 

/* TCP sender buffer space (bytes). */

#define TCP_SND_BUF             (2*TCP_MSS)

 

/* TCP sender buffer space (pbufs). This must be at least = 2 *

   TCP_SND_BUF/TCP_MSS for things to work. */

#define TCP_SND_QUEUELEN        (6 * TCP_SND_BUF)/TCP_MSS

 

/* TCP receive window. */

#define TCP_WND                 (2*TCP_MSS)

 

 

/* ---------- ICMP options ---------- */

#define LWIP_ICMP                       1

 

 

/* ---------- DHCP options ---------- */

/* Define LWIP_DHCP to 1 if you want DHCP configuration of

   interfaces. DHCP is not implemented in lwIP 0.5.1, however, so

   turning this on does currently not work. */

#define LWIP_DHCP               1

 

 

/* ---------- UDP options ---------- */

#define LWIP_UDP                1

#define UDP_TTL                 255

 

 

/* ---------- Statistics options ---------- */

//MSch #define LWIP_STATS 0

#define LWIP_STATS              1

#define LWIP_STATS_DISPLAY      1

 

//MSch #define LWIP_PROVIDE_ERRNO 1

#undef LWIP_PROVIDE_ERRNO

 

 

/*

   --------------------------------------

   ---------- Checksum options ----------

   --------------------------------------

*/

 

/*

The STM32F107 allows computing and verifying the IP, UDP, TCP and ICMP checksums by hardware:

- To use this feature let the following define uncommented.

- To disable it and process by CPU comment the  the checksum.

*/

//MSch #define CHECKSUM_BY_HARDWARE

 

 

#ifdef CHECKSUM_BY_HARDWARE

  /* CHECKSUM_GEN_IP==0: Generate checksums by hardware for outgoing IP packets.*/

  #define CHECKSUM_GEN_IP                 0

  /* CHECKSUM_GEN_UDP==0: Generate checksums by hardware for outgoing UDP packets.*/

  #define CHECKSUM_GEN_UDP                0

  /* CHECKSUM_GEN_TCP==0: Generate checksums by hardware for outgoing TCP packets.*/

  #define CHECKSUM_GEN_TCP                0

  /* CHECKSUM_CHECK_IP==0: Check checksums by hardware for incoming IP packets.*/

  #define CHECKSUM_CHECK_IP               0

  /* CHECKSUM_CHECK_UDP==0: Check checksums by hardware for incoming UDP packets.*/

  #define CHECKSUM_CHECK_UDP              0

  /* CHECKSUM_CHECK_TCP==0: Check checksums by hardware for incoming TCP packets.*/

  #define CHECKSUM_CHECK_TCP              0

#else

  /* CHECKSUM_GEN_IP==1: Generate checksums in software for outgoing IP packets.*/

  #define CHECKSUM_GEN_IP                 1

  /* CHECKSUM_GEN_UDP==1: Generate checksums in software for outgoing UDP packets.*/

  #define CHECKSUM_GEN_UDP                1

  /* CHECKSUM_GEN_TCP==1: Generate checksums in software for outgoing TCP packets.*/

  #define CHECKSUM_GEN_TCP                1

  /* CHECKSUM_CHECK_IP==1: Check checksums in software for incoming IP packets.*/

  #define CHECKSUM_CHECK_IP               1

  /* CHECKSUM_CHECK_UDP==1: Check checksums in software for incoming UDP packets.*/

  #define CHECKSUM_CHECK_UDP              1

  /* CHECKSUM_CHECK_TCP==1: Check checksums in software for incoming TCP packets.*/

  #define CHECKSUM_CHECK_TCP              1

#endif

 

 

/*

   ----------------------------------------------

   ---------- Sequential layer options ----------

   ----------------------------------------------

*/

/**

* LWIP_NETCONN==1: Enable Netconn API (require to use api_lib.c)

*/

//MSch #define LWIP_NETCONN                    0

#define LWIP_NETCONN                    1

 

/*

   ------------------------------------

   ---------- Socket options ----------

   ------------------------------------

*/

/**

* LWIP_SOCKET==1: Enable Socket API (require to use sockets.c)

*/

#define LWIP_SOCKET                     0

 

//MSch

#define PPP_SUPPORT                     1

#define MD5_SUPPORT                     1

#define PAP_SUPPORT                     1

#define CHAP_SUPPORT                    0

#define PPP_SUPPORT                     1

#define LWIP_DEBUG                      1

#define LWIP_DNS                        0

#define LWIP_DBG_MIN_LEVEL              LWIP_DBG_LEVEL_ALL

 

/*

   ---------------------------------------

   ---------- Debugging options ----------

   ---------------------------------------

*/

 

#define LWIP_DBG_MIN_LEVEL              LWIP_DBG_LEVEL_ALL

 

#define LWIP_DBG_TYPES_ON               LWIP_DBG_ON

 

#define ETHARP_DEBUG                    LWIP_DBG_OFF

 

#define NETIF_DEBUG                     LWIP_DBG_OFF

 

#define PBUF_DEBUG                      LWIP_DBG_OFF

 

#define API_LIB_DEBUG                   LWIP_DBG_OFF

 

#define API_MSG_DEBUG                   LWIP_DBG_OFF

 

#define SOCKETS_DEBUG                   LWIP_DBG_OFF

 

#define ICMP_DEBUG                      LWIP_DBG_OFF

 

#define IGMP_DEBUG                      LWIP_DBG_OFF

 

#define INET_DEBUG                      LWIP_DBG_OFF

 

#define IP_DEBUG                        LWIP_DBG_OFF

 

#define IP_REASS_DEBUG                  LWIP_DBG_OFF

 

#define RAW_DEBUG                       LWIP_DBG_OFF

 

#define MEM_DEBUG                       LWIP_DBG_OFF

 

#define MEMP_DEBUG                      LWIP_DBG_OFF

 

#define SYS_DEBUG                       LWIP_DBG_OFF

 

#define TCP_DEBUG                       LWIP_DBG_OFF

 

#define TCP_INPUT_DEBUG                 LWIP_DBG_OFF

 

#define TCP_FR_DEBUG                    LWIP_DBG_OFF

 

#define TCP_RTO_DEBUG                   LWIP_DBG_OFF

 

#define TCP_CWND_DEBUG                  LWIP_DBG_OFF

 

#define TCP_WND_DEBUG                   LWIP_DBG_OFF

 

#define TCP_OUTPUT_DEBUG                LWIP_DBG_OFF

 

#define TCP_RST_DEBUG                   LWIP_DBG_OFF

 

#define TCP_QLEN_DEBUG                  LWIP_DBG_OFF

 

#define UDP_DEBUG                       LWIP_DBG_OFF

 

#define TCPIP_DEBUG                     LWIP_DBG_OFF

 

#define PPP_DEBUG                       LWIP_DBG_ON

 

#define SLIP_DEBUG                      LWIP_DBG_OFF

 

#define DHCP_DEBUG                      LWIP_DBG_OFF

 

#define AUTOIP_DEBUG                    LWIP_DBG_OFF

 

#define SNMP_MSG_DEBUG                  LWIP_DBG_OFF

 

#define SNMP_MIB_DEBUG                  LWIP_DBG_OFF

 

#define DNS_DEBUG                       LWIP_DBG_OFF

 

 

void my_printf(const char *fmt, ...);

#define LWIP_PLATFORM_DIAG(m) do {my_printf m;} while(0)

 

#endif /* __LWIPOPTS_H__ */

 

/******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/

 

 

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]