Compare commits
253 Commits
STABLE-2_2
...
cd28bebff9
| Author | SHA1 | Date | |
|---|---|---|---|
| cd28bebff9 | |||
| 8eafba6ea6 | |||
| 88f27e011f | |||
| a8aa758153 | |||
| dfc2efe117 | |||
| 5555bd8896 | |||
|
|
4599f551de | ||
|
|
41a36098b3 | ||
|
|
e7ab7e0773 | ||
|
|
b1edb7780f | ||
|
|
56b29f8bcf | ||
|
|
92522e4538 | ||
|
|
571c46253f | ||
|
|
ca0395c5ae | ||
|
|
31d8988f89 | ||
|
|
f877b457a1 | ||
|
|
6c8874bf5d | ||
|
|
8459488006 | ||
|
|
ffce5ab1c7 | ||
|
|
e55896319b | ||
|
|
ba306bcdaa | ||
|
|
554e104095 | ||
|
|
77dcd25a72 | ||
|
|
b6c6098964 | ||
|
|
fbd597e450 | ||
|
|
5ee5801c2c | ||
|
|
f05e20101e | ||
|
|
52bb3eedd7 | ||
|
|
c06cc7655d | ||
|
|
3cae475d63 | ||
|
|
41b8f785c3 | ||
|
|
5d1b34f581 | ||
|
|
c24678acd2 | ||
|
|
80cfb002f9 | ||
|
|
48da4a28eb | ||
|
|
9c322c1668 | ||
|
|
f50831d05f | ||
|
|
c4051524aa | ||
|
|
6910b1fb50 | ||
|
|
492a2f2dec | ||
|
|
73fcf72792 | ||
|
|
4f9484f5ab | ||
|
|
86c9f79991 | ||
|
|
8e1a247c1f | ||
|
|
1cc1536e6a | ||
|
|
d0efd9ef7b | ||
|
|
e799c266fa | ||
|
|
cb511019b0 | ||
|
|
9004e7bd77 | ||
|
|
17b1f5d382 | ||
|
|
10dc9b7eb3 | ||
|
|
c3d6fe9d72 | ||
|
|
93821fc437 | ||
|
|
7c494b3829 | ||
|
|
e1b8080346 | ||
|
|
347054b329 | ||
|
|
c167a54540 | ||
|
|
25de99d1c1 | ||
|
|
09d929f7ff | ||
|
|
83abc8714c | ||
|
|
09188668c7 | ||
|
|
b413b04093 | ||
|
|
ee1523630a | ||
|
|
5e3268cf3e | ||
|
|
8c1190143c | ||
|
|
5e45328bb5 | ||
|
|
b6b20613ce | ||
|
|
e7abb85d63 | ||
|
|
3c06267d8e | ||
|
|
0ab52ff447 | ||
|
|
20c9b117e1 | ||
|
|
34516d5c2e | ||
|
|
670a2f0827 | ||
|
|
1eeb70fbfa | ||
|
|
b9ca1deba8 | ||
|
|
efe78e7e5b | ||
|
|
6864eb1749 | ||
|
|
35cbad52cc | ||
|
|
574bd6e5aa | ||
|
|
de0b97861a | ||
|
|
f5e7e8e576 | ||
|
|
4f88651247 | ||
|
|
e01c9a9504 | ||
|
|
90a440eafd | ||
|
|
583f352f60 | ||
|
|
7fd1350802 | ||
|
|
c8d9adde0f | ||
|
|
e655b41a49 | ||
|
|
2e650364fa | ||
|
|
ab1f582043 | ||
|
|
b5f6720f88 | ||
|
|
5ec4c1d1f2 | ||
|
|
9e2fb2806f | ||
|
|
4323e95dce | ||
|
|
66ef250b8c | ||
|
|
c8f42025ce | ||
|
|
16e8ef3145 | ||
|
|
76c7ac5cf9 | ||
|
|
98e63b6acf | ||
|
|
20f6ac7426 | ||
|
|
0627c55c51 | ||
|
|
732d3411bf | ||
|
|
9509acd876 | ||
|
|
5fea01a0a8 | ||
|
|
f85ed72bac | ||
|
|
1ef6189287 | ||
|
|
ae5a5b99eb | ||
|
|
de6b0a35f8 | ||
|
|
dad8c4c72a | ||
|
|
14444c1c7f | ||
|
|
2d6883c432 | ||
|
|
0d5db9469e | ||
|
|
339372919a | ||
|
|
6f700a157d | ||
|
|
2159f84682 | ||
|
|
7807f706f3 | ||
|
|
4f78da983f | ||
|
|
d8b97bfc5d | ||
|
|
f7fe057821 | ||
|
|
3792075baf | ||
|
|
4e6dd9c576 | ||
|
|
36cb95c4d2 | ||
|
|
0a0452b2c3 | ||
|
|
c0cf130bb7 | ||
|
|
3eeda139bc | ||
|
|
b92faffaaa | ||
|
|
4ee4d34758 | ||
|
|
57a7df125b | ||
|
|
33191e0a13 | ||
|
|
8e1df05d86 | ||
|
|
e365bc3653 | ||
|
|
369fee9353 | ||
|
|
898a3a5f07 | ||
|
|
c195d2acdf | ||
|
|
6ca936f6b5 | ||
|
|
e7b74570d9 | ||
|
|
018c64ab94 | ||
|
|
7e92fb3d7f | ||
|
|
051fbea5e6 | ||
|
|
214e2d90f3 | ||
|
|
4022a19cbc | ||
|
|
a32ea1e793 | ||
|
|
f67f2692d4 | ||
|
|
3b745f7154 | ||
|
|
d876d3c4df | ||
|
|
e8b0c52806 | ||
|
|
5bd7518343 | ||
|
|
51265f3f7d | ||
|
|
2e4932f23b | ||
|
|
dbd0bc8a2c | ||
|
|
e5627ec649 | ||
|
|
5c8fd3158d | ||
|
|
d5843944cc | ||
|
|
f62be85576 | ||
|
|
f1bd63046e | ||
|
|
ed6c951a19 | ||
|
|
ad9e7a6d87 | ||
|
|
6f7b26b1a8 | ||
|
|
ecd6009a5e | ||
|
|
6ffe30d9ba | ||
|
|
8f5a0aaacb | ||
|
|
ba3b04e7fe | ||
|
|
379d55044e | ||
|
|
843a116155 | ||
|
|
1c6202c414 | ||
|
|
066a2b022d | ||
|
|
aca41b0beb | ||
|
|
b5e8ab6c15 | ||
|
|
896c8a9f72 | ||
|
|
59ecea3d8c | ||
|
|
b1f8ce8769 | ||
|
|
8c43d83689 | ||
|
|
87d44bbfcd | ||
|
|
07d3b3330d | ||
|
|
61349cf124 | ||
|
|
7316b26740 | ||
|
|
d4b3a006dc | ||
|
|
2f8886794f | ||
|
|
02ab8c91a9 | ||
|
|
74ea1e43ca | ||
|
|
e9000658fb | ||
|
|
d58e0f1a1a | ||
|
|
674c4ed080 | ||
|
|
a68d6f1a9a | ||
|
|
c0643e21ed | ||
|
|
3fbb84f950 | ||
|
|
053f5aa10d | ||
|
|
6b9264b49e | ||
|
|
e60f9bb24f | ||
|
|
1bb6e7f52d | ||
|
|
108ca1521e | ||
|
|
ea2bb9cd5b | ||
|
|
e6d05db86f | ||
|
|
d1f920a7d1 | ||
|
|
fee64d7515 | ||
|
|
aad77fcacb | ||
|
|
bebf072b77 | ||
|
|
7f53f7ced4 | ||
|
|
91a4d59eb4 | ||
|
|
1bd34ea364 | ||
|
|
a9a215c52e | ||
|
|
5cea646b12 | ||
|
|
ff14bbb3c1 | ||
|
|
89be04ce7a | ||
|
|
4b3c59e4cc | ||
|
|
beeb300c18 | ||
|
|
79732693f3 | ||
|
|
ef3d12c60e | ||
|
|
608a2f9741 | ||
|
|
174cc87227 | ||
|
|
0d6d8922f2 | ||
|
|
67350e3c01 | ||
|
|
1a6455bc25 | ||
|
|
e1528e084d | ||
|
|
1892f445e2 | ||
|
|
484f0fbafa | ||
|
|
5378fd84df | ||
|
|
9d8b8d9c69 | ||
|
|
cd91647999 | ||
|
|
5cc46d7989 | ||
|
|
fe4395336a | ||
|
|
9d97a467ca | ||
|
|
039056370d | ||
|
|
159e31b689 | ||
|
|
17c60d2728 | ||
|
|
52e75369c1 | ||
|
|
66706f469d | ||
|
|
98d1cb1c00 | ||
|
|
1940cae827 | ||
|
|
d184463e2a | ||
|
|
3b53b6e481 | ||
|
|
78ee1ee2cf | ||
|
|
422623a87b | ||
|
|
4aa6df7633 | ||
|
|
2d2336014c | ||
|
|
def427bcaf | ||
|
|
ba3a39957d | ||
|
|
f58324b576 | ||
|
|
205cd7c1f6 | ||
|
|
398333da9a | ||
|
|
e678219bdf | ||
|
|
830217ac78 | ||
|
|
e4db22d9f5 | ||
|
|
c8e9772cd0 | ||
|
|
437b11f869 | ||
|
|
b7bee87fb5 | ||
|
|
2f3ef94ad4 | ||
|
|
7154e51ff2 | ||
|
|
db46863f75 | ||
|
|
ebb0dc14a7 | ||
|
|
368128a647 | ||
|
|
bc25863d1b | ||
|
|
130f947037 |
4
.github/workflows/ci-linux.yml
vendored
4
.github/workflows/ci-linux.yml
vendored
@@ -3,6 +3,8 @@ name: CI
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
branches: '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -15,7 +17,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install deps
|
||||
run: sudo apt-get install check ninja-build doxygen
|
||||
|
||||
|
||||
6
.github/workflows/codeql-buildscript.sh
vendored
Normal file
6
.github/workflows/codeql-buildscript.sh
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
sudo apt-get install check ninja-build doxygen
|
||||
cp contrib/examples/example_app/lwipcfg.h.ci contrib/examples/example_app/lwipcfg.h
|
||||
make -C contrib/ports/unix/check
|
||||
mkdir build && cd build && cmake .. -G Ninja && cmake --build .
|
||||
124
.github/workflows/codeql.yml
vendored
Normal file
124
.github/workflows/codeql.yml
vendored
Normal file
@@ -0,0 +1,124 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
pull_request:
|
||||
branches: '*'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
# Runner size impacts CodeQL analysis time. To learn more, please see:
|
||||
# - https://gh.io/recommended-hardware-resources-for-running-codeql
|
||||
# - https://gh.io/supported-runners-and-hardware-resources
|
||||
# - https://gh.io/using-larger-runners
|
||||
# Consider using larger runners for possible analysis time improvements.
|
||||
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
|
||||
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'cpp' ]
|
||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ]
|
||||
# Use only 'java' to analyze code written in Java, Kotlin or both
|
||||
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
|
||||
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
|
||||
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
||||
# queries: security-extended,security-and-quality
|
||||
queries: security-and-quality
|
||||
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
#- name: Autobuild
|
||||
# uses: github/codeql-action/autobuild@v3
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||
|
||||
# If the Autobuild fails above, remove it and uncomment the following three lines.
|
||||
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
|
||||
|
||||
- run: |
|
||||
./.github/workflows/codeql-buildscript.sh
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v3
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
||||
upload: false
|
||||
id: step1
|
||||
|
||||
# Filter out rules with low severity or high false positve rate
|
||||
# Also filter out warnings in third-party code
|
||||
- name: Filter out unwanted errors and warnings
|
||||
uses: advanced-security/filter-sarif@v1
|
||||
with:
|
||||
patterns: |
|
||||
-**:cpp/path-injection
|
||||
-**:cpp/world-writable-file-creation
|
||||
-**:cpp/poorly-documented-function
|
||||
-**:cpp/potentially-dangerous-function
|
||||
-**:cpp/use-of-goto
|
||||
-**:cpp/integer-multiplication-cast-to-long
|
||||
-**:cpp/comparison-with-wider-type
|
||||
-**:cpp/leap-year/*
|
||||
-**:cpp/ambiguously-signed-bit-field
|
||||
-**:cpp/suspicious-pointer-scaling
|
||||
-**:cpp/suspicious-pointer-scaling-void
|
||||
-**:cpp/unsigned-comparison-zero
|
||||
-**/cmake*/Modules/**
|
||||
input: ${{ steps.step1.outputs.sarif-output }}/cpp.sarif
|
||||
output: ${{ steps.step1.outputs.sarif-output }}/cpp.sarif
|
||||
|
||||
- name: Upload CodeQL results to code scanning
|
||||
uses: github/codeql-action/upload-sarif@v3
|
||||
with:
|
||||
sarif_file: ${{ steps.step1.outputs.sarif-output }}
|
||||
category: "/language:${{matrix.language}}"
|
||||
|
||||
- name: Upload CodeQL results as an artifact
|
||||
if: success() || failure()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: codeql-results
|
||||
path: ${{ steps.step1.outputs.sarif-output }}
|
||||
retention-days: 5
|
||||
|
||||
- name: Fail if an error is found
|
||||
run: |
|
||||
./.github/workflows/fail_on_error.py \
|
||||
${{ steps.step1.outputs.sarif-output }}/cpp.sarif
|
||||
34
.github/workflows/fail_on_error.py
vendored
Executable file
34
.github/workflows/fail_on_error.py
vendored
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import json
|
||||
import sys
|
||||
|
||||
# Return whether SARIF file contains error-level results
|
||||
def codeql_sarif_contain_error(filename):
|
||||
with open(filename, 'r') as f:
|
||||
s = json.load(f)
|
||||
|
||||
for run in s.get('runs', []):
|
||||
rules_metadata = run['tool']['driver']['rules']
|
||||
if not rules_metadata:
|
||||
rules_metadata = run['tool']['extensions'][0]['rules']
|
||||
|
||||
for res in run.get('results', []):
|
||||
if 'ruleIndex' in res:
|
||||
rule_index = res['ruleIndex']
|
||||
elif 'rule' in res and 'index' in res['rule']:
|
||||
rule_index = res['rule']['index']
|
||||
else:
|
||||
continue
|
||||
try:
|
||||
rule_level = rules_metadata[rule_index]['defaultConfiguration']['level']
|
||||
except IndexError as e:
|
||||
print(e, rule_index, len(rules_metadata))
|
||||
else:
|
||||
if rule_level == 'error':
|
||||
return True
|
||||
return False
|
||||
|
||||
if __name__ == "__main__":
|
||||
if codeql_sarif_contain_error(sys.argv[1]):
|
||||
sys.exit(1)
|
||||
7
.gitignore
vendored
7
.gitignore
vendored
@@ -4,6 +4,7 @@
|
||||
*.exe
|
||||
*lwip_unittests.xml
|
||||
*.suo
|
||||
*.swp
|
||||
*.log
|
||||
.depend*
|
||||
|
||||
@@ -35,8 +36,14 @@
|
||||
|
||||
/contrib/ports/win32/msvc/Debug
|
||||
/contrib/ports/win32/msvc/Debug unittests
|
||||
/contrib/ports/win32/msvc/Debug fuzz
|
||||
/contrib/ports/win32/msvc/Debug fuzz2
|
||||
/contrib/ports/win32/msvc/Debug fuzz3
|
||||
/contrib/ports/win32/msvc/Release
|
||||
/contrib/ports/win32/msvc/Release unittests
|
||||
/contrib/ports/win32/msvc/Release fuzz
|
||||
/contrib/ports/win32/msvc/Release fuzz2
|
||||
/contrib/ports/win32/msvc/x64
|
||||
/contrib/ports/win32/msvc/*.user
|
||||
/contrib/ports/win32/msvc/*.ncb
|
||||
/contrib/ports/win32/msvc/*.cache
|
||||
|
||||
142
CHANGELOG
142
CHANGELOG
@@ -6,11 +6,149 @@ HISTORY
|
||||
|
||||
* [Enter new changes just after this line - do not remove this line]
|
||||
|
||||
++ Bugfixes:
|
||||
|
||||
2025-06-03: Simon Goldschmidt
|
||||
* ip4_frag/ip6_frag: fix potential NULL-pointer access on memory errors
|
||||
|
||||
(STABLE-2.2.1):
|
||||
|
||||
++ New features:
|
||||
|
||||
2023-10-11: Faidon Liambotis
|
||||
* Add MEM_CUSTOM_ALLOCATOR and make LIBC a subset of it
|
||||
|
||||
2023-09-29: Jiri Findejs
|
||||
* mqtt: support binary Will Message
|
||||
|
||||
++ Bugfixes:
|
||||
|
||||
2024-02-19: Simon Goldschmidt
|
||||
* tcpip: fix that TCPIP_CORE_LOCK is not released for LWIP_TIMERS==0
|
||||
|
||||
2024-01-09: Simon Goldschmidt
|
||||
* snmp v3, ppp: prevent possible timing attacks by using a constant-runtime-memcmp when
|
||||
checking credentials
|
||||
|
||||
2023-01-04: Simon Goldschmidt
|
||||
* makefsdata: update tinydir.h to newest version (1.2.6)
|
||||
|
||||
2023-10-12: Borys Szefler
|
||||
* dhcp: fix memory corruption when LWIP_DHCP_MAX_DNS_SERVERS > DNS_MAX_SERVERS
|
||||
|
||||
2023-10-11: Mazakazu
|
||||
* sockets: fix socket leak when using setsockopt/getsockopt hook with LWIP_NETCONN_FULLDUPLEX==1
|
||||
|
||||
2023-10-10: Simon Goldschmidt
|
||||
* sockets: fix bug #63898: allow socket option IPV6_CHECKSUM for both IPPROTO_IPV6 and IPPROTO_RAW
|
||||
|
||||
2023-10-10: Simon Goldschmidt
|
||||
* ipv6: fix ip6_current_header() after reassembly
|
||||
|
||||
2023-10-07: Simon Goldschmidt
|
||||
* ipv6 reassembly: fix detecting holes in reassembled packets
|
||||
|
||||
2023-10-04: Simon Goldschmidt
|
||||
* apps: http client: improve the HTTP client; ensure connection settings are passed
|
||||
|
||||
2023-10-03: Simon Goldschmidt
|
||||
* ipv6: frag: fix bogus icmp6 response on reassembly timeout
|
||||
|
||||
2023-09-28: Szabolcs Szekelyi
|
||||
* httpd: ensure headers are parsed case-insensitive
|
||||
|
||||
2023-09-28: Erik Ekman
|
||||
* Fix ND6 Router Advertisement parsing when NETIF_MAX_HWADDR_LEN is above 6.
|
||||
|
||||
2023-09-27: Hardy Griech
|
||||
* Fix iperf byte counting mode
|
||||
|
||||
(STABLE-2.2.0):
|
||||
|
||||
2018-10-02: Dirk Ziegelmeier
|
||||
* Integrate contrib repository into main lwIP repository
|
||||
|
||||
++ New features:
|
||||
|
||||
2022-04-05: David Cermak
|
||||
* contrib/addons: Add example of using DHCP extra options hooks
|
||||
|
||||
2023-05-11: David Cermak
|
||||
* dhcp: Add macro for appending extra client's request options
|
||||
|
||||
2023-05-11: xueyunfei
|
||||
* dhcp: Enable custom config for timeouts, thresholds, backoff time
|
||||
|
||||
2021-04-26
|
||||
* test/unit: added more unit tests
|
||||
|
||||
2020-03-27: Simon Goldschmidt
|
||||
* test/fuzz: improve fuzz test
|
||||
|
||||
2019-12-11: Simon Goldschmidt
|
||||
* ip6addr_aton: support scoped address strings (via '%')
|
||||
|
||||
2019-08-28: Joan Lledó
|
||||
* Contrib: Add kFreeBSD to the Unix port
|
||||
|
||||
2019-07-14: Joan Lledó
|
||||
* Unix port: improve support for the Hurd
|
||||
|
||||
++ Bugfixes:
|
||||
|
||||
2019-12-11: David Girault
|
||||
* altcp_tls: support for saving/restoring session information
|
||||
|
||||
2018-11-16: Craig McQUeen
|
||||
* dns: allow a DNS look-up with a trailing dot in the name
|
||||
|
||||
2018-10-19: Timmy Brolin
|
||||
* Add outgoing VLAN PCP support for Ethernet level QoS
|
||||
|
||||
2018-10-08: Ben Wijen
|
||||
* apps/tftp: added TFTP client
|
||||
|
||||
2018-10-04: Jasper Verschueren
|
||||
* Implement IPv4 ACD (Address Conflict Detection)
|
||||
|
||||
2018-10-02: Dirk Ziegelmeier
|
||||
* Integrate contrib repository into main lwIP rep, tag STABLE-2_1_0_RELEASE
|
||||
2023-05-10
|
||||
* altcp_tls_mbedtls: note which version of mbedtls we are compatible to
|
||||
* altcp_tls_mbedtls: multiple compatibility fixes
|
||||
|
||||
2023-04-26: Jan Breuer, Harrold Spier, Ognjen Bjelica, Dirk Ziegelmeier, Simon Goldschmidt
|
||||
* apps/snmp: multiple fixes and improvements to snmp
|
||||
|
||||
2022-01-12: Simon Goldschmidt
|
||||
* httpd: clean up custom file handling
|
||||
|
||||
2021-11-25: quanjia
|
||||
* ping: fix sockaddr len in ping_send() for PING_USE_SOCKETS==1
|
||||
|
||||
2021-11-12: Bas Prins
|
||||
* http_client: reset timeout when receiving data
|
||||
|
||||
2020-07-07: Erik Ekman
|
||||
* Rename IP and Ethernet equality checkers from _cmp to _eq
|
||||
|
||||
2020-03-05: Simon Goldschmidt
|
||||
* tcp: tighten up checks for received SYN
|
||||
|
||||
2020-01-30: Simon Goldschmidt, David Girault, David J. Fiddes, Tom Ferrin
|
||||
* apps/sntp: multiple fixes and improvements for sntp
|
||||
|
||||
2020-01-30: Simon Goldschmidt
|
||||
* ip_forward: fix IPv4 forwarding with multiple netifs/offloading
|
||||
|
||||
2019-06-11: David Girault, Giuseppe Modugno
|
||||
* apps/mqtt: multiple fixes for mqtt
|
||||
|
||||
2019-05-19: Joan Lledó
|
||||
* New function tcpip_callback_wait()
|
||||
Call a function inside the tcpip thread and block the calling thread until
|
||||
the callback finishes
|
||||
|
||||
2018-08-15: Jasper Verschueren, David Girault, Our Air Quality
|
||||
* apps/mdns: greatly improved the mdns client
|
||||
|
||||
(STABLE-2.1.2):
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ set (LWIP_DEFINITIONS LWIP_DEBUG=1)
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||
add_subdirectory(${LWIP_DIR}/contrib/ports/win32/example_app)
|
||||
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
|
||||
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" OR ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
|
||||
add_subdirectory(${LWIP_DIR}/contrib/ports/unix/example_app)
|
||||
else()
|
||||
message(WARNING "Host ${CMAKE_SYSTEM_NAME} is not supported to build example_app")
|
||||
@@ -29,7 +29,9 @@ include(CPack)
|
||||
|
||||
# Generate docs before creating source package
|
||||
include(src/Filelists.cmake)
|
||||
add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
|
||||
if (TARGET lwipdocs)
|
||||
add_dependencies(dist lwipdocs)
|
||||
if (NOT TARGET dist)
|
||||
add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
|
||||
if (TARGET lwipdocs)
|
||||
add_dependencies(dist lwipdocs)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -10,6 +10,7 @@ with newer versions.
|
||||
* The eth_addr_cmp and ip_addr_cmp set of functions have been renamed to eth_addr_eq, ip_addr_eq
|
||||
and so on, since they return non-zero on equality. Macros for the old names exist.
|
||||
* The sio_write function used by PPP now takes the data argument as const.
|
||||
* The prev field in the snmp_varbind struct has been removed.
|
||||
|
||||
(2.2.0)
|
||||
|
||||
|
||||
@@ -39,7 +39,9 @@ CODESPELL_OPTS="-q 2" # Disable "WARNING: Binary file"
|
||||
CODESPELL_OPTS+=" --check-hidden"
|
||||
# Disable false positives "nd => and, 2nd", "ans => and", "tolen => token",
|
||||
# "ofo => of", "WAN => WANT", "mut => must, mutt, moot"
|
||||
CODESPELL_OPTS+=" --ignore-words-list=nd,ans,tolen,ofo,wan,mut "
|
||||
CODESPELL_OPTS+=" --ignore-words-list=nd,ans,tolen,ofo,wan,mut,clen,useg,clos "
|
||||
CODESPELL_OPTS+=" --ignore-words-list=devine,clinet,linz,garantie,explicite,numer "
|
||||
CODESPELL_OPTS+=" --ignore-words-list=skool "
|
||||
# propagate all options to codespell -> pass "-w" to this script to write changes
|
||||
CODESPELL_OPTS+="$@"
|
||||
|
||||
|
||||
@@ -268,7 +268,7 @@ ping_thread(void *arg)
|
||||
LWIP_ASSERT("setting receive timeout failed", ret == 0);
|
||||
LWIP_UNUSED_ARG(ret);
|
||||
|
||||
while (1) {
|
||||
while (ping_target != NULL) {
|
||||
if (ping_send(s, ping_target) == ERR_OK) {
|
||||
LWIP_DEBUGF( PING_DEBUG, ("ping: send "));
|
||||
ip_addr_debug_print(PING_DEBUG, ping_target);
|
||||
@@ -285,6 +285,7 @@ ping_thread(void *arg)
|
||||
}
|
||||
sys_msleep(PING_DELAY);
|
||||
}
|
||||
lwip_close(s);
|
||||
}
|
||||
|
||||
#else /* PING_USE_SOCKETS */
|
||||
@@ -297,10 +298,11 @@ ping_recv(void *arg, struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *addr)
|
||||
LWIP_UNUSED_ARG(arg);
|
||||
LWIP_UNUSED_ARG(pcb);
|
||||
LWIP_UNUSED_ARG(addr);
|
||||
LWIP_ASSERT("addr != NULL", addr != NULL);
|
||||
LWIP_ASSERT("p != NULL", p != NULL);
|
||||
|
||||
if ((p->tot_len >= (PBUF_IP_HLEN + sizeof(struct icmp_echo_hdr))) &&
|
||||
pbuf_remove_header(p, PBUF_IP_HLEN) == 0) {
|
||||
if ((p->tot_len >= (IP_HLEN + sizeof(struct icmp_echo_hdr))) &&
|
||||
pbuf_remove_header(p, IP_HLEN) == 0) {
|
||||
iecho = (struct icmp_echo_hdr *)p->payload;
|
||||
|
||||
if ((iecho->id == PING_ID) && (iecho->seqno == lwip_htons(ping_seq_num))) {
|
||||
@@ -314,7 +316,7 @@ ping_recv(void *arg, struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *addr)
|
||||
return 1; /* eat the packet */
|
||||
}
|
||||
/* not eaten, restore original packet */
|
||||
pbuf_add_header(p, PBUF_IP_HLEN);
|
||||
pbuf_add_header(p, IP_HLEN);
|
||||
}
|
||||
|
||||
return 0; /* don't eat the packet */
|
||||
@@ -376,14 +378,33 @@ void
|
||||
ping_send_now(void)
|
||||
{
|
||||
LWIP_ASSERT("ping_pcb != NULL", ping_pcb != NULL);
|
||||
LWIP_ASSERT("ping_target != NULL", ping_target != NULL);
|
||||
ping_send(ping_pcb, ping_target);
|
||||
}
|
||||
|
||||
static void
|
||||
ping_raw_stop(void)
|
||||
{
|
||||
sys_untimeout(ping_timeout, ping_pcb);
|
||||
if (ping_pcb != NULL) {
|
||||
raw_remove(ping_pcb);
|
||||
ping_pcb = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* PING_USE_SOCKETS */
|
||||
|
||||
/**
|
||||
* Initialize thread (socket mode) or timer (callback mode) to cyclically send pings
|
||||
* to a target.
|
||||
* Running ping is implicitly stopped.
|
||||
*/
|
||||
void
|
||||
ping_init(const ip_addr_t* ping_addr)
|
||||
{
|
||||
ping_stop();
|
||||
|
||||
LWIP_ASSERT("ping_addr != NULL", ping_addr != NULL);
|
||||
ping_target = ping_addr;
|
||||
|
||||
#if PING_USE_SOCKETS
|
||||
@@ -393,4 +414,15 @@ ping_init(const ip_addr_t* ping_addr)
|
||||
#endif /* PING_USE_SOCKETS */
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop sending more pings.
|
||||
*/
|
||||
void ping_stop(void)
|
||||
{
|
||||
#if !PING_USE_SOCKETS
|
||||
ping_raw_stop();
|
||||
#endif /* !PING_USE_SOCKETS */
|
||||
ping_target = NULL;
|
||||
}
|
||||
|
||||
#endif /* LWIP_RAW */
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#endif
|
||||
|
||||
void ping_init(const ip_addr_t* ping_addr);
|
||||
void ping_stop(void);
|
||||
|
||||
#if !PING_USE_SOCKETS
|
||||
void ping_send_now(void);
|
||||
|
||||
@@ -103,6 +103,8 @@
|
||||
#define TCP_FR_DEBUG LWIP_DBG_OFF
|
||||
#define TCP_QLEN_DEBUG LWIP_DBG_OFF
|
||||
#define TCP_RST_DEBUG LWIP_DBG_OFF
|
||||
#define TAPIF_DEBUG LWIP_DBG_ON
|
||||
#define MDNS_DEBUG LWIP_DBG_ON
|
||||
#endif
|
||||
|
||||
#define LWIP_DBG_TYPES_ON (LWIP_DBG_ON|LWIP_DBG_TRACE|LWIP_DBG_STATE|LWIP_DBG_FRESH|LWIP_DBG_HALT)
|
||||
@@ -130,7 +132,7 @@ a lot of data that needs to be copied, this should be set high. */
|
||||
/* MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One
|
||||
per active UDP "connection". */
|
||||
#define MEMP_NUM_UDP_PCB 8
|
||||
/* MEMP_NUM_TCP_PCB: the number of simulatenously active TCP
|
||||
/* MEMP_NUM_TCP_PCB: the number of simultaneously active TCP
|
||||
connections. */
|
||||
#define MEMP_NUM_TCP_PCB 5
|
||||
/* MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP
|
||||
@@ -139,7 +141,7 @@ a lot of data that needs to be copied, this should be set high. */
|
||||
/* MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP
|
||||
segments. */
|
||||
#define MEMP_NUM_TCP_SEG 16
|
||||
/* MEMP_NUM_SYS_TIMEOUT: the number of simulateously active
|
||||
/* MEMP_NUM_SYS_TIMEOUT: the number of simultaneously active
|
||||
timeouts. */
|
||||
#define MEMP_NUM_SYS_TIMEOUT 17
|
||||
|
||||
|
||||
@@ -36,9 +36,12 @@ srv_txt(struct mdns_service *service, void *txt_userdata)
|
||||
{
|
||||
err_t res;
|
||||
LWIP_UNUSED_ARG(txt_userdata);
|
||||
|
||||
|
||||
LWIP_DEBUGF(LWIP_DBG_ON, ("srv_txt called\n"));
|
||||
res = mdns_resp_add_service_txtitem(service, "path=/", 6);
|
||||
LWIP_ERROR("mdns add service txt failed\n", (res == ERR_OK), return);
|
||||
res = mdns_resp_add_service_txtitem(service, "package_import_url=github://dlitz/esphome-configs-dlitz/mini.yaml@wip", 69);
|
||||
LWIP_ERROR("mdns add big service txt failed\n", (res == ERR_OK), return);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -54,6 +54,7 @@ static const struct mqtt_connect_client_info_t mqtt_client_info =
|
||||
100, /* keep alive */
|
||||
NULL, /* will_topic */
|
||||
NULL, /* will_msg */
|
||||
0, /* will_msg_len */
|
||||
0, /* will_qos */
|
||||
0 /* will_retain */
|
||||
#if LWIP_ALTCP && LWIP_ALTCP_TLS
|
||||
|
||||
@@ -141,6 +141,7 @@ tftp_example_init_client(void)
|
||||
ip_addr_t srv;
|
||||
int ret = ipaddr_aton(LWIP_TFTP_EXAMPLE_CLIENT_REMOTEIP, &srv);
|
||||
LWIP_ASSERT("ipaddr_aton failed", ret == 1);
|
||||
LWIP_UNUSED_ARG(ret);
|
||||
|
||||
err = tftp_init_client(&tftp);
|
||||
LWIP_ASSERT("tftp_init_client failed", err == ERR_OK);
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
#define MEMP_NUM_UDP_PCB 4
|
||||
|
||||
/**
|
||||
* MEMP_NUM_TCP_PCB: the number of simulatenously active TCP connections.
|
||||
* MEMP_NUM_TCP_PCB: the number of simultaneously active TCP connections.
|
||||
* (requires the LWIP_TCP option)
|
||||
*/
|
||||
#define MEMP_NUM_TCP_PCB 4
|
||||
@@ -133,7 +133,7 @@
|
||||
#define MEMP_NUM_REASSDATA 1
|
||||
|
||||
/**
|
||||
* MEMP_NUM_ARP_QUEUE: the number of simulateously queued outgoing
|
||||
* MEMP_NUM_ARP_QUEUE: the number of simultaneously queued outgoing
|
||||
* packets (pbufs) that are waiting for an ARP request (to resolve
|
||||
* their destination address) to finish.
|
||||
* (requires the ARP_QUEUEING option)
|
||||
@@ -141,7 +141,7 @@
|
||||
#define MEMP_NUM_ARP_QUEUE 2
|
||||
|
||||
/**
|
||||
* MEMP_NUM_SYS_TIMEOUT: the number of simulateously active timeouts.
|
||||
* MEMP_NUM_SYS_TIMEOUT: the number of simultaneously active timeouts.
|
||||
* (requires NO_SYS==0)
|
||||
*/
|
||||
#define MEMP_NUM_SYS_TIMEOUT 8
|
||||
@@ -238,7 +238,7 @@
|
||||
/**
|
||||
* IP_FRAG_USES_STATIC_BUF==1: Use a static MTU-sized buffer for IP
|
||||
* fragmentation. Otherwise pbufs are allocated and reference the original
|
||||
* packet data to be fragmented.
|
||||
* packet data to be fragmented.
|
||||
*/
|
||||
#define IP_FRAG_USES_STATIC_BUF 0
|
||||
|
||||
@@ -341,7 +341,7 @@
|
||||
*/
|
||||
#define LWIP_TCP 1
|
||||
|
||||
#define LWIP_LISTEN_BACKLOG 0
|
||||
#define TCP_LISTEN_BACKLOG 0
|
||||
|
||||
/*
|
||||
----------------------------------
|
||||
@@ -359,7 +359,6 @@
|
||||
* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. The default is
|
||||
* designed to accommodate single full size TCP frame in one pbuf, including
|
||||
* TCP_MSS, IP header, and link header.
|
||||
*
|
||||
*/
|
||||
#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_HLEN)
|
||||
|
||||
|
||||
@@ -41,6 +41,8 @@
|
||||
#define LWIP_UNIX_MACH
|
||||
#elif defined __OpenBSD__
|
||||
#define LWIP_UNIX_OPENBSD
|
||||
#elif defined __FreeBSD__
|
||||
#define LWIP_UNIX_FREEBSD
|
||||
#elif defined __FreeBSD_kernel__ && __GLIBC__
|
||||
#define LWIP_UNIX_KFREEBSD
|
||||
#elif defined __CYGWIN__
|
||||
@@ -52,6 +54,10 @@
|
||||
#define LWIP_TIMEVAL_PRIVATE 0
|
||||
#include <sys/time.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define LWIP_ERRNO_INCLUDE <errno.h>
|
||||
|
||||
#if defined(LWIP_UNIX_LINUX) || defined(LWIP_UNIX_HURD) || defined(LWIP_UNIX_KFREEBSD)
|
||||
@@ -86,4 +92,8 @@ typedef struct sio_status_s sio_status_t;
|
||||
|
||||
typedef unsigned int sys_prot_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LWIP_ARCH_CC_H */
|
||||
|
||||
@@ -34,6 +34,10 @@
|
||||
|
||||
#include <sys/times.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef PERF
|
||||
#define PERF_START { \
|
||||
unsigned long __c1l, __c1h, __c2l, __c2h; \
|
||||
@@ -60,4 +64,8 @@ void perf_print_times(struct tms *start, struct tms *end, char *key);
|
||||
|
||||
void perf_init(char *fname);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LWIP_ARCH_PERF_H */
|
||||
|
||||
@@ -32,6 +32,10 @@
|
||||
#ifndef LWIP_ARCH_SYS_ARCH_H
|
||||
#define LWIP_ARCH_SYS_ARCH_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define SYS_MBOX_NULL NULL
|
||||
#define SYS_SEM_NULL NULL
|
||||
|
||||
@@ -87,4 +91,8 @@ void sys_unlock_tcpip_core(void);
|
||||
#define UNLOCK_TCPIP_CORE() sys_unlock_tcpip_core()
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LWIP_ARCH_SYS_ARCH_H */
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
|
||||
#include "lwip/sys.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** How many bytes in fifo */
|
||||
#define FIFOSIZE 2048
|
||||
|
||||
@@ -50,5 +54,9 @@ void fifoPut(fifo_t * fifo, int fd);
|
||||
*/
|
||||
void fifoInit(fifo_t * fifo);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
#ifndef LWIP_LIST_H
|
||||
#define LWIP_LIST_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct elem;
|
||||
|
||||
struct list {
|
||||
@@ -23,4 +27,8 @@ void list_delete(struct list *list);
|
||||
int list_remove(struct list *list, void *elem);
|
||||
void list_map(struct list *list, void (* func)(void *arg));
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -34,6 +34,14 @@
|
||||
|
||||
#include "lwip/netif.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
err_t pcapif_init(struct netif *netif);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LWIP_PCAPIF_H */
|
||||
|
||||
@@ -6,6 +6,10 @@
|
||||
#include "netif/fifo.h"
|
||||
/*#include "netif/pppif.h"*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct sio_status_s {
|
||||
int fd;
|
||||
fifo_t myfifo;
|
||||
@@ -56,5 +60,9 @@ void sio_flush( sio_status_t * siostat );
|
||||
*/
|
||||
void sio_change_baud( sioBaudrates baud, sio_status_t * siostat );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -34,10 +34,18 @@
|
||||
|
||||
#include "lwip/netif.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
err_t tapif_init(struct netif *netif);
|
||||
void tapif_poll(struct netif *netif);
|
||||
#if NO_SYS
|
||||
int tapif_select(struct netif *netif);
|
||||
#endif /* NO_SYS */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LWIP_TAPIF_H */
|
||||
|
||||
@@ -34,10 +34,18 @@
|
||||
|
||||
#include "lwip/netif.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
err_t vdeif_init(struct netif *netif);
|
||||
void vdeif_poll(struct netif *netif);
|
||||
#if NO_SYS
|
||||
int vdeif_select(struct netif *netif);
|
||||
#endif /* NO_SYS */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LWIP_VDEIF_H */
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
/* Author: Magnus Ivarsson <magnus.ivarsson@volvo.com> */
|
||||
|
||||
/* to get rid of implicit function declarations */
|
||||
#ifndef __FreeBSD__
|
||||
/* defining this on FreeBSD hides non-standard defines that sio.c depends on */
|
||||
#define _XOPEN_SOURCE 600
|
||||
#endif
|
||||
#define _GNU_SOURCE
|
||||
|
||||
/* build with Darwin C extensions not part of POSIX, i.e. FASYNC, SIGIO.
|
||||
@@ -35,8 +38,10 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#if defined(LWIP_UNIX_OPENBSD)
|
||||
#if defined(LWIP_UNIX_OPENBSD) || defined(LWIP_UNIX_MACH)
|
||||
#include <util.h>
|
||||
#elif defined(LWIP_UNIX_FREEBSD)
|
||||
#include <libutil.h>
|
||||
#endif
|
||||
#include <termios.h>
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -84,7 +84,7 @@ install(DIRECTORY "${LWIP_DIR}/contrib/ports/unix/port/include/netif"
|
||||
FILES_MATCHING PATTERN "*.h"
|
||||
)
|
||||
|
||||
install(DIRECTORY "${LWIP_DIR}/contrib/ports/unix/linuxlib/include/posix"
|
||||
install(DIRECTORY "${LWIP_DIR}/contrib/ports/unix/posixlib/include/posix"
|
||||
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/lwip"
|
||||
FILES_MATCHING PATTERN "*.h"
|
||||
)
|
||||
|
||||
@@ -120,7 +120,7 @@ const char *lwip_inet_ntop(int af, const void *src, char *dst, socklen_t size);
|
||||
int lwip_inet_pton(int af, const char *src, void *dst);
|
||||
#endif
|
||||
|
||||
/* Unsuported indetifiers */
|
||||
/* Unsupported identifiers */
|
||||
#ifndef SO_NO_CHECK
|
||||
#define SO_NO_CHECK 0xFF
|
||||
#endif
|
||||
|
||||
@@ -80,7 +80,11 @@ typedef int sys_prot_t;
|
||||
|
||||
#define S16_F "hd"
|
||||
#define X16_F "hx"
|
||||
#ifdef _WIN64
|
||||
#define SZT_F "llu"
|
||||
#else
|
||||
#define SZT_F "lu"
|
||||
#endif
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/* Compiler hints for packing structures */
|
||||
|
||||
@@ -5,14 +5,23 @@
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{EBB156DC-01BF-47B2-B69C-1A750B6B5F09}</ProjectGuid>
|
||||
<RootNamespace>libcheck</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
@@ -21,20 +30,37 @@
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
@@ -43,6 +69,14 @@
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\$(ProjectName)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
@@ -55,6 +89,17 @@
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\check;..\..\..\..\..\check\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_LIB;WIN32;_DEBUG;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
@@ -67,6 +112,18 @@
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>..\check;..\..\..\..\..\check\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\..\..\check\lib\libcompat.h" />
|
||||
<ClInclude Include="..\check\config.h" />
|
||||
|
||||
@@ -1,25 +1,58 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug fuzz|Win32">
|
||||
<Configuration>Debug fuzz</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug fuzz|x64">
|
||||
<Configuration>Debug fuzz</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug unittests|Win32">
|
||||
<Configuration>Debug unittests</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug unittests|x64">
|
||||
<Configuration>Debug unittests</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release fuzz|Win32">
|
||||
<Configuration>Release fuzz</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release fuzz|x64">
|
||||
<Configuration>Release fuzz</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release unittests|Win32">
|
||||
<Configuration>Release unittests</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release unittests|x64">
|
||||
<Configuration>Release unittests</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{2CC276FA-B226-49C9-8F82-7FCD5A228E28}</ProjectGuid>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release unittests|Win32'" Label="Configuration">
|
||||
@@ -28,24 +61,72 @@
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release unittests|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release fuzz|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release fuzz|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug unittests|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug unittests|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug fuzz|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug fuzz|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
@@ -53,30 +134,90 @@
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release unittests|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release fuzz|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release fuzz|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug unittests|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug unittests|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug fuzz|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug fuzz|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\$(ProjectName)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug unittests|Win32'">$(Configuration)\$(ProjectName)\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug fuzz|Win32'">$(Configuration)\$(ProjectName)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug unittests|Win32'">$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug fuzz|Win32'">$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release unittests|Win32'">$(Configuration)\$(ProjectName)\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release fuzz|Win32'">$(Configuration)\$(ProjectName)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release unittests|Win32'">$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release fuzz|Win32'">$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\$(ProjectName)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug fuzz|x64'">
|
||||
<OutDir>$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug unittests|x64'">
|
||||
<OutDir>$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release fuzz|x64'">
|
||||
<OutDir>$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release unittests|x64'">
|
||||
<OutDir>$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
@@ -101,6 +242,30 @@
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..\..\..\examples\example_app;..\..\..\apps\snmp_private_mib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0407</Culture>
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
@@ -125,6 +290,30 @@
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..\..\..\examples\example_app;..\..\..\apps\snmp_private_mib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_LIB;WIN32;_DEBUG;LWIP_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0407</Culture>
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug unittests|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
@@ -149,6 +338,78 @@
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug unittests|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\test\unit;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..\..\..\examples\example_app;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_LIB;WIN32;_DEBUG;LWIP_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0407</Culture>
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug fuzz|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\test\fuzz;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..\..\..\examples\example_app;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_LIB;WIN32;_DEBUG;LWIP_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0407</Culture>
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug fuzz|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\test\fuzz;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..\..\..\examples\example_app;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_LIB;WIN32;_DEBUG;LWIP_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0407</Culture>
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release unittests|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
@@ -173,50 +434,178 @@
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release unittests|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\test\unit;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..\..\..\examples\example_app;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0407</Culture>
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release fuzz|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\test\fuzz;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..\..\..\examples\example_app;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0407</Culture>
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release fuzz|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\test\fuzz;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..\..\..\examples\example_app;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0407</Culture>
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuildStep Include="..\..\..\..\doc\contrib.txt">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug unittests|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug unittests|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug fuzz|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug fuzz|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release unittests|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release unittests|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release fuzz|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release fuzz|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</CustomBuildStep>
|
||||
<CustomBuildStep Include="..\..\..\..\doc\FILES">
|
||||
<FileType>Document</FileType>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug unittests|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug unittests|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug fuzz|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug fuzz|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release unittests|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release unittests|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release fuzz|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release fuzz|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</CustomBuildStep>
|
||||
<CustomBuildStep Include="..\..\..\..\doc\rawapi.txt">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug unittests|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug unittests|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug fuzz|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug fuzz|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release unittests|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release unittests|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release fuzz|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release fuzz|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</CustomBuildStep>
|
||||
<CustomBuildStep Include="..\..\..\..\doc\savannah.txt">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug unittests|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug unittests|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug fuzz|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug fuzz|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release unittests|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release unittests|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release fuzz|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release fuzz|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</CustomBuildStep>
|
||||
<CustomBuildStep Include="..\..\..\..\doc\snmp_agent.txt">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug unittests|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug unittests|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug fuzz|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug fuzz|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release unittests|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release unittests|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release fuzz|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release fuzz|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</CustomBuildStep>
|
||||
<CustomBuildStep Include="..\..\..\..\doc\sys_arch.txt">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug unittests|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug unittests|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug fuzz|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug fuzz|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release unittests|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release unittests|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release fuzz|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release fuzz|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</CustomBuildStep>
|
||||
<CustomBuildStep Include="..\..\..\..\src\core\ipv6\README">
|
||||
<FileType>Document</FileType>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug unittests|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug unittests|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug fuzz|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug fuzz|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release unittests|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release unittests|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release fuzz|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release fuzz|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</CustomBuildStep>
|
||||
<CustomBuildStep Include="..\..\..\..\src\netif\FILES">
|
||||
<FileType>Document</FileType>
|
||||
@@ -224,9 +613,17 @@
|
||||
<CustomBuildStep Include="..\lwipcfg_msvc.h.example">
|
||||
<FileType>Document</FileType>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug unittests|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug unittests|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug fuzz|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug fuzz|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release unittests|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release unittests|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release fuzz|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release fuzz|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</CustomBuildStep>
|
||||
<None Include="..\..\..\..\CHANGELOG" />
|
||||
<None Include="..\..\..\..\COPYING" />
|
||||
@@ -243,17 +640,33 @@
|
||||
<None Include="..\..\..\..\UPGRADING" />
|
||||
<None Include="..\..\..\examples\example_app\lwipcfg.h.example">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug unittests|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug unittests|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug fuzz|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug fuzz|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release unittests|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release unittests|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release fuzz|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release fuzz|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\..\doc\NO_SYS_SampleCode.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug unittests|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug unittests|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug fuzz|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug fuzz|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release unittests|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release unittests|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release fuzz|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release fuzz|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\api\api_lib.c" />
|
||||
<ClCompile Include="..\..\..\..\src\api\api_msg.c" />
|
||||
@@ -266,15 +679,31 @@
|
||||
<ClCompile Include="..\..\..\..\src\api\tcpip.c" />
|
||||
<ClCompile Include="..\..\..\..\src\apps\altcp_tls\altcp_tls_mbedtls.c">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\..\..\mbedtls\include;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;..\..\..\apps\snmp_private_mib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\..\..\mbedtls\include;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;..\..\..\apps\snmp_private_mib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\..\..\mbedtls\include;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;..\..\..\apps\snmp_private_mib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\..\..\mbedtls\include;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;..\..\..\apps\snmp_private_mib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug unittests|Win32'">..\..\..\..\..\mbedtls\include;..\..\..\..\test\unit;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug unittests|x64'">..\..\..\..\..\mbedtls\include;..\..\..\..\test\unit;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug fuzz|Win32'">..\..\..\..\..\mbedtls\include;..\..\..\..\test\unit;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug fuzz|x64'">..\..\..\..\..\mbedtls\include;..\..\..\..\test\unit;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release unittests|Win32'">..\..\..\..\..\mbedtls\include;..\..\..\..\test\unit;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release unittests|x64'">..\..\..\..\..\mbedtls\include;..\..\..\..\test\unit;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release fuzz|Win32'">..\..\..\..\..\mbedtls\include;..\..\..\..\test\unit;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release fuzz|x64'">..\..\..\..\..\mbedtls\include;..\..\..\..\test\unit;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\apps\altcp_tls\altcp_tls_mbedtls_mem.c">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\..\..\mbedtls\include;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;..\..\..\apps\snmp_private_mib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\..\..\mbedtls\include;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;..\..\..\apps\snmp_private_mib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\..\..\mbedtls\include;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;..\..\..\apps\snmp_private_mib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\..\..\mbedtls\include;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;..\..\..\apps\snmp_private_mib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug unittests|Win32'">..\..\..\..\..\mbedtls\include;..\..\..\..\test\unit;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug unittests|x64'">..\..\..\..\..\mbedtls\include;..\..\..\..\test\unit;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug fuzz|Win32'">..\..\..\..\..\mbedtls\include;..\..\..\..\test\unit;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug fuzz|x64'">..\..\..\..\..\mbedtls\include;..\..\..\..\test\unit;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release unittests|Win32'">..\..\..\..\..\mbedtls\include;..\..\..\..\test\unit;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release unittests|x64'">..\..\..\..\..\mbedtls\include;..\..\..\..\test\unit;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release fuzz|Win32'">..\..\..\..\..\mbedtls\include;..\..\..\..\test\unit;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release fuzz|x64'">..\..\..\..\..\mbedtls\include;..\..\..\..\test\unit;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\apps\http\altcp_proxyconnect.c" />
|
||||
<ClCompile Include="..\..\..\..\src\apps\http\http_client.c" />
|
||||
@@ -362,9 +791,17 @@
|
||||
<ClCompile Include="..\..\..\..\src\apps\http\fs.c" />
|
||||
<ClCompile Include="..\..\..\..\src\apps\http\fsdata.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug unittests|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug unittests|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug fuzz|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug fuzz|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release unittests|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release unittests|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release fuzz|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release fuzz|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\apps\http\httpd.c" />
|
||||
<ClCompile Include="..\..\..\..\src\apps\snmp\snmp_asn1.c" />
|
||||
@@ -393,15 +830,25 @@
|
||||
<ClCompile Include="..\..\..\..\src\apps\mdns\mdns.c" />
|
||||
<ClCompile Include="..\..\..\..\src\apps\snmp\snmpv3_mbedtls.c">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug unittests|Win32'">..\..\..\..\..\mbedtls\include;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;..\..\..\apps\snmp_private_mib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug unittests|x64'">..\..\..\..\..\mbedtls\include;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;..\..\..\apps\snmp_private_mib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug fuzz|Win32'">..\..\..\..\..\mbedtls\include;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;..\..\..\apps\snmp_private_mib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug fuzz|x64'">..\..\..\..\..\mbedtls\include;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;..\..\..\apps\snmp_private_mib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\..\..\mbedtls\include;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;..\..\..\apps\snmp_private_mib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\..\..\mbedtls\include;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;..\..\..\apps\snmp_private_mib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release unittests|Win32'">..\..\..\..\..\mbedtls\include;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;..\..\..\apps\snmp_private_mib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release unittests|x64'">..\..\..\..\..\mbedtls\include;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;..\..\..\apps\snmp_private_mib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release fuzz|Win32'">..\..\..\..\..\mbedtls\include;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;..\..\..\apps\snmp_private_mib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release fuzz|x64'">..\..\..\..\..\mbedtls\include;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;..\..\..\apps\snmp_private_mib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\..\..\mbedtls\include;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;..\..\..\apps\snmp_private_mib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\..\..\mbedtls\include;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;..\..\..\apps\snmp_private_mib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\netif\zepif.c" />
|
||||
<ClCompile Include="..\sio.c" />
|
||||
<ClCompile Include="..\sys_arch.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug unittests|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug unittests|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release unittests|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release unittests|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual C++ Express 2010
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.7.34031.279
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lwIP_Test", "lwIP_Test.vcxproj", "{8CC0CE51-32CF-4585-BFAF-A9343BC5A96D}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lwIP pcapif", "lwIP_pcapif.vcxproj", "{6F44E49E-9F21-4144-91EC-53B92AEF62CE}"
|
||||
@@ -11,25 +13,43 @@ EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{8CC0CE51-32CF-4585-BFAF-A9343BC5A96D}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{8CC0CE51-32CF-4585-BFAF-A9343BC5A96D}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{8CC0CE51-32CF-4585-BFAF-A9343BC5A96D}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{8CC0CE51-32CF-4585-BFAF-A9343BC5A96D}.Debug|x64.Build.0 = Debug|x64
|
||||
{8CC0CE51-32CF-4585-BFAF-A9343BC5A96D}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8CC0CE51-32CF-4585-BFAF-A9343BC5A96D}.Release|Win32.Build.0 = Release|Win32
|
||||
{8CC0CE51-32CF-4585-BFAF-A9343BC5A96D}.Release|x64.ActiveCfg = Release|x64
|
||||
{8CC0CE51-32CF-4585-BFAF-A9343BC5A96D}.Release|x64.Build.0 = Release|x64
|
||||
{6F44E49E-9F21-4144-91EC-53B92AEF62CE}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{6F44E49E-9F21-4144-91EC-53B92AEF62CE}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{6F44E49E-9F21-4144-91EC-53B92AEF62CE}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{6F44E49E-9F21-4144-91EC-53B92AEF62CE}.Debug|x64.Build.0 = Debug|x64
|
||||
{6F44E49E-9F21-4144-91EC-53B92AEF62CE}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{6F44E49E-9F21-4144-91EC-53B92AEF62CE}.Release|Win32.Build.0 = Release|Win32
|
||||
{6F44E49E-9F21-4144-91EC-53B92AEF62CE}.Release|x64.ActiveCfg = Release|x64
|
||||
{6F44E49E-9F21-4144-91EC-53B92AEF62CE}.Release|x64.Build.0 = Release|x64
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Debug|x64.Build.0 = Debug|x64
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Release|Win32.Build.0 = Release|Win32
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Release|x64.ActiveCfg = Release|x64
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Release|x64.Build.0 = Release|x64
|
||||
{0BFC0F21-8E84-4E68-A9E1-CE2A09B72F6D}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{0BFC0F21-8E84-4E68-A9E1-CE2A09B72F6D}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{0BFC0F21-8E84-4E68-A9E1-CE2A09B72F6D}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{0BFC0F21-8E84-4E68-A9E1-CE2A09B72F6D}.Debug|x64.Build.0 = Debug|x64
|
||||
{0BFC0F21-8E84-4E68-A9E1-CE2A09B72F6D}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{0BFC0F21-8E84-4E68-A9E1-CE2A09B72F6D}.Release|Win32.Build.0 = Release|Win32
|
||||
{0BFC0F21-8E84-4E68-A9E1-CE2A09B72F6D}.Release|x64.ActiveCfg = Release|x64
|
||||
{0BFC0F21-8E84-4E68-A9E1-CE2A09B72F6D}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -5,14 +5,23 @@
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{8CC0CE51-32CF-4585-BFAF-A9343BC5A96D}</ProjectGuid>
|
||||
<RootNamespace>lwIP_test</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
@@ -21,12 +30,24 @@
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
@@ -34,17 +55,26 @@
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir>$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Midl>
|
||||
@@ -88,6 +118,47 @@
|
||||
<DelayLoadDLLs>Packet.dll;wpcap.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Midl>
|
||||
<TypeLibraryName>.\Release/test.tlb</TypeLibraryName>
|
||||
<HeaderFileName>
|
||||
</HeaderFileName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..\..\..\examples\example_app;..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0407</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>Packet.lib;wpcap.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>$(PCAP_DIR)\Lib;..\..\..\..\..\winpcap\WpdPack\Lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<ProgramDatabaseFile>.\Release/test.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<GenerateMapFile>true</GenerateMapFile>
|
||||
<MapFileName>$(TargetDir)$(TargetName).map</MapFileName>
|
||||
<DelayLoadDLLs>Packet.dll;wpcap.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Midl>
|
||||
<TypeLibraryName>.\Debug/test.tlb</TypeLibraryName>
|
||||
@@ -127,6 +198,47 @@
|
||||
<GenerateMapFile>false</GenerateMapFile>
|
||||
<MapFileName>$(TargetDir)$(TargetName).map</MapFileName>
|
||||
<DelayLoadDLLs>Packet.dll;wpcap.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
<TypeLibraryName>.\Debug/test.tlb</TypeLibraryName>
|
||||
<HeaderFileName>
|
||||
</HeaderFileName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..\..\..\examples\example_app;..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CONSOLE;WIN32;_DEBUG;LWIP_DEBUG;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0407</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>Packet.lib;wpcap.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>$(PCAP_DIR)\Lib;..\..\..\..\..\winpcap\WpdPack\Lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<GenerateMapFile>false</GenerateMapFile>
|
||||
<MapFileName>$(TargetDir)$(TargetName).map</MapFileName>
|
||||
<DelayLoadDLLs>Packet.dll;wpcap.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
|
||||
78
contrib/ports/win32/msvc/lwIP_fuzz.sln
Normal file
78
contrib/ports/win32/msvc/lwIP_fuzz.sln
Normal file
@@ -0,0 +1,78 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.7.34031.279
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lwIP", "lwIP.vcxproj", "{2CC276FA-B226-49C9-8F82-7FCD5A228E28}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lwip_fuzz", "lwip_fuzz.vcxproj", "{71B3B3F4-621C-11EE-8C99-0242AC120002}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug_fuzz2|x64 = Debug_fuzz2|x64
|
||||
Debug_fuzz2|x86 = Debug_fuzz2|x86
|
||||
Debug_fuzz3|x64 = Debug_fuzz3|x64
|
||||
Debug_fuzz3|x86 = Debug_fuzz3|x86
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release_fuzz2|x64 = Release_fuzz2|x64
|
||||
Release_fuzz2|x86 = Release_fuzz2|x86
|
||||
Release_fuzz3|x64 = Release_fuzz3|x64
|
||||
Release_fuzz3|x86 = Release_fuzz3|x86
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Debug_fuzz2|x64.ActiveCfg = Debug fuzz|x64
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Debug_fuzz2|x64.Build.0 = Debug fuzz|x64
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Debug_fuzz2|x86.ActiveCfg = Debug fuzz|Win32
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Debug_fuzz2|x86.Build.0 = Debug fuzz|Win32
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Debug_fuzz3|x64.ActiveCfg = Debug fuzz|x64
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Debug_fuzz3|x64.Build.0 = Debug fuzz|x64
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Debug_fuzz3|x86.ActiveCfg = Debug fuzz|Win32
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Debug_fuzz3|x86.Build.0 = Debug fuzz|Win32
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Debug|x64.ActiveCfg = Debug fuzz|x64
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Debug|x64.Build.0 = Debug fuzz|x64
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Debug|x86.ActiveCfg = Debug fuzz|Win32
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Debug|x86.Build.0 = Debug fuzz|Win32
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Release_fuzz2|x64.ActiveCfg = Release fuzz|x64
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Release_fuzz2|x64.Build.0 = Release fuzz|x64
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Release_fuzz2|x86.ActiveCfg = Release fuzz|Win32
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Release_fuzz2|x86.Build.0 = Release fuzz|Win32
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Release_fuzz3|x64.ActiveCfg = Release fuzz|x64
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Release_fuzz3|x64.Build.0 = Release fuzz|x64
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Release_fuzz3|x86.ActiveCfg = Release fuzz|Win32
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Release_fuzz3|x86.Build.0 = Release fuzz|Win32
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Release|x64.ActiveCfg = Release fuzz|x64
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Release|x64.Build.0 = Release fuzz|x64
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Release|x86.ActiveCfg = Release fuzz|Win32
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Release|x86.Build.0 = Release fuzz|Win32
|
||||
{71B3B3F4-621C-11EE-8C99-0242AC120002}.Debug_fuzz2|x64.ActiveCfg = Debug fuzz2|x64
|
||||
{71B3B3F4-621C-11EE-8C99-0242AC120002}.Debug_fuzz2|x64.Build.0 = Debug fuzz2|x64
|
||||
{71B3B3F4-621C-11EE-8C99-0242AC120002}.Debug_fuzz2|x86.ActiveCfg = Debug fuzz2|Win32
|
||||
{71B3B3F4-621C-11EE-8C99-0242AC120002}.Debug_fuzz2|x86.Build.0 = Debug fuzz2|Win32
|
||||
{71B3B3F4-621C-11EE-8C99-0242AC120002}.Debug_fuzz3|x64.ActiveCfg = Debug fuzz3|x64
|
||||
{71B3B3F4-621C-11EE-8C99-0242AC120002}.Debug_fuzz3|x64.Build.0 = Debug fuzz3|x64
|
||||
{71B3B3F4-621C-11EE-8C99-0242AC120002}.Debug_fuzz3|x86.ActiveCfg = Debug fuzz3|Win32
|
||||
{71B3B3F4-621C-11EE-8C99-0242AC120002}.Debug_fuzz3|x86.Build.0 = Debug fuzz3|Win32
|
||||
{71B3B3F4-621C-11EE-8C99-0242AC120002}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{71B3B3F4-621C-11EE-8C99-0242AC120002}.Debug|x64.Build.0 = Debug|x64
|
||||
{71B3B3F4-621C-11EE-8C99-0242AC120002}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{71B3B3F4-621C-11EE-8C99-0242AC120002}.Debug|x86.Build.0 = Debug|Win32
|
||||
{71B3B3F4-621C-11EE-8C99-0242AC120002}.Release_fuzz2|x64.ActiveCfg = Release fuzz2|x64
|
||||
{71B3B3F4-621C-11EE-8C99-0242AC120002}.Release_fuzz2|x64.Build.0 = Release fuzz2|x64
|
||||
{71B3B3F4-621C-11EE-8C99-0242AC120002}.Release_fuzz2|x86.ActiveCfg = Release fuzz2|Win32
|
||||
{71B3B3F4-621C-11EE-8C99-0242AC120002}.Release_fuzz2|x86.Build.0 = Release fuzz2|Win32
|
||||
{71B3B3F4-621C-11EE-8C99-0242AC120002}.Release_fuzz3|x64.ActiveCfg = Release fuzz3|x64
|
||||
{71B3B3F4-621C-11EE-8C99-0242AC120002}.Release_fuzz3|x64.Build.0 = Release fuzz3|x64
|
||||
{71B3B3F4-621C-11EE-8C99-0242AC120002}.Release_fuzz3|x86.ActiveCfg = Release fuzz3|Win32
|
||||
{71B3B3F4-621C-11EE-8C99-0242AC120002}.Release_fuzz3|x86.Build.0 = Release fuzz3|Win32
|
||||
{71B3B3F4-621C-11EE-8C99-0242AC120002}.Release|x64.ActiveCfg = Release|x64
|
||||
{71B3B3F4-621C-11EE-8C99-0242AC120002}.Release|x64.Build.0 = Release|x64
|
||||
{71B3B3F4-621C-11EE-8C99-0242AC120002}.Release|x86.ActiveCfg = Release|Win32
|
||||
{71B3B3F4-621C-11EE-8C99-0242AC120002}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -5,15 +5,24 @@
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectName>lwIP pcapif</ProjectName>
|
||||
<ProjectGuid>{6F44E49E-9F21-4144-91EC-53B92AEF62CE}</ProjectGuid>
|
||||
<RootNamespace>lwIP pcapif</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
@@ -22,12 +31,24 @@
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
@@ -35,15 +56,23 @@
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<OutDir>$(Configuration)\$(ProjectName)\</OutDir>
|
||||
<IntDir>$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
@@ -67,6 +96,28 @@
|
||||
</ResourceCompile>
|
||||
<Lib />
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..\..\..\examples\example_app;.\;$(PCAP_DIR)\Include;..\..\..\..\..\winpcap\WpdPack\Include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_LIB;WIN32;_DEBUG;LWIP_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0407</Culture>
|
||||
</ResourceCompile>
|
||||
<Lib />
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
@@ -93,6 +144,32 @@
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..\..\..\examples\example_app;.\;$(PCAP_DIR)\Include;..\..\..\..\..\winpcap\WpdPack\Include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0407</Culture>
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\pcapif.c" />
|
||||
<ClCompile Include="..\pcapif_helper.c" />
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual C++ Express 2010
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.7.34031.279
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lwip_unittests", "lwip_unittests.vcxproj", "{6CCABAA4-F86F-4119-AFF8-43C9A4A234C2}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lwIP", "lwIP.vcxproj", "{2CC276FA-B226-49C9-8F82-7FCD5A228E28}"
|
||||
@@ -9,23 +11,40 @@ EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{6CCABAA4-F86F-4119-AFF8-43C9A4A234C2}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{6CCABAA4-F86F-4119-AFF8-43C9A4A234C2}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{6CCABAA4-F86F-4119-AFF8-43C9A4A234C2}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{6CCABAA4-F86F-4119-AFF8-43C9A4A234C2}.Debug|x64.Build.0 = Debug|x64
|
||||
{6CCABAA4-F86F-4119-AFF8-43C9A4A234C2}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{6CCABAA4-F86F-4119-AFF8-43C9A4A234C2}.Release|Win32.Build.0 = Release|Win32
|
||||
{6CCABAA4-F86F-4119-AFF8-43C9A4A234C2}.Release|x64.ActiveCfg = Release|x64
|
||||
{6CCABAA4-F86F-4119-AFF8-43C9A4A234C2}.Release|x64.Build.0 = Release|x64
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Debug|Win32.ActiveCfg = Debug unittests|Win32
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Debug|Win32.Build.0 = Debug unittests|Win32
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Debug|x64.ActiveCfg = Debug unittests|x64
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Debug|x64.Build.0 = Debug unittests|x64
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Release|Win32.ActiveCfg = Release unittests|Win32
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Release|Win32.Build.0 = Release unittests|Win32
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Release|x64.ActiveCfg = Release unittests|x64
|
||||
{2CC276FA-B226-49C9-8F82-7FCD5A228E28}.Release|x64.Build.0 = Release unittests|x64
|
||||
{EBB156DC-01BF-47B2-B69C-1A750B6B5F09}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{EBB156DC-01BF-47B2-B69C-1A750B6B5F09}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{EBB156DC-01BF-47B2-B69C-1A750B6B5F09}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{EBB156DC-01BF-47B2-B69C-1A750B6B5F09}.Debug|x64.Build.0 = Debug|x64
|
||||
{EBB156DC-01BF-47B2-B69C-1A750B6B5F09}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{EBB156DC-01BF-47B2-B69C-1A750B6B5F09}.Release|Win32.Build.0 = Release|Win32
|
||||
{EBB156DC-01BF-47B2-B69C-1A750B6B5F09}.Release|x64.ActiveCfg = Release|x64
|
||||
{EBB156DC-01BF-47B2-B69C-1A750B6B5F09}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {18F9EDCF-BE44-4F9F-A7F6-5DCF2B7687C5}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
476
contrib/ports/win32/msvc/lwip_fuzz.vcxproj
Normal file
476
contrib/ports/win32/msvc/lwip_fuzz.vcxproj
Normal file
@@ -0,0 +1,476 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug fuzz2|Win32">
|
||||
<Configuration>Debug fuzz2</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug fuzz2|x64">
|
||||
<Configuration>Debug fuzz2</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug fuzz3|Win32">
|
||||
<Configuration>Debug fuzz3</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug fuzz3|x64">
|
||||
<Configuration>Debug fuzz3</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release fuzz2|Win32">
|
||||
<Configuration>Release fuzz2</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release fuzz2|x64">
|
||||
<Configuration>Release fuzz2</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release fuzz3|Win32">
|
||||
<Configuration>Release fuzz3</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release fuzz3|x64">
|
||||
<Configuration>Release fuzz3</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{71B3B3F4-621C-11EE-8C99-0242AC120002}</ProjectGuid>
|
||||
<RootNamespace>lwip_fuzz</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release fuzz3|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release fuzz3|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release fuzz2|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release fuzz2|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug fuzz3|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug fuzz3|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug fuzz2|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug fuzz2|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release fuzz3|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release fuzz3|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release fuzz2|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release fuzz2|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug fuzz3|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug fuzz3|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug fuzz2|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug fuzz2|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug fuzz3|Win32'">$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug fuzz2|Win32'">$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release fuzz3|Win32'">$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release fuzz2|Win32'">$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug fuzz2|x64'">
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug fuzz3|x64'">
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release fuzz2|x64'">
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release fuzz3|x64'">
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\test\fuzz;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_LIB;WIN32;_DEBUG;LWIP_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4820</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\test\fuzz;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_LIB;WIN32;_DEBUG;LWIP_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4820</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug fuzz3|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\test\fuzz;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_LIB;WIN32;_DEBUG;LWIP_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4820</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug fuzz3|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\test\fuzz;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_LIB;WIN32;_DEBUG;LWIP_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4820</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug fuzz2|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\test\fuzz;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_LIB;WIN32;_DEBUG;LWIP_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4820</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug fuzz2|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\test\fuzz;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_LIB;WIN32;_DEBUG;LWIP_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4820</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\test\fuzz;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\test\fuzz;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release fuzz3|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\test\fuzz;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release fuzz3|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\test\fuzz;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release fuzz2|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\test\fuzz;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release fuzz2|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\test\fuzz;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="lwIP.vcxproj">
|
||||
<Project>{2cc276fa-b226-49c9-8f82-7fcd5a228e28}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\..\test\fuzz\config.h" />
|
||||
<ClInclude Include="..\..\..\..\test\fuzz\fuzz_common.h" />
|
||||
<ClInclude Include="..\..\..\..\test\fuzz\lwipopts.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\..\test\fuzz\fuzz.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug fuzz2|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug fuzz2|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug fuzz3|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug fuzz3|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release fuzz2|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release fuzz2|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release fuzz3|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release fuzz3|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\test\fuzz\fuzz2.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug fuzz3|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug fuzz3|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release fuzz3|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release fuzz3|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\test\fuzz\fuzz3.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug fuzz2|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug fuzz2|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release fuzz2|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release fuzz2|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\test\fuzz\fuzz_common.c" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -5,14 +5,23 @@
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{6CCABAA4-F86F-4119-AFF8-43C9A4A234C2}</ProjectGuid>
|
||||
<RootNamespace>lwip_unittests</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
@@ -21,26 +30,49 @@
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
@@ -59,6 +91,26 @@
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\check;..\..\..\..\..\check\src;..\..\..\..\test\unit;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_LIB;WIN32;_DEBUG;LWIP_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4820</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
@@ -82,6 +134,26 @@
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>..\check;..\..\..\..\..\check\src;..\..\..\..\test\unit;..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\..\test\unit\api\test_sockets.c" />
|
||||
<ClCompile Include="..\..\..\..\test\unit\arch\sys_arch.c" />
|
||||
|
||||
@@ -5,10 +5,18 @@
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\..\src\apps\http\makefsdata\makefsdata.c" />
|
||||
@@ -17,6 +25,7 @@
|
||||
<ProjectGuid>{0BFC0F21-8E84-4E68-A9E1-CE2A09B72F6D}</ProjectGuid>
|
||||
<RootNamespace>makefsdata</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
@@ -25,27 +34,45 @@
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
<IntDir>$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
@@ -70,6 +97,27 @@
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..\..\..\examples\example_app;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
@@ -95,6 +143,30 @@
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\src\include;..\..\..\..\src\include\ipv4;..\..\..\..\src\include\ipv6;..\include;..\..\..\examples\example_app;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
||||
@@ -679,12 +679,17 @@ pcapif_shutdown(struct netif *netif)
|
||||
#endif /* PCAPIF_RX_USE_THREAD */
|
||||
if (pa->adapter) {
|
||||
pcap_breakloop(pa->adapter);
|
||||
pcap_close(pa->adapter);
|
||||
}
|
||||
#if PCAPIF_RX_USE_THREAD
|
||||
/* wait for rxthread to end */
|
||||
while(pa->rx_running);
|
||||
while (pa->rx_running) {
|
||||
Sleep(100);
|
||||
}
|
||||
#endif /* PCAPIF_RX_USE_THREAD */
|
||||
if (pa->adapter) {
|
||||
pcap_close(pa->adapter);
|
||||
pa->adapter = NULL;
|
||||
}
|
||||
#if PCAPIF_HANDLE_LINKSTATE
|
||||
pcapifh_linkstate_close(pa->link_state);
|
||||
#endif /* PCAPIF_HANDLE_LINKSTATE */
|
||||
|
||||
@@ -115,7 +115,7 @@ pcapifh_free_readonly_mem(void *data)
|
||||
}
|
||||
|
||||
/**
|
||||
* Npcap keeps its DLLs in a different directory for compatiblity with winpcap.
|
||||
* Npcap keeps its DLLs in a different directory for compatibility with winpcap.
|
||||
* Make sure they get found by adding that directory to the DLL search path.
|
||||
*/
|
||||
void pcapifh_init_npcap(void)
|
||||
|
||||
@@ -38,7 +38,7 @@ PROJECT_NAME = "lwIP"
|
||||
# could be handy for archiving the generated documentation or if some version
|
||||
# control system is used.
|
||||
|
||||
PROJECT_NUMBER = "2.2.0.rc1"
|
||||
PROJECT_NUMBER = "2.2.2.dev"
|
||||
|
||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||
# for a project that appears at the top of each page and should give viewer a
|
||||
|
||||
@@ -92,9 +92,9 @@ If this call returns successfully, the following queries will be answered:
|
||||
LWIP_ERROR("mdns add service txt failed\n", (res == ERR_OK), return);
|
||||
}
|
||||
|
||||
Since a hostname struct is used for TXT storage each single item can be max
|
||||
63 bytes long, and the total max length (including length bytes for each
|
||||
item) is 255 bytes.
|
||||
Each item is encoded as a length byte followed by the data, so each single
|
||||
item can be max 255 bytes long, and the total max length (including length
|
||||
bytes for each item) is defined by MDNS_TXT_RDATA_MAXLEN (default 255).
|
||||
|
||||
If your device runs a webserver on port 80, an example call might be:
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ Archive the current directory using tar, gzip'd, bzip2'd and zip'd.
|
||||
tar cjvf lwip-1.4.1.tar.bz2 lwip-1.4.1
|
||||
zip -r lwip-1.4.1.zip lwip-1.4.1
|
||||
|
||||
Alterntively, archive the current directory using git
|
||||
Alternatively, archive the current directory using git
|
||||
git archive -o lwip-1.4.1.tar.gz --prefix lwip-1.4.1/ STABLE-1_4_1
|
||||
|
||||
Now, sign the archives with a detached GPG binary signature as follows:
|
||||
|
||||
5
package.json
Normal file
5
package.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "library-lwip",
|
||||
"version": "2.2.0-bdk",
|
||||
"description": "lwIP - A Lightweight TCPIP stack"
|
||||
}
|
||||
110
port/arch/cc.h
Normal file
110
port/arch/cc.h
Normal file
@@ -0,0 +1,110 @@
|
||||
/*
|
||||
* cc.h - Architecture environment, some compiler specific, some
|
||||
* environment specific (probably should move env stuff
|
||||
* to sys_arch.h.)
|
||||
*
|
||||
* Typedefs for the types used by lwip -
|
||||
* u8_t, s8_t, u16_t, s16_t, u32_t, s32_t, mem_ptr_t
|
||||
*
|
||||
* Compiler hints for packing lwip's structures -
|
||||
* PACK_STRUCT_FIELD(x)
|
||||
* PACK_STRUCT_STRUCT
|
||||
* PACK_STRUCT_BEGIN
|
||||
* PACK_STRUCT_END
|
||||
*
|
||||
* Platform specific diagnostic output -
|
||||
* LWIP_PLATFORM_DIAG(x) - non-fatal, print a message.
|
||||
* LWIP_PLATFORM_ASSERT(x) - fatal, print message and abandon execution.
|
||||
* Portability defines for printf formatters:
|
||||
* U16_F, S16_F, X16_F, U32_F, S32_F, X32_F, SZT_F
|
||||
*
|
||||
* "lightweight" synchronization mechanisms -
|
||||
* SYS_ARCH_DECL_PROTECT(x) - declare a protection state variable.
|
||||
* SYS_ARCH_PROTECT(x) - enter protection mode.
|
||||
* SYS_ARCH_UNPROTECT(x) - leave protection mode.
|
||||
*
|
||||
* If the compiler does not provide memset() this file must include a
|
||||
* definition of it, or include a file which defines it.
|
||||
*
|
||||
* This file must either include a system-local <errno.h> which defines
|
||||
* the standard *nix error codes, or it should #define LWIP_PROVIDE_ERRNO
|
||||
* to make lwip/arch.h define the codes which are used throughout.
|
||||
*/
|
||||
|
||||
#ifndef __CC_H__
|
||||
#define __CC_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
/*
|
||||
* Typedefs for the types used by lwip -
|
||||
* u8_t, s8_t, u16_t, s16_t, u32_t, s32_t, mem_ptr_t
|
||||
*/
|
||||
typedef unsigned char u8_t; /* Unsigned 8 bit quantity */
|
||||
typedef signed char s8_t; /* Signed 8 bit quantity */
|
||||
typedef unsigned short u16_t; /* Unsigned 16 bit quantity */
|
||||
typedef signed short s16_t; /* Signed 16 bit quantity */
|
||||
typedef unsigned long u32_t; /* Unsigned 32 bit quantity */
|
||||
typedef signed long s32_t; /* Signed 32 bit quantity */
|
||||
//typedef unsigned long mem_ptr_t; /* Unsigned 32 bit quantity */
|
||||
typedef int intptr_t;
|
||||
typedef unsigned int uintptr_t;
|
||||
typedef int sys_prot_t;
|
||||
|
||||
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#define PACK_STRUCT_BEGIN
|
||||
#define PACK_STRUCT_STRUCT __attribute__((packed))
|
||||
#define PACK_STRUCT_FIELD(x) x
|
||||
#elif defined(__ICCARM__)
|
||||
#define PACK_STRUCT_BEGIN __packed
|
||||
#define PACK_STRUCT_STRUCT
|
||||
#define PACK_STRUCT_FIELD(x) x
|
||||
#else
|
||||
#define PACK_STRUCT_BEGIN
|
||||
#define PACK_STRUCT_STRUCT
|
||||
#define PACK_STRUCT_FIELD(x) x
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Platform specific diagnostic output -
|
||||
* LWIP_PLATFORM_DIAG(x) - non-fatal, print a message.
|
||||
* LWIP_PLATFORM_ASSERT(x) - fatal, print message and abandon execution.
|
||||
* Portability defines for printf formatters:
|
||||
* U16_F, S16_F, X16_F, U32_F, S32_F, X32_F, SZT_F
|
||||
*/
|
||||
#ifndef LWIP_PLATFORM_ASSERT
|
||||
#define LWIP_PLATFORM_ASSERT(x) \
|
||||
do \
|
||||
{ printf("Assertion \"%s\" failed at line %d in %s\n", x, __LINE__, __FILE__); \
|
||||
} while(0)
|
||||
#endif
|
||||
|
||||
#ifndef LWIP_PLATFORM_DIAG
|
||||
#define LWIP_PLATFORM_DIAG(x) do {printf x ;} while(0)
|
||||
#endif
|
||||
|
||||
#define U16_F "4d"
|
||||
#define S16_F "4d"
|
||||
#define X16_F "4x"
|
||||
#define U32_F "8ld"
|
||||
#define S32_F "8ld"
|
||||
#define X32_F "8lx"
|
||||
|
||||
/*
|
||||
* unknow defination
|
||||
*/
|
||||
// cup byte order
|
||||
#ifndef BYTE_ORDER
|
||||
#define BYTE_ORDER LITTLE_ENDIAN
|
||||
#endif
|
||||
|
||||
extern int bk_rand(); /* FIXME: move to right place */
|
||||
|
||||
#define LWIP_RAND() ((uint32_t)bk_rand())
|
||||
#endif
|
||||
// eof
|
||||
|
||||
60
port/arch/sys_arch.h
Normal file
60
port/arch/sys_arch.h
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright (c) 2001-2003 Swedish Institute of Computer Science.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
|
||||
* SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
* OF SUCH DAMAGE.
|
||||
*
|
||||
* This file is part of the lwIP TCP/IP stack.
|
||||
*
|
||||
* Author: Adam Dunkels <adam@sics.se>
|
||||
*
|
||||
*/
|
||||
#ifndef __SYS_RTXC_H__
|
||||
#define __SYS_RTXC_H__
|
||||
|
||||
#include <FreeRTOS.h>
|
||||
#include <queue.h>
|
||||
#include <semphr.h>
|
||||
#include <task.h>
|
||||
|
||||
#define SYS_MBOX_NULL (xQueueHandle)0
|
||||
#define SYS_SEM_NULL (xSemaphoreHandle)0
|
||||
#define SYS_DEFAULT_THREAD_STACK_DEPTH configMINIMAL_STACK_SIZE
|
||||
|
||||
typedef xSemaphoreHandle sys_sem_t;
|
||||
typedef xQueueHandle sys_mbox_t;
|
||||
typedef xTaskHandle sys_thread_t;
|
||||
typedef void * sys_mutex_t;
|
||||
|
||||
typedef struct _sys_arch_state_t
|
||||
{
|
||||
// Task creation data.
|
||||
char cTaskName[configMAX_TASK_NAME_LEN];
|
||||
unsigned short nStackDepth;
|
||||
unsigned short nTaskCount;
|
||||
} sys_arch_state_t;
|
||||
|
||||
/* Message queue constants. */
|
||||
#define archMESG_QUEUE_LENGTH ( 32 )
|
||||
#endif /* __SYS_RTXC_H__ */
|
||||
|
||||
353
port/ethernetif.c
Normal file
353
port/ethernetif.c
Normal file
@@ -0,0 +1,353 @@
|
||||
/**
|
||||
* @file
|
||||
* Ethernet Interface Skeleton
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001-2004 Swedish Institute of Computer Science.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
|
||||
* SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
* OF SUCH DAMAGE.
|
||||
*
|
||||
* This file is part of the lwIP TCP/IP stack.
|
||||
*
|
||||
* Author: Adam Dunkels <adam@sics.se>
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file is a skeleton for developing Ethernet network interface
|
||||
* drivers for lwIP. Add code to the low_level functions and do a
|
||||
* search-and-replace for the word "ethernetif" to replace it with
|
||||
* something that better describes your network interface.
|
||||
*/
|
||||
|
||||
#include "include.h"
|
||||
|
||||
#include "lwip/opt.h"
|
||||
#include "lwip/def.h"
|
||||
#include "lwip/mem.h"
|
||||
#include "lwip/pbuf.h"
|
||||
#include "lwip/sys.h"
|
||||
#include <lwip/stats.h>
|
||||
#include <lwip/snmp.h>
|
||||
#include "lwip/ethip6.h"
|
||||
#include "ethernetif.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "netif/etharp.h"
|
||||
|
||||
#include "lwip_netif_address.h"
|
||||
|
||||
#include "sa_station.h"
|
||||
|
||||
#include "drv_model_pub.h"
|
||||
#include "mem_pub.h"
|
||||
#include "common.h"
|
||||
|
||||
#include "hostapd_cfg.h"
|
||||
|
||||
#include "sk_intf.h"
|
||||
#include "rw_pub.h"
|
||||
#include "rtos_pub.h"
|
||||
#include "param_config.h"
|
||||
|
||||
/* Define those to better describe your network interface. */
|
||||
#define IFNAME0 'e'
|
||||
#define IFNAME1 'n'
|
||||
|
||||
#include "uart_pub.h"
|
||||
|
||||
#define ETH_INTF_DEBUG
|
||||
#ifdef ETH_INTF_DEBUG
|
||||
#define ETH_INTF_PRT warning_prf
|
||||
#define ETH_INTF_WARN warning_prf
|
||||
#define ETH_INTF_FATAL fatal_prf
|
||||
#else
|
||||
#define ETH_INTF_PRT null_prf
|
||||
#define ETH_INTF_WARN null_prf
|
||||
#define ETH_INTF_FATAL null_prf
|
||||
#endif
|
||||
|
||||
extern int bmsg_tx_sender(struct pbuf *p, uint32_t vif_idx);
|
||||
|
||||
/* Forward declarations. */
|
||||
void ethernetif_input(int iface, struct pbuf *p);
|
||||
|
||||
/**
|
||||
* In this function, the hardware should be initialized.
|
||||
* Called from ethernetif_init().
|
||||
*
|
||||
* @param netif the already initialized lwip network interface structure
|
||||
* for this ethernetif
|
||||
*/
|
||||
|
||||
const char wlan_name[][6] =
|
||||
{
|
||||
"wlan0\0",
|
||||
"wlan1\0",
|
||||
"wlan2\0",
|
||||
"wlan3\0",
|
||||
};
|
||||
static void low_level_init(struct netif *netif)
|
||||
{
|
||||
VIF_INF_PTR vif_entry = (VIF_INF_PTR)(netif->state);
|
||||
u8 *macptr = (u8*)&vif_entry->mac_addr;
|
||||
|
||||
#if LWIP_NETIF_HOSTNAME
|
||||
/* Initialize interface hostname */
|
||||
netif->hostname = (char*)&wlan_name[vif_entry->index];
|
||||
#endif /* LWIP_NETIF_HOSTNAME */
|
||||
|
||||
//wifi_get_mac_address((char *)wireless_mac, type);
|
||||
|
||||
/* set MAC hardware address length */
|
||||
ETH_INTF_PRT("enter low level!\r\n");
|
||||
ETH_INTF_PRT("mac %2x:%2x:%2x:%2x:%2x:%2x\r\n", macptr[0], macptr[1], macptr[2],
|
||||
macptr[3], macptr[4], macptr[5]);
|
||||
|
||||
netif->hwaddr_len = ETHARP_HWADDR_LEN;
|
||||
os_memcpy(netif->hwaddr, macptr, ETHARP_HWADDR_LEN);
|
||||
/* maximum transfer unit */
|
||||
netif->mtu = 1500;
|
||||
/* device capabilities */
|
||||
/* don't set NETIF_FLAG_ETHARP if this device is not an ethernet one */
|
||||
netif->flags = NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP | NETIF_FLAG_LINK_UP;
|
||||
#ifdef CONFIG_IPV6
|
||||
netif->flags |= NETIF_FLAG_MLD6;
|
||||
#endif
|
||||
ETH_INTF_PRT("leave low level!\r\n");
|
||||
}
|
||||
|
||||
/**
|
||||
* This function should do the actual transmission of the packet. The packet is
|
||||
* contained in the pbuf that is passed to the function. This pbuf
|
||||
* might be chained.
|
||||
*
|
||||
* @param netif the lwip network interface structure for this ethernetif
|
||||
* @param p the MAC packet to send (e.g. IP packet including MAC addresses and type)
|
||||
* @return ERR_OK if the packet could be sent
|
||||
* an err_t value if the packet couldn't be sent
|
||||
*
|
||||
* @note Returning ERR_MEM here if a DMA queue of your MAC is full can lead to
|
||||
* strange results. You might consider waiting for space in the DMA queue
|
||||
* to become availale since the stack doesn't retry to send a packet
|
||||
* dropped because of memory failure (except for the TCP timers).
|
||||
*/
|
||||
static err_t low_level_output(struct netif *netif, struct pbuf *p)
|
||||
{
|
||||
int ret;
|
||||
err_t err = ERR_OK;
|
||||
uint8_t vif_idx = rwm_mgmt_get_netif2vif(netif);
|
||||
|
||||
//os_printf("output:%x\r\n", p);
|
||||
ret = bmsg_tx_sender(p, (uint32_t)vif_idx);
|
||||
if(0 != ret)
|
||||
{
|
||||
err = ERR_TIMEOUT;
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function should be called when a packet is ready to be read
|
||||
* from the interface. It uses the function low_level_input() that
|
||||
* should handle the actual reception of bytes from the network
|
||||
* interface. Then the type of the received packet is determined and
|
||||
* the appropriate input function is called.
|
||||
*
|
||||
* @param netif the lwip network interface structure for this ethernetif
|
||||
*/
|
||||
void
|
||||
ethernetif_input(int iface, struct pbuf *p)
|
||||
{
|
||||
struct eth_hdr *ethhdr;
|
||||
struct netif *netif;
|
||||
|
||||
if (p->len <= SIZEOF_ETH_HDR) {
|
||||
pbuf_free(p);
|
||||
return;
|
||||
}
|
||||
|
||||
netif = rwm_mgmt_get_vif2netif((uint8_t)iface);
|
||||
if(!netif) {
|
||||
//ETH_INTF_PRT("ethernetif_input no netif found %d\r\n", iface);
|
||||
pbuf_free(p);
|
||||
p = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
/* points to packet payload, which starts with an Ethernet header */
|
||||
ethhdr = p->payload;
|
||||
|
||||
/* Ignore our own multicast packets when they come back from the AP */
|
||||
if ((ethhdr->dest.addr[0] & 0x01) /* multicast */ &&
|
||||
!memcmp(ethhdr->src.addr, netif->hwaddr, ETH_HWADDR_LEN)) {
|
||||
pbuf_free(p);
|
||||
p = NULL;
|
||||
return;
|
||||
}
|
||||
switch (htons(ethhdr->type))
|
||||
{
|
||||
/* IP or ARP packet? */
|
||||
case ETHTYPE_IP:
|
||||
case ETHTYPE_ARP:
|
||||
case ETHTYPE_IPV6:
|
||||
#if PPPOE_SUPPORT
|
||||
/* PPPoE packet? */
|
||||
case ETHTYPE_PPPOEDISC:
|
||||
case ETHTYPE_PPPOE:
|
||||
#endif /* PPPOE_SUPPORT */
|
||||
/* full packet send to tcpip_thread to process */
|
||||
if (netif->input(p, netif) != ERR_OK) // ethernet_input
|
||||
{
|
||||
LWIP_DEBUGF(NETIF_DEBUG, ("ethernetif_input: IP input error\r\n"));
|
||||
pbuf_free(p);
|
||||
p = NULL;
|
||||
}
|
||||
break;
|
||||
|
||||
case ETH_P_EAPOL:
|
||||
ke_l2_packet_tx(p->payload, p->len, iface);
|
||||
pbuf_free(p);
|
||||
p = NULL;
|
||||
break;
|
||||
|
||||
default:
|
||||
pbuf_free(p);
|
||||
p = NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Should be called at the beginning of the program to set up the
|
||||
* network interface. It calls the function low_level_init() to do the
|
||||
* actual setup of the hardware.
|
||||
*
|
||||
* This function should be passed as a parameter to netif_add().
|
||||
*
|
||||
* @param netif the lwip network interface structure for this ethernetif
|
||||
* @return ERR_OK if the loopif is initialized
|
||||
* ERR_MEM if private data couldn't be allocated
|
||||
* any other err_t on error
|
||||
*/
|
||||
err_t
|
||||
ethernetif_init(struct netif *netif)
|
||||
{
|
||||
LWIP_ASSERT("netif != NULL", (netif != NULL));
|
||||
|
||||
/*
|
||||
* Initialize the snmp variables and counters inside the struct netif.
|
||||
* The last argument should be replaced with your link speed, in units
|
||||
* of bits per second.
|
||||
*/
|
||||
NETIF_INIT_SNMP(netif, snmp_ifType_ethernet_csmacd, 10000000);
|
||||
|
||||
netif->name[0] = IFNAME0;
|
||||
netif->name[1] = IFNAME1;
|
||||
/* We directly use etharp_output() here to save a function call.
|
||||
* You can instead declare your own function an call etharp_output()
|
||||
* from it if you have to do some checks before sending (e.g. if link
|
||||
* is available...) */
|
||||
netif->output = etharp_output;
|
||||
netif->linkoutput = low_level_output;
|
||||
#ifdef CONFIG_IPV6
|
||||
netif->output_ip6 = ethip6_output;
|
||||
#endif
|
||||
|
||||
/* initialize the hardware */
|
||||
low_level_init(netif);
|
||||
|
||||
return ERR_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* Should be called at the beginning of the program to set up the
|
||||
* network interface. It calls the function low_level_init() to do the
|
||||
* actual setup of the hardware.
|
||||
*
|
||||
* This function should be passed as a parameter to netifapi_netif_add().
|
||||
*
|
||||
* @param netif the lwip network interface structure for this ethernetif
|
||||
* @return ERR_OK if the loopif is initialized
|
||||
* ERR_MEM if private data couldn't be allocated
|
||||
* any other err_t on error
|
||||
*/
|
||||
err_t lwip_netif_init(struct netif *netif)
|
||||
{
|
||||
LWIP_ASSERT("netif != NULL", (netif != NULL));
|
||||
|
||||
/*
|
||||
* Initialize the snmp variables and counters inside the struct netif.
|
||||
* The last argument should be replaced with your link speed, in units
|
||||
* of bits per second.
|
||||
*/
|
||||
NETIF_INIT_SNMP(netif, snmp_ifType_ethernet_csmacd, 10000000);
|
||||
|
||||
netif->name[0] = IFNAME0;
|
||||
netif->name[1] = IFNAME1;
|
||||
/* We directly use etharp_output() here to save a function call.
|
||||
* You can instead declare your own function an call etharp_output()
|
||||
* from it if you have to do some checks before sending (e.g. if link
|
||||
* is available...) */
|
||||
netif->output = etharp_output;
|
||||
netif->linkoutput = low_level_output;
|
||||
#ifdef CONFIG_IPV6
|
||||
netif->output_ip6 = ethip6_output;
|
||||
#endif
|
||||
|
||||
/* initialize the hardware */
|
||||
low_level_init(netif);
|
||||
return ERR_OK;
|
||||
}
|
||||
|
||||
err_t lwip_netif_uap_init(struct netif *netif)
|
||||
{
|
||||
LWIP_ASSERT("netif != NULL", (netif != NULL));
|
||||
|
||||
//netif->state = NULL;
|
||||
netif->name[0] = 'u';
|
||||
netif->name[1] = 'a';
|
||||
/* We directly use etharp_output() here to save a function call.
|
||||
* You can instead declare your own function an call etharp_output()
|
||||
* from it if you have to do some checks before sending (e.g. if link
|
||||
* is available...) */
|
||||
netif->output = etharp_output;
|
||||
netif->linkoutput = low_level_output;
|
||||
#ifdef CONFIG_IPV6
|
||||
netif->output_ip6 = ethip6_output;
|
||||
#endif
|
||||
|
||||
/* initialize the hardware */
|
||||
low_level_init(netif);
|
||||
|
||||
return ERR_OK;
|
||||
}
|
||||
|
||||
// eof
|
||||
13
port/ethernetif.h
Normal file
13
port/ethernetif.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#ifndef __ETHERNETIF_H__
|
||||
#define __ETHERNETIF_H__
|
||||
|
||||
|
||||
#include "lwip/err.h"
|
||||
#include "lwip/netif.h"
|
||||
|
||||
|
||||
void ethernetif_recv(struct netif *netif, int total_len);
|
||||
err_t ethernetif_init(struct netif *netif);
|
||||
|
||||
|
||||
#endif
|
||||
17
port/lwip_intf.h
Normal file
17
port/lwip_intf.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#ifndef __LWIP_INTF_H__
|
||||
#define __LWIP_INTF_H__
|
||||
|
||||
#define LWIP_INTF_DEBUG
|
||||
#ifdef LWIP_INTF_DEBUG
|
||||
#define LWIP_INTF_PRT warning_prf
|
||||
#define LWIP_INTF_WARN warning_prf
|
||||
#define LWIP_INTF_FATAL fatal_prf
|
||||
#else
|
||||
#define LWIP_INTF_PRT null_prf
|
||||
#define LWIP_INTF_WARN null_prf
|
||||
#define LWIP_INTF_FATAL null_prf
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// eof
|
||||
|
||||
59
port/lwip_netif_address.h
Normal file
59
port/lwip_netif_address.h
Normal file
@@ -0,0 +1,59 @@
|
||||
#ifndef _MXCHIP_NETIF_ADDR_H_
|
||||
#define _MXCHIP_NETIF_ADDR_H_
|
||||
|
||||
/** MLAN BSS type */
|
||||
typedef enum _wifi_interface_type
|
||||
{
|
||||
WIFI_INTERFACE_TYPE_STA = 0,
|
||||
WIFI_INTERFACE_TYPE_UAP = 1,
|
||||
|
||||
WIFI_INTERFACE_TYPE_ANY = 0xff,
|
||||
} wifi_interface_type;
|
||||
|
||||
#define ADDR_TYPE_STATIC 1
|
||||
#define ADDR_TYPE_DHCP 0
|
||||
|
||||
/** This data structure represents an IPv4 address */
|
||||
struct ipv4_config {
|
||||
/** DHCP_Disable DHCP_Client DHCP_Server */
|
||||
unsigned addr_type;
|
||||
/** The system's IP address in network order. */
|
||||
unsigned address;
|
||||
/** The system's default gateway in network order. */
|
||||
unsigned gw;
|
||||
/** The system's subnet mask in network order. */
|
||||
unsigned netmask;
|
||||
/** The system's primary dns server in network order. */
|
||||
unsigned dns1;
|
||||
/** The system's secondary dns server in network order. */
|
||||
unsigned dns2;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_IPV6
|
||||
struct ipv6_config
|
||||
{
|
||||
/** The system's IPv6 address in network order. */
|
||||
uint32_t addr[4];
|
||||
/** The address type: linklocal, site-local or global. */
|
||||
unsigned char addr_type;
|
||||
/** The state of IPv6 address (Tentative, Preferred, etc). */
|
||||
unsigned char addr_state;
|
||||
};
|
||||
#endif
|
||||
/** Network IP configuration.
|
||||
*
|
||||
* This data structure represents the network IP configuration
|
||||
* for IPv4 as well as IPv6 addresses
|
||||
*/
|
||||
struct wlan_ip_config {
|
||||
#ifdef CONFIG_IPV6
|
||||
/** The network IPv6 address configuration that should be
|
||||
* associated with this interface. */
|
||||
struct ipv6_config ipv6[LWIP_IPV6_NUM_ADDRESSES];
|
||||
#endif
|
||||
/** The network IPv4 address configuration that should be
|
||||
* associated with this interface. */
|
||||
struct ipv4_config ipv4;
|
||||
};
|
||||
|
||||
#endif
|
||||
462
port/lwipopts.h
Normal file
462
port/lwipopts.h
Normal file
@@ -0,0 +1,462 @@
|
||||
/*
|
||||
* Copyright (c) 2001-2003 Swedish Institute of Computer Science.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
|
||||
* SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
* OF SUCH DAMAGE.
|
||||
*
|
||||
* This file is part of the lwIP TCP/IP stack.
|
||||
*
|
||||
* Author: Adam Dunkels <adam@sics.se>
|
||||
*
|
||||
*/
|
||||
#ifndef __LWIPOPTS_H__
|
||||
#define __LWIPOPTS_H__
|
||||
|
||||
#include "sys_config.h"
|
||||
|
||||
/**
|
||||
* Loopback demo related options.
|
||||
*/
|
||||
#define LWIP_NETIF_LOOPBACK 1
|
||||
#define LWIP_HAVE_LOOPIF 1
|
||||
#define LWIP_NETIF_LOOPBACK_MULTITHREADING 1
|
||||
#define LWIP_LOOPBACK_MAX_PBUFS 8
|
||||
|
||||
#define TCPIP_THREAD_NAME "tcp/ip"
|
||||
#define TCPIP_THREAD_STACKSIZE 512
|
||||
#define TCPIP_THREAD_PRIO 7
|
||||
|
||||
#define DEFAULT_THREAD_STACKSIZE 200
|
||||
#define DEFAULT_THREAD_PRIO 1
|
||||
|
||||
/* Disable lwIP asserts */
|
||||
#define LWIP_NOASSERT 1
|
||||
|
||||
#define LWIP_DEBUG 0
|
||||
#define LWIP_DEBUG_TRACE 0
|
||||
#define SOCKETS_DEBUG LWIP_DBG_OFF
|
||||
#define IP_DEBUG LWIP_DBG_OFF
|
||||
#define ETHARP_DEBUG LWIP_DBG_OFF
|
||||
#define NETIF_DEBUG LWIP_DBG_OFF
|
||||
#define PBUF_DEBUG LWIP_DBG_OFF
|
||||
#define MEMP_DEBUG LWIP_DBG_OFF
|
||||
#define API_LIB_DEBUG LWIP_DBG_OFF
|
||||
#define API_MSG_DEBUG LWIP_DBG_OFF
|
||||
#define ICMP_DEBUG LWIP_DBG_OFF
|
||||
#define IGMP_DEBUG LWIP_DBG_OFF
|
||||
#define INET_DEBUG LWIP_DBG_OFF
|
||||
#define IP_REASS_DEBUG LWIP_DBG_OFF
|
||||
#define RAW_DEBUG LWIP_DBG_OFF
|
||||
#define MEM_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_OFF
|
||||
#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
|
||||
|
||||
//#define LWIP_COMPAT_MUTEX 1
|
||||
/**
|
||||
* 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 1
|
||||
|
||||
/*
|
||||
------------------------------------
|
||||
---------- Memory options ----------
|
||||
------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* MEM_ALIGNMENT: should be set to the alignment of the CPU
|
||||
* 4 byte alignment -> #define MEM_ALIGNMENT 4
|
||||
* 2 byte alignment -> #define MEM_ALIGNMENT 2
|
||||
*/
|
||||
#define MEM_ALIGNMENT 4
|
||||
|
||||
#define MAX_SOCKETS_TCP 12
|
||||
#define MAX_LISTENING_SOCKETS_TCP 4
|
||||
#define MAX_SOCKETS_UDP 22
|
||||
#define TCP_SND_BUF_COUNT 5
|
||||
|
||||
/* Value of TCP_SND_BUF_COUNT denotes the number of buffers and is set by
|
||||
* CONFIG option available in the SDK
|
||||
*/
|
||||
/* Buffer size needed for TCP: Max. number of TCP sockets * Size of pbuf *
|
||||
* Max. number of TCP sender buffers per socket
|
||||
*
|
||||
* Listening sockets for TCP servers do not require the same amount buffer
|
||||
* space. Hence do not consider these sockets for memory computation
|
||||
*/
|
||||
#define TCP_MEM_SIZE (MAX_SOCKETS_TCP * \
|
||||
PBUF_POOL_BUFSIZE * (TCP_SND_BUF/TCP_MSS))
|
||||
|
||||
/* Buffer size needed for UDP: Max. number of UDP sockets * Size of pbuf
|
||||
*/
|
||||
#define UDP_MEM_SIZE (MAX_SOCKETS_UDP * PBUF_POOL_BUFSIZE)
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
#if ((defined(CFG_LWIP_MEM_POLICY))&&(CFG_LWIP_MEM_POLICY == LWIP_REDUCE_THE_PLAN))
|
||||
#define MEM_SIZE (16*1024)
|
||||
#else
|
||||
#define MEM_SIZE (32*1024)
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
------------------------------------------------
|
||||
---------- Internal Memory Pool Sizes ----------
|
||||
------------------------------------------------
|
||||
*/
|
||||
/**
|
||||
* MEMP_NUM_PBUF: the number of memp struct pbufs (used for PBUF_ROM and PBUF_REF).
|
||||
* 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_TCP_PCB: the number of simulatenously active TCP connections.
|
||||
* (requires the LWIP_TCP option)
|
||||
*/
|
||||
#define MEMP_NUM_TCP_PCB MAX_SOCKETS_TCP
|
||||
|
||||
#define MEMP_NUM_TCP_PCB_LISTEN MAX_LISTENING_SOCKETS_TCP
|
||||
|
||||
/**
|
||||
* MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP segments.
|
||||
* (requires the LWIP_TCP option)
|
||||
*/
|
||||
//#define MEMP_NUM_TCP_SEG 12
|
||||
|
||||
/**
|
||||
* MEMP_NUM_TCPIP_MSG_INPKT: the number of struct tcpip_msg, which are used
|
||||
* for incoming packets.
|
||||
* (only needed if you use tcpip.c)
|
||||
*/
|
||||
|
||||
#define MEMP_NUM_TCPIP_MSG_INPKT 16
|
||||
|
||||
/**
|
||||
* MEMP_NUM_SYS_TIMEOUT: the number of simulateously active timeouts.
|
||||
* (requires NO_SYS==0)
|
||||
*/
|
||||
#define MEMP_NUM_SYS_TIMEOUT LWIP_NUM_SYS_TIMEOUT_INTERNAL + 10
|
||||
|
||||
/**
|
||||
* MEMP_NUM_NETBUF: the number of struct netbufs.
|
||||
* (only needed if you use the sequential API, like api_lib.c)
|
||||
*/
|
||||
|
||||
#define MEMP_NUM_NETBUF 16
|
||||
|
||||
/**
|
||||
* MEMP_NUM_NETCONN: the number of struct netconns.
|
||||
* (only needed if you use the sequential API, like api_lib.c)
|
||||
*
|
||||
* This number corresponds to the maximum number of active sockets at any
|
||||
* given point in time. This number must be sum of max. TCP sockets, max. TCP
|
||||
* sockets used for listening, and max. number of UDP sockets
|
||||
*/
|
||||
#define MEMP_NUM_NETCONN (MAX_SOCKETS_TCP + \
|
||||
MAX_LISTENING_SOCKETS_TCP + MAX_SOCKETS_UDP)
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* PBUF_POOL_SIZE: the number of buffers in the pbuf pool.
|
||||
*/
|
||||
#if ((defined(CFG_LWIP_MEM_POLICY))&&(CFG_LWIP_MEM_POLICY == LWIP_REDUCE_THE_PLAN))
|
||||
#define PBUF_POOL_SIZE 3
|
||||
#else
|
||||
#define PBUF_POOL_SIZE 10
|
||||
#endif
|
||||
|
||||
/*
|
||||
----------------------------------
|
||||
---------- Pbuf options ----------
|
||||
----------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. The default is
|
||||
* designed to accomodate single full size TCP frame in one pbuf, including
|
||||
* TCP_MSS, IP header, and link header.
|
||||
*/
|
||||
#define PBUF_POOL_BUFSIZE 1580
|
||||
|
||||
|
||||
/*
|
||||
---------------------------------
|
||||
---------- RAW options ----------
|
||||
---------------------------------
|
||||
*/
|
||||
/**
|
||||
* LWIP_RAW==1: Enable application layer to hook into the IP layer itself.
|
||||
*/
|
||||
#define LWIP_RAW 1
|
||||
#define LWIP_IPV4 1
|
||||
#ifdef CONFIG_IPV6
|
||||
#define LWIP_IPV6 1
|
||||
#endif
|
||||
|
||||
/* Enable IPv4 Auto IP */
|
||||
#ifdef CONFIG_AUTOIP
|
||||
#define LWIP_AUTOIP 1
|
||||
#define LWIP_DHCP_AUTOIP_COOP 1
|
||||
#define LWIP_DHCP_AUTOIP_COOP_TRIES 5
|
||||
#endif
|
||||
|
||||
/*
|
||||
------------------------------------
|
||||
---------- Socket options ----------
|
||||
------------------------------------
|
||||
*/
|
||||
/**
|
||||
* LWIP_SOCKET==1: Enable Socket API (require to use sockets.c)
|
||||
*/
|
||||
#define LWIP_SOCKET 1
|
||||
#define LWIP_NETIF_API 1
|
||||
|
||||
/**
|
||||
* LWIP_RECV_CB==1: Enable callback when a socket receives data.
|
||||
*/
|
||||
#define LWIP_RECV_CB 1
|
||||
/**
|
||||
* SO_REUSE==1: Enable SO_REUSEADDR option.
|
||||
*/
|
||||
#define SO_REUSE 1
|
||||
#define SO_REUSE_RXTOALL 1
|
||||
|
||||
/**
|
||||
* Enable TCP_KEEPALIVE
|
||||
*/
|
||||
#define LWIP_TCP_KEEPALIVE 1
|
||||
|
||||
/*
|
||||
----------------------------------------
|
||||
---------- Statistics options ----------
|
||||
----------------------------------------
|
||||
*/
|
||||
/**
|
||||
* LWIP_STATS==1: Enable statistics collection in lwip_stats.
|
||||
*/
|
||||
#define LWIP_STATS 1
|
||||
|
||||
/**
|
||||
* LWIP_STATS_DISPLAY==1: Compile in the statistics output functions.
|
||||
*/
|
||||
#define LWIP_STATS_DISPLAY 0
|
||||
|
||||
/*
|
||||
----------------------------------
|
||||
---------- DHCP options ----------
|
||||
----------------------------------
|
||||
*/
|
||||
/**
|
||||
* LWIP_DHCP==1: Enable DHCP module.
|
||||
*/
|
||||
#define LWIP_DHCP 1
|
||||
#define LWIP_NETIF_STATUS_CALLBACK 1
|
||||
|
||||
/**
|
||||
* DNS related options, revisit later to fine tune.
|
||||
*/
|
||||
#define LWIP_DNS 1
|
||||
#define DNS_TABLE_SIZE 2 // number of table entries, default 4
|
||||
//#define DNS_MAX_NAME_LENGTH 64 // max. name length, default 256
|
||||
#define DNS_MAX_SERVERS 2 // number of DNS servers, default 2
|
||||
#define DNS_DOES_NAME_CHECK 1 // compare received name with given,def 0
|
||||
#define DNS_MSG_SIZE 512
|
||||
#define MDNS_MSG_SIZE 512
|
||||
#define MDNS_TABLE_SIZE 1 // number of mDNS table entries
|
||||
#define MDNS_MAX_SERVERS 1 // number of mDNS multicast addresses
|
||||
/* TODO: Number of active UDP PCBs is equal to number of active UDP sockets plus
|
||||
* two. Need to find the users of these 2 PCBs
|
||||
*/
|
||||
#define MEMP_NUM_UDP_PCB (MAX_SOCKETS_UDP + 2)
|
||||
/* NOTE: some times the socket() call for SOCK_DGRAM might fail if you dont
|
||||
* have enough MEMP_NUM_UDP_PCB */
|
||||
|
||||
/*
|
||||
----------------------------------
|
||||
---------- IGMP options ----------
|
||||
----------------------------------
|
||||
*/
|
||||
/**
|
||||
* LWIP_IGMP==1: Turn on IGMP module.
|
||||
*/
|
||||
#define LWIP_IGMP 1
|
||||
|
||||
/**
|
||||
* LWIP_SO_SNDTIMEO==1: Enable send timeout for sockets/netconns and
|
||||
* SO_SNDTIMEO processing.
|
||||
*/
|
||||
#define LWIP_SO_SNDTIMEO 1
|
||||
|
||||
/**
|
||||
* LWIP_SO_RCVTIMEO==1: Enable receive timeout for sockets/netconns and
|
||||
* SO_RCVTIMEO processing.
|
||||
*/
|
||||
#define LWIP_SO_RCVTIMEO 1
|
||||
#define LWIP_SO_SNDTIMEO 1
|
||||
/**
|
||||
* TCP_LISTEN_BACKLOG==1: Handle backlog connections.
|
||||
*/
|
||||
#define TCP_LISTEN_BACKLOG 1
|
||||
#define LWIP_PROVIDE_ERRNO 1
|
||||
|
||||
#include <errno.h>
|
||||
#define ERRNO 1
|
||||
|
||||
//#define LWIP_SNMP 1
|
||||
|
||||
|
||||
/*
|
||||
------------------------------------------------
|
||||
---------- Network Interfaces options ----------
|
||||
------------------------------------------------
|
||||
*/
|
||||
/**
|
||||
* LWIP_NETIF_HOSTNAME==1: use DHCP_OPTION_HOSTNAME with netif's hostname
|
||||
* field.
|
||||
*/
|
||||
#define LWIP_NETIF_HOSTNAME 1
|
||||
|
||||
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
//#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
|
||||
|
||||
/**
|
||||
* TCP_RESOURCE_FAIL_RETRY_LIMIT: limit for retrying sending of tcp segment
|
||||
* on resource failure error returned by driver.
|
||||
*/
|
||||
#define TCP_RESOURCE_FAIL_RETRY_LIMIT 50
|
||||
|
||||
//#ifdef CONFIG_ENABLE_MXCHIP
|
||||
/* save memory */
|
||||
#if ((defined(CFG_LWIP_MEM_POLICY))&&(CFG_LWIP_MEM_POLICY == LWIP_REDUCE_THE_PLAN))
|
||||
#define TCP_MSS (1500 - 40)
|
||||
/* TCP receive window. */
|
||||
#define TCP_WND (3 * TCP_MSS)
|
||||
/* TCP sender buffer space (bytes). */
|
||||
#define TCP_SND_BUF (10*TCP_MSS)
|
||||
|
||||
#define TCP_SND_QUEUELEN (20)
|
||||
#else
|
||||
#define TCP_MSS (1500 - 40)
|
||||
/* TCP receive window. */
|
||||
#define TCP_WND (10*TCP_MSS)
|
||||
/* TCP sender buffer space (bytes). */
|
||||
#define TCP_SND_BUF (10*TCP_MSS)
|
||||
|
||||
#define TCP_SND_QUEUELEN (20)
|
||||
#endif
|
||||
|
||||
/* ARP before DHCP causes multi-second delay - turn it off */
|
||||
#define DHCP_DOES_ARP_CHECK (0)
|
||||
|
||||
#define TCP_MAX_ACCEPT_CONN 5
|
||||
#define MEMP_NUM_TCP_SEG (TCP_SND_QUEUELEN*2)
|
||||
|
||||
#define IP_REASS_MAX_PBUFS 0
|
||||
#define IP_REASSEMBLY 0
|
||||
#define IP_REASS_MAX_PBUFS 0
|
||||
#define IP_REASSEMBLY 0
|
||||
#define MEMP_NUM_REASSDATA 0
|
||||
#define IP_FRAG 0
|
||||
|
||||
#define MEM_LIBC_MALLOC (0)
|
||||
|
||||
#define DEFAULT_UDP_RECVMBOX_SIZE 3 //each udp socket max buffer 3 packets.
|
||||
|
||||
#define MEMP_MEM_MALLOC (0)
|
||||
#define TCP_MSL (TCP_TMR_INTERVAL)
|
||||
|
||||
#define LWIP_COMPAT_MUTEX_ALLOWED (1)
|
||||
|
||||
#define MEMP_STATS 1
|
||||
#define MEM_STATS 1
|
||||
|
||||
#define LWIP_DONT_PROVIDE_BYTEORDER_FUNCTIONS
|
||||
|
||||
#define ETHARP_SUPPORT_STATIC_ENTRIES 1
|
||||
|
||||
#define LWIP_RIPPLE20 1
|
||||
|
||||
/* Beken specific LWIP options */
|
||||
#define BK_DHCP 1
|
||||
|
||||
#endif /* __LWIPOPTS_H__ */
|
||||
|
||||
702
port/net.c
Normal file
702
port/net.c
Normal file
@@ -0,0 +1,702 @@
|
||||
#include "include.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <lwip/inet.h>
|
||||
#include "netif/etharp.h"
|
||||
#include "lwip/netif.h"
|
||||
#include <lwip/netifapi.h>
|
||||
#include <lwip/tcpip.h>
|
||||
#include <lwip/dns.h>
|
||||
#include <lwip/dhcp.h>
|
||||
#include "lwip/prot/dhcp.h"
|
||||
|
||||
#include <lwip/sockets.h>
|
||||
#include "ethernetif.h"
|
||||
|
||||
#include "sa_station.h"
|
||||
#include "drv_model_pub.h"
|
||||
#include "mem_pub.h"
|
||||
#include "common.h"
|
||||
#include "rw_pub.h"
|
||||
#include "lwip_netif_address.h"
|
||||
#include "rtos_pub.h"
|
||||
#include "net.h"
|
||||
|
||||
#if CFG_ROLE_LAUNCH
|
||||
#include "role_launch.h"
|
||||
#endif
|
||||
|
||||
/* forward declaration */
|
||||
FUNC_1PARAM_PTR bk_wlan_get_status_cb(void);
|
||||
|
||||
struct ipv4_config sta_ip_settings;
|
||||
struct ipv4_config uap_ip_settings;
|
||||
static int up_iface;
|
||||
uint32_t sta_ip_start_flag = 0;
|
||||
uint32_t uap_ip_start_flag = 0;
|
||||
|
||||
#ifdef CONFIG_IPV6
|
||||
#define IPV6_ADDR_STATE_TENTATIVE "Tentative"
|
||||
#define IPV6_ADDR_STATE_PREFERRED "Preferred"
|
||||
#define IPV6_ADDR_STATE_INVALID "Invalid"
|
||||
#define IPV6_ADDR_STATE_VALID "Valid"
|
||||
#define IPV6_ADDR_STATE_DEPRECATED "Deprecated"
|
||||
#define IPV6_ADDR_TYPE_LINKLOCAL "Link-Local"
|
||||
#define IPV6_ADDR_TYPE_GLOBAL "Global"
|
||||
#define IPV6_ADDR_TYPE_UNIQUELOCAL "Unique-Local"
|
||||
#define IPV6_ADDR_TYPE_SITELOCAL "Site-Local"
|
||||
#define IPV6_ADDR_UNKNOWN "Unknown"
|
||||
#endif
|
||||
|
||||
#define net_e warning_prf
|
||||
#define net_d warning_prf
|
||||
|
||||
typedef void (*net_sta_ipup_cb_fn)(void* data);
|
||||
|
||||
struct interface {
|
||||
struct netif netif;
|
||||
ip4_addr_t ipaddr;
|
||||
ip4_addr_t nmask;
|
||||
ip4_addr_t gw;
|
||||
};
|
||||
FUNCPTR sta_connected_func;
|
||||
|
||||
static struct interface g_mlan = {{0}};
|
||||
static struct interface g_uap = {{0}};
|
||||
net_sta_ipup_cb_fn sta_ipup_cb = NULL;
|
||||
|
||||
extern void *net_get_sta_handle(void);
|
||||
extern void *net_get_uap_handle(void);
|
||||
extern err_t lwip_netif_init(struct netif *netif);
|
||||
extern err_t lwip_netif_uap_init(struct netif *netif);
|
||||
extern int net_get_if_ip_addr(uint32_t *ip, void *intrfc_handle);
|
||||
extern int net_get_if_ip_mask(uint32_t *nm, void *intrfc_handle);
|
||||
extern int net_configure_address(struct ipv4_config *addr, void *intrfc_handle);
|
||||
extern int dhcp_server_start(void *intrfc_handle);
|
||||
extern void dhcp_server_stop(void);
|
||||
extern void net_configure_dns(struct wlan_ip_config *ip);
|
||||
|
||||
int net_dhcp_hostname_set(char *hostname)
|
||||
{
|
||||
netif_set_hostname(&g_mlan.netif, hostname);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void net_ipv4stack_init(void)
|
||||
{
|
||||
static bool tcpip_init_done = 0;
|
||||
if (tcpip_init_done)
|
||||
return;
|
||||
|
||||
net_d("Initializing TCP/IP stack\r\n");
|
||||
tcpip_init(NULL, NULL);
|
||||
tcpip_init_done = true;
|
||||
}
|
||||
|
||||
void net_wlan_init(void)
|
||||
{
|
||||
static int wlan_init_done = 0;
|
||||
int ret;
|
||||
|
||||
if (!wlan_init_done) {
|
||||
net_ipv4stack_init();
|
||||
g_mlan.ipaddr.addr = INADDR_ANY;
|
||||
ret = netifapi_netif_add(&g_mlan.netif, &g_mlan.ipaddr,
|
||||
&g_mlan.ipaddr, &g_mlan.ipaddr, NULL,
|
||||
lwip_netif_init, tcpip_input);
|
||||
if (ret) {
|
||||
/*FIXME: Handle the error case cleanly */
|
||||
net_e("MLAN interface add failed");
|
||||
}
|
||||
|
||||
ret = netifapi_netif_add(&g_uap.netif, &g_uap.ipaddr,
|
||||
&g_uap.ipaddr, &g_uap.ipaddr, NULL,
|
||||
lwip_netif_uap_init, tcpip_input);
|
||||
if (ret) {
|
||||
/*FIXME: Handle the error case cleanly */
|
||||
net_e("UAP interface add failed");
|
||||
}
|
||||
wlan_init_done = 1;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void net_set_sta_ipup_callback(void *fn)
|
||||
{
|
||||
sta_ipup_cb = (net_sta_ipup_cb_fn)fn;
|
||||
}
|
||||
|
||||
void user_connected_callback(FUNCPTR fn)
|
||||
{
|
||||
sta_connected_func = fn;
|
||||
}
|
||||
|
||||
static void wm_netif_status_static_callback(struct netif *n)
|
||||
{
|
||||
if (n->flags & NETIF_FLAG_UP)
|
||||
{
|
||||
// static IP success;
|
||||
os_printf("using static ip...\n");
|
||||
mhdr_set_station_status(RW_EVT_STA_GOT_IP);/* dhcp success*/
|
||||
|
||||
if(sta_ipup_cb != NULL)
|
||||
sta_ipup_cb(NULL);
|
||||
|
||||
if(sta_connected_func != NULL)
|
||||
(*sta_connected_func)();
|
||||
}
|
||||
else
|
||||
{
|
||||
// static IP fail;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void wm_netif_status_callback(struct netif *n)
|
||||
{
|
||||
FUNC_1PARAM_PTR fn;
|
||||
struct dhcp *dhcp;
|
||||
u32 val;
|
||||
|
||||
if (n->flags & NETIF_FLAG_UP)
|
||||
{
|
||||
dhcp = netif_dhcp_data(n);
|
||||
if(dhcp != NULL)
|
||||
{
|
||||
if (dhcp->state == DHCP_STATE_BOUND)
|
||||
{
|
||||
os_printf("ip_addr: %x\r\n", ip_addr_get_ip4_u32(&n->ip_addr));
|
||||
|
||||
#if CFG_ROLE_LAUNCH
|
||||
rl_pre_sta_set_status(RL_STATUS_STA_LAUNCHED);
|
||||
#endif
|
||||
fn = (FUNC_1PARAM_PTR)bk_wlan_get_status_cb();
|
||||
if(fn)
|
||||
{
|
||||
val = RW_EVT_STA_GOT_IP;
|
||||
(*fn)(&val);
|
||||
}
|
||||
mhdr_set_station_status(RW_EVT_STA_GOT_IP);
|
||||
/* dhcp success*/
|
||||
if(sta_ipup_cb != NULL)
|
||||
sta_ipup_cb(NULL);
|
||||
|
||||
if(sta_connected_func != NULL)
|
||||
(*sta_connected_func)();
|
||||
}
|
||||
else
|
||||
{
|
||||
// dhcp fail
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// static IP success;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// dhcp fail;
|
||||
}
|
||||
}
|
||||
|
||||
static int check_iface_mask(void *handle, uint32_t ipaddr)
|
||||
{
|
||||
uint32_t interface_ip, interface_mask;
|
||||
net_get_if_ip_addr(&interface_ip, handle);
|
||||
net_get_if_ip_mask(&interface_mask, handle);
|
||||
if (interface_ip > 0)
|
||||
if ((interface_ip & interface_mask) ==
|
||||
(ipaddr & interface_mask))
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
|
||||
void *net_ip_to_interface(uint32_t ipaddr)
|
||||
{
|
||||
int ret;
|
||||
void *handle;
|
||||
/* Check mlan handle */
|
||||
handle = net_get_sta_handle();
|
||||
ret = check_iface_mask(handle, ipaddr);
|
||||
if (ret == 0)
|
||||
return handle;
|
||||
|
||||
/* Check uap handle */
|
||||
handle = net_get_uap_handle();
|
||||
ret = check_iface_mask(handle, ipaddr);
|
||||
if (ret == 0)
|
||||
return handle;
|
||||
|
||||
/* If more interfaces are added then above check needs to done for
|
||||
* those newly added interfaces
|
||||
*/
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void *net_sock_to_interface(int sock)
|
||||
{
|
||||
struct sockaddr_in peer;
|
||||
unsigned long peerlen = sizeof(struct sockaddr_in);
|
||||
void *req_iface = NULL;
|
||||
|
||||
getpeername(sock, (struct sockaddr *)&peer, &peerlen);
|
||||
req_iface = net_ip_to_interface(peer.sin_addr.s_addr);
|
||||
return req_iface;
|
||||
}
|
||||
|
||||
void *net_get_sta_handle(void)
|
||||
{
|
||||
return &g_mlan.netif;
|
||||
}
|
||||
|
||||
void *net_get_uap_handle(void)
|
||||
{
|
||||
return &g_uap.netif;
|
||||
}
|
||||
|
||||
void *net_get_netif_handle(uint8_t iface)
|
||||
{
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void net_interface_up(void *intrfc_handle)
|
||||
{
|
||||
struct interface *if_handle = (struct interface *)intrfc_handle;
|
||||
netifapi_netif_set_up(&if_handle->netif);
|
||||
}
|
||||
|
||||
void net_interface_down(void *intrfc_handle)
|
||||
{
|
||||
struct interface *if_handle = (struct interface *)intrfc_handle;
|
||||
netifapi_netif_set_down(&if_handle->netif);
|
||||
}
|
||||
|
||||
void net_interface_dhcp_stop(void *intrfc_handle)
|
||||
{
|
||||
struct interface *if_handle = (struct interface *)intrfc_handle;
|
||||
netifapi_dhcp_stop(&if_handle->netif);
|
||||
netif_set_status_callback(&if_handle->netif, NULL);
|
||||
}
|
||||
|
||||
void sta_ip_down(void)
|
||||
{
|
||||
if(sta_ip_start_flag)
|
||||
{
|
||||
os_printf("sta_ip_down\r\n");
|
||||
|
||||
sta_ip_start_flag = 0;
|
||||
|
||||
netifapi_netif_set_down(&g_mlan.netif);
|
||||
netif_set_status_callback(&g_mlan.netif, NULL);
|
||||
netifapi_dhcp_stop(&g_mlan.netif);
|
||||
}
|
||||
}
|
||||
|
||||
void sta_ip_start(void)
|
||||
{
|
||||
struct wlan_ip_config address = {0};
|
||||
|
||||
if(!sta_ip_start_flag)
|
||||
{
|
||||
os_printf("sta_ip_start\r\n");
|
||||
sta_ip_start_flag = 1;
|
||||
net_configure_address(&sta_ip_settings, net_get_sta_handle());
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
os_printf("sta_ip_start2:0x%x\r\n", address.ipv4.address);
|
||||
net_get_if_addr(&address, net_get_sta_handle());
|
||||
if((mhdr_get_station_status() == RW_EVT_STA_CONNECTED)
|
||||
&& (0 != address.ipv4.address))
|
||||
{
|
||||
mhdr_set_station_status(RW_EVT_STA_GOT_IP);
|
||||
}
|
||||
}
|
||||
|
||||
void sta_set_vif_netif(void)
|
||||
{
|
||||
rwm_mgmt_set_vif_netif(&g_mlan.netif);
|
||||
}
|
||||
|
||||
void ap_set_vif_netif(void)
|
||||
{
|
||||
rwm_mgmt_set_vif_netif(&g_uap.netif);
|
||||
}
|
||||
|
||||
void sta_set_default_netif(void)
|
||||
{
|
||||
netifapi_netif_set_default(net_get_sta_handle());
|
||||
}
|
||||
|
||||
void ap_set_default_netif(void)
|
||||
{
|
||||
// as the default netif is sta's netif, so ap need to send
|
||||
// boardcast or not sub net packets, need set ap netif before
|
||||
// send those packets, after finish sending, reset default netif
|
||||
// to sat's netif.
|
||||
netifapi_netif_set_default(net_get_uap_handle());
|
||||
}
|
||||
|
||||
void reset_default_netif(void)
|
||||
{
|
||||
if (sta_ip_is_start()) {
|
||||
netifapi_netif_set_default(net_get_sta_handle());
|
||||
} else {
|
||||
netifapi_netif_set_default(NULL);
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t sta_ip_is_start(void)
|
||||
{
|
||||
return sta_ip_start_flag;
|
||||
}
|
||||
|
||||
void uap_ip_down(void)
|
||||
{
|
||||
if (uap_ip_start_flag )
|
||||
{
|
||||
os_printf("uap_ip_down\r\n");
|
||||
uap_ip_start_flag = 0;
|
||||
|
||||
netifapi_netif_set_down(&g_uap.netif);
|
||||
netif_set_status_callback(&g_uap.netif, NULL);
|
||||
dhcp_server_stop();
|
||||
}
|
||||
}
|
||||
|
||||
void uap_ip_start(void)
|
||||
{
|
||||
if ( !uap_ip_start_flag )
|
||||
{
|
||||
os_printf("uap_ip_start\r\n");
|
||||
uap_ip_start_flag = 1;
|
||||
net_configure_address(&uap_ip_settings, net_get_uap_handle());
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t uap_ip_is_start(void)
|
||||
{
|
||||
return uap_ip_start_flag;
|
||||
}
|
||||
|
||||
#define DEF_UAP_IP 0xc0a80a01UL /* 192.168.10.1 */
|
||||
|
||||
void ip_address_set(int iface, int dhcp, char *ip, char *mask, char*gw, char*dns)
|
||||
{
|
||||
uint32_t tmp;
|
||||
struct ipv4_config addr;
|
||||
|
||||
memset(&addr, 0, sizeof(struct ipv4_config));
|
||||
if (dhcp == 1) {
|
||||
addr.addr_type = ADDR_TYPE_DHCP;
|
||||
} else {
|
||||
addr.addr_type = ADDR_TYPE_STATIC;
|
||||
tmp = inet_addr((char*)ip);
|
||||
addr.address = (tmp);
|
||||
tmp = inet_addr((char*)mask);
|
||||
if (tmp == 0xFFFFFFFF)
|
||||
tmp = 0x00FFFFFF;// if not set valid netmask, set as 255.255.255.0
|
||||
addr.netmask= (tmp);
|
||||
tmp = inet_addr((char*)gw);
|
||||
addr.gw = (tmp);
|
||||
|
||||
tmp = inet_addr((char*)dns);
|
||||
addr.dns1 = (tmp);
|
||||
}
|
||||
|
||||
if (iface == 1) // Station
|
||||
memcpy(&sta_ip_settings, &addr, sizeof(addr));
|
||||
else
|
||||
memcpy(&uap_ip_settings, &addr, sizeof(addr));
|
||||
}
|
||||
|
||||
int net_configure_address(struct ipv4_config *addr, void *intrfc_handle)
|
||||
{
|
||||
if (!intrfc_handle)
|
||||
return -1;
|
||||
|
||||
struct interface *if_handle = (struct interface *)intrfc_handle;
|
||||
|
||||
net_d("\r\nconfiguring interface %s (with %s)",
|
||||
(if_handle == &g_mlan) ? "mlan" :"uap",
|
||||
(addr->addr_type == ADDR_TYPE_DHCP)
|
||||
? "DHCP client" : "Static IP");
|
||||
netifapi_netif_set_down(&if_handle->netif);
|
||||
|
||||
/* De-register previously registered DHCP Callback for correct
|
||||
* address configuration.
|
||||
*/
|
||||
netif_set_status_callback(&if_handle->netif, NULL);
|
||||
switch (addr->addr_type) {
|
||||
case ADDR_TYPE_STATIC:
|
||||
if_handle->ipaddr.addr = addr->address;
|
||||
if_handle->nmask.addr = addr->netmask;
|
||||
if_handle->gw.addr = addr->gw;
|
||||
|
||||
netifapi_netif_set_addr(&if_handle->netif, &if_handle->ipaddr,
|
||||
&if_handle->nmask, &if_handle->gw);
|
||||
netifapi_netif_set_up(&if_handle->netif);
|
||||
net_configure_dns((struct wlan_ip_config *)addr);
|
||||
if(if_handle == &g_mlan)
|
||||
{
|
||||
netif_set_status_callback(&if_handle->netif,
|
||||
wm_netif_status_static_callback);
|
||||
}
|
||||
break;
|
||||
|
||||
case ADDR_TYPE_DHCP:
|
||||
/* Reset the address since we might be transitioning from static to DHCP */
|
||||
memset(&if_handle->ipaddr, 0, sizeof(ip_addr_t));
|
||||
memset(&if_handle->nmask, 0, sizeof(ip_addr_t));
|
||||
memset(&if_handle->gw, 0, sizeof(ip_addr_t));
|
||||
netifapi_netif_set_addr(&if_handle->netif, &if_handle->ipaddr,
|
||||
&if_handle->nmask, &if_handle->gw);
|
||||
|
||||
netif_set_status_callback(&if_handle->netif,
|
||||
wm_netif_status_callback);
|
||||
netifapi_netif_set_up(&if_handle->netif);
|
||||
netifapi_dhcp_start(&if_handle->netif);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
#ifdef CONFIG_IPV6
|
||||
netif_create_ip6_linklocal_address(&if_handle->netif, 1);
|
||||
#endif
|
||||
/* Finally this should send the following event. */
|
||||
if (if_handle == &g_mlan) {
|
||||
// static IP up;
|
||||
|
||||
/* XXX For DHCP, the above event will only indicate that the
|
||||
* DHCP address obtaining process has started. Once the DHCP
|
||||
* address has been obtained, another event,
|
||||
* WD_EVENT_NET_DHCP_CONFIG, should be sent to the wlcmgr.
|
||||
*/
|
||||
up_iface = 1;
|
||||
|
||||
// we always set sta netif as the default.
|
||||
sta_set_default_netif();
|
||||
} else {
|
||||
// softap IP up, start dhcp server;
|
||||
dhcp_server_start(net_get_uap_handle());
|
||||
up_iface = 0;
|
||||
|
||||
// as the default netif is sta's netif, so ap need to send
|
||||
// boardcast or not sub net packets, need set ap netif before
|
||||
// send those packets, after finish sending, reset default netif
|
||||
// to sta's netif.
|
||||
os_printf("def netif is no ap's netif, sending boardcast or no-subnet ip packets may failed\r\n");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int net_get_if_addr(struct wlan_ip_config *addr, void *intrfc_handle)
|
||||
{
|
||||
const ip_addr_t *tmp;
|
||||
struct interface *if_handle = (struct interface *)intrfc_handle;
|
||||
|
||||
if(netif_is_up(&if_handle->netif)) {
|
||||
addr->ipv4.address = ip_addr_get_ip4_u32(&if_handle->netif.ip_addr);
|
||||
addr->ipv4.netmask = ip_addr_get_ip4_u32(&if_handle->netif.netmask);
|
||||
addr->ipv4.gw = ip_addr_get_ip4_u32(&if_handle->netif.gw);
|
||||
|
||||
tmp = dns_getserver(0);
|
||||
addr->ipv4.dns1 = ip_addr_get_ip4_u32(tmp);
|
||||
|
||||
tmp = dns_getserver(1);
|
||||
addr->ipv4.dns2 = ip_addr_get_ip4_u32(tmp);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int net_get_if_macaddr(void *macaddr, void *intrfc_handle)
|
||||
{
|
||||
struct interface *if_handle = (struct interface *)intrfc_handle;
|
||||
|
||||
os_memcpy(macaddr, &if_handle->netif.hwaddr[0], if_handle->netif.hwaddr_len);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_IPV6
|
||||
int net_get_if_ipv6_addr(struct wlan_ip_config *addr, void *intrfc_handle)
|
||||
{
|
||||
struct interface *if_handle = (struct interface *)intrfc_handle;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) {
|
||||
ip6_addr_copy_to_packed(addr->ipv6[i],
|
||||
*ip_2_ip6(&if_handle->netif.ip6_addr[i]));
|
||||
addr->ipv6[i].addr_state = if_handle->netif.ip6_addr_state[i];
|
||||
}
|
||||
/* TODO carry out more processing based on IPv6 fields in netif */
|
||||
return 0;
|
||||
}
|
||||
|
||||
int net_get_if_ipv6_pref_addr(struct wlan_ip_config *addr, void *intrfc_handle)
|
||||
{
|
||||
int i, ret = 0;
|
||||
struct interface *if_handle = (struct interface *)intrfc_handle;
|
||||
|
||||
for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) {
|
||||
if (if_handle->netif.ip6_addr_state[i] == IP6_ADDR_PREFERRED) {
|
||||
ip6_addr_copy_to_packed(addr->ipv6[ret],
|
||||
*ip_2_ip6(&if_handle->netif.ip6_addr[i]));
|
||||
ret++;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
#endif /* CONFIG_IPV6 */
|
||||
|
||||
int net_get_if_ip_addr(uint32_t *ip, void *intrfc_handle)
|
||||
{
|
||||
struct interface *if_handle = (struct interface *)intrfc_handle;
|
||||
|
||||
*ip = ip_addr_get_ip4_u32(&if_handle->netif.ip_addr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int net_get_if_gw_addr(uint32_t *ip, void *intrfc_handle)
|
||||
{
|
||||
struct interface *if_handle = (struct interface *)intrfc_handle;
|
||||
|
||||
*ip = ip_addr_get_ip4_u32(&if_handle->netif.gw);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int net_get_if_ip_mask(uint32_t *nm, void *intrfc_handle)
|
||||
{
|
||||
struct interface *if_handle = (struct interface *)intrfc_handle;
|
||||
|
||||
*nm = ip_addr_get_ip4_u32(&if_handle->netif.netmask);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void net_configure_dns(struct wlan_ip_config *ip)
|
||||
{
|
||||
ip_addr_t tmp;
|
||||
|
||||
if (ip->ipv4.addr_type == ADDR_TYPE_STATIC) {
|
||||
|
||||
if (ip->ipv4.dns1 == 0)
|
||||
ip->ipv4.dns1 = ip->ipv4.gw;
|
||||
if (ip->ipv4.dns2 == 0)
|
||||
ip->ipv4.dns2 = ip->ipv4.dns1;
|
||||
|
||||
ip_addr_set_ip4_u32(&tmp, ip->ipv4.dns1);
|
||||
dns_setserver(0, &tmp);
|
||||
ip_addr_set_ip4_u32(&tmp, ip->ipv4.dns2);
|
||||
dns_setserver(1, &tmp);
|
||||
}
|
||||
|
||||
/* DNS MAX Retries should be configured in lwip/dns.c to 3/4 */
|
||||
/* DNS Cache size of about 4 is sufficient */
|
||||
}
|
||||
|
||||
void net_wlan_initial(void)
|
||||
{
|
||||
net_ipv4stack_init();
|
||||
}
|
||||
|
||||
void net_wlan_add_netif(void *mac)
|
||||
{
|
||||
VIF_INF_PTR vif_entry = NULL;
|
||||
struct interface *wlan_if = NULL;
|
||||
err_t err;
|
||||
u8 vif_idx;
|
||||
u8 *b = (u8*)mac;
|
||||
|
||||
if(!b || (!(b[0] | b[1] | b[2] | b[3] | b[4] | b[5])))
|
||||
return;
|
||||
|
||||
vif_idx = rwm_mgmt_vif_mac2idx(mac);
|
||||
if(vif_idx == 0xff) {
|
||||
os_printf("net_add_netif-not-found\r\n");
|
||||
return ;
|
||||
}
|
||||
|
||||
vif_entry = rwm_mgmt_vif_idx2ptr(vif_idx);
|
||||
if(!vif_entry) {
|
||||
os_printf("net_wlan_add_netif not vif found, %d\r\n", vif_idx);
|
||||
return ;
|
||||
}
|
||||
|
||||
if(vif_entry->type == VIF_AP) {
|
||||
wlan_if = &g_uap;
|
||||
} else if(vif_entry->type == VIF_STA) {
|
||||
wlan_if = &g_mlan;
|
||||
} else {
|
||||
os_printf("net_wlan_add_netif with other role\r\n");
|
||||
return ;
|
||||
}
|
||||
|
||||
wlan_if->ipaddr.addr = INADDR_ANY;
|
||||
|
||||
err = netifapi_netif_add(&wlan_if->netif,
|
||||
&wlan_if->ipaddr,
|
||||
&wlan_if->ipaddr,
|
||||
&wlan_if->ipaddr,
|
||||
(void*)vif_entry,
|
||||
ethernetif_init,
|
||||
tcpip_input);
|
||||
if (err)
|
||||
{
|
||||
os_printf("net_wlan_add_netif failed\r\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
vif_entry->priv = &wlan_if->netif;
|
||||
}
|
||||
|
||||
os_printf("[net]addvif_idx:%d\r\n", vif_idx);
|
||||
}
|
||||
|
||||
void net_wlan_remove_netif(void *mac)
|
||||
{
|
||||
err_t err;
|
||||
u8 vif_idx;
|
||||
VIF_INF_PTR vif_entry = NULL;
|
||||
struct netif *netif = NULL;
|
||||
u8 *b = (u8*)mac;
|
||||
|
||||
if(!b || (!(b[0] | b[1] | b[2] | b[3] | b[4] | b[5])))
|
||||
return;
|
||||
|
||||
vif_idx = rwm_mgmt_vif_mac2idx(mac);
|
||||
if(vif_idx == 0xff) {
|
||||
os_printf("net_wlan_add_netif not vif idx found\r\n");
|
||||
return ;
|
||||
}
|
||||
vif_entry = rwm_mgmt_vif_idx2ptr(vif_idx);
|
||||
if(!vif_entry) {
|
||||
os_printf("net_wlan_add_netif not vif found, %d\r\n", vif_idx);
|
||||
return ;
|
||||
}
|
||||
|
||||
netif = (struct netif *)vif_entry->priv;
|
||||
if(!netif) {
|
||||
os_printf("net_wlan_remove_netif netif is null\r\n");
|
||||
return;
|
||||
}
|
||||
|
||||
err = netifapi_netif_remove(netif);
|
||||
if(err != ERR_OK) {
|
||||
os_printf("net_wlan_remove_netif failed\r\n");
|
||||
} else {
|
||||
netif->state = NULL;
|
||||
}
|
||||
|
||||
os_printf("[net]remoVif_idx:%d\r\n", vif_idx);
|
||||
}
|
||||
//eof
|
||||
|
||||
25
port/net.h
Normal file
25
port/net.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#ifndef _NET_H_
|
||||
#define _NET_H_
|
||||
|
||||
#include "lwip_netif_address.h"
|
||||
|
||||
extern void uap_ip_down(void);
|
||||
extern void uap_ip_start(void);
|
||||
extern void sta_ip_down(void);
|
||||
extern void sta_ip_start(void);
|
||||
extern uint32_t uap_ip_is_start(void);
|
||||
extern uint32_t sta_ip_is_start(void);
|
||||
extern void *net_get_sta_handle(void);
|
||||
extern void *net_get_uap_handle(void);
|
||||
extern void net_wlan_remove_netif(void *mac);
|
||||
extern int net_get_if_macaddr(void *macaddr, void *intrfc_handle);
|
||||
extern int net_get_if_addr(struct wlan_ip_config *addr, void *intrfc_handle);
|
||||
extern void ip_address_set(int iface, int dhcp, char *ip, char *mask, char*gw, char*dns);
|
||||
#ifdef CONFIG_IPV6
|
||||
int net_get_if_ipv6_addr(struct wlan_ip_config *addr, void *intrfc_handle);
|
||||
int net_get_if_ipv6_pref_addr(struct wlan_ip_config *addr, void *intrfc_handle);
|
||||
#endif
|
||||
|
||||
#endif // _NET_H_
|
||||
// eof
|
||||
|
||||
501
port/sys_arch.c
Normal file
501
port/sys_arch.c
Normal file
@@ -0,0 +1,501 @@
|
||||
/*
|
||||
* Copyright (c) 2001-2003 Swedish Institute of Computer Science.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
|
||||
* SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
* OF SUCH DAMAGE.
|
||||
*
|
||||
* This file is part of the lwIP TCP/IP stack.
|
||||
*
|
||||
* Author: Adam Dunkels <adam@sics.se>
|
||||
*
|
||||
*/
|
||||
|
||||
#include "typedef.h"
|
||||
#include "sys_rtos.h"
|
||||
#include "rtos_pub.h"
|
||||
/* lwIP includes. */
|
||||
#include "lwip/debug.h"
|
||||
#include "lwip/def.h"
|
||||
#include "lwip/sys.h"
|
||||
#include "lwip/mem.h"
|
||||
#include "lwip/stats.h"
|
||||
#include "lwip/timeouts.h"
|
||||
#include "portmacro.h"
|
||||
|
||||
#define CFG_ENABLE_LWIP_MUTEX 1
|
||||
|
||||
#if CFG_ENABLE_LWIP_MUTEX
|
||||
static sys_mutex_t sys_arch_mutex;
|
||||
#endif
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
err_t sys_mbox_new(sys_mbox_t *mbox, int size)
|
||||
{
|
||||
(void ) size;
|
||||
|
||||
if (size > 0)
|
||||
*mbox = xQueueCreate( size, sizeof( void * ) );
|
||||
else
|
||||
*mbox = xQueueCreate( archMESG_QUEUE_LENGTH, sizeof( void * ) );
|
||||
|
||||
#if SYS_STATS
|
||||
++lwip_stats.sys.mbox.used;
|
||||
if (lwip_stats.sys.mbox.max < lwip_stats.sys.mbox.used) {
|
||||
lwip_stats.sys.mbox.max = lwip_stats.sys.mbox.used;
|
||||
}
|
||||
#endif /* SYS_STATS */
|
||||
|
||||
if (*mbox == NULL)
|
||||
return ERR_MEM;
|
||||
|
||||
return ERR_OK;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/*
|
||||
Deallocates a mailbox. If there are messages still present in the
|
||||
mailbox when the mailbox is deallocated, it is an indication of a
|
||||
programming error in lwIP and the developer should be notified.
|
||||
*/
|
||||
void sys_mbox_free(sys_mbox_t *mbox)
|
||||
{
|
||||
if( uxQueueMessagesWaiting( *mbox ) )
|
||||
{
|
||||
/* Line for breakpoint. Should never break here! */
|
||||
portNOP();
|
||||
#if SYS_STATS
|
||||
lwip_stats.sys.mbox.err++;
|
||||
#endif /* SYS_STATS */
|
||||
|
||||
// TODO notify the user of failure.
|
||||
}
|
||||
|
||||
vQueueDelete( *mbox );
|
||||
|
||||
#if SYS_STATS
|
||||
--lwip_stats.sys.mbox.used;
|
||||
#endif /* SYS_STATS */
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
// Posts the "msg" to the mailbox.
|
||||
void sys_mbox_post(sys_mbox_t *mbox, void *data)
|
||||
{
|
||||
while ( xQueueSendToBack(*mbox, &data, portMAX_DELAY ) != pdTRUE ){}
|
||||
}
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
// Try to post the "msg" to the mailbox.
|
||||
err_t sys_mbox_trypost(sys_mbox_t *mbox, void *msg)
|
||||
{
|
||||
err_t result;
|
||||
|
||||
if ( xQueueSend( *mbox, &msg, 0 ) == pdPASS )
|
||||
{
|
||||
result = ERR_OK;
|
||||
}
|
||||
else {
|
||||
// could not post, queue must be full
|
||||
result = ERR_MEM;
|
||||
|
||||
#if SYS_STATS
|
||||
lwip_stats.sys.mbox.err++;
|
||||
#endif /* SYS_STATS */
|
||||
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/*
|
||||
Blocks the thread until a message arrives in the mailbox, but does
|
||||
not block the thread longer than "timeout" milliseconds (similar to
|
||||
the sys_arch_sem_wait() function). The "msg" argument is a result
|
||||
parameter that is set by the function (i.e., by doing "*msg =
|
||||
ptr"). The "msg" parameter maybe NULL to indicate that the message
|
||||
should be dropped.
|
||||
|
||||
The return values are the same as for the sys_arch_sem_wait() function:
|
||||
Number of milliseconds spent waiting or SYS_ARCH_TIMEOUT if there was a
|
||||
timeout.
|
||||
|
||||
Note that a function with a similar name, sys_mbox_fetch(), is
|
||||
implemented by lwIP.
|
||||
*/
|
||||
u32_t sys_arch_mbox_fetch(sys_mbox_t *mbox, void **msg, u32_t timeout)
|
||||
{
|
||||
void *dummyptr;
|
||||
portTickType StartTime, EndTime, Elapsed;
|
||||
|
||||
StartTime = xTaskGetTickCount();
|
||||
|
||||
if ( msg == NULL )
|
||||
{
|
||||
msg = &dummyptr;
|
||||
}
|
||||
|
||||
if ( timeout != 0 )
|
||||
{
|
||||
if ( pdTRUE == xQueueReceive( *mbox, &(*msg), timeout / portTICK_RATE_MS ) )
|
||||
{
|
||||
EndTime = xTaskGetTickCount();
|
||||
Elapsed = (EndTime - StartTime) * portTICK_RATE_MS;
|
||||
|
||||
return ( Elapsed );
|
||||
}
|
||||
else // timed out blocking for message
|
||||
{
|
||||
*msg = NULL;
|
||||
|
||||
return SYS_ARCH_TIMEOUT;
|
||||
}
|
||||
}
|
||||
else // block forever for a message.
|
||||
{
|
||||
while( pdTRUE != xQueueReceive( *mbox, &(*msg), portMAX_DELAY ) ){} // time is arbitrary
|
||||
EndTime = xTaskGetTickCount();
|
||||
Elapsed = (EndTime - StartTime) * portTICK_RATE_MS;
|
||||
|
||||
return ( Elapsed ); // return time blocked TODO test
|
||||
}
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/*
|
||||
Similar to sys_arch_mbox_fetch, but if message is not ready immediately, we'll
|
||||
return with SYS_MBOX_EMPTY. On success, 0 is returned.
|
||||
*/
|
||||
u32_t sys_arch_mbox_tryfetch(sys_mbox_t *mbox, void **msg)
|
||||
{
|
||||
void *dummyptr;
|
||||
|
||||
if ( msg == NULL )
|
||||
{
|
||||
msg = &dummyptr;
|
||||
}
|
||||
|
||||
if ( pdTRUE == xQueueReceive( *mbox, &(*msg), 0 ) )
|
||||
{
|
||||
return ERR_OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
return SYS_MBOX_EMPTY;
|
||||
}
|
||||
}
|
||||
/*----------------------------------------------------------------------------------*/
|
||||
int sys_mbox_valid(sys_mbox_t *mbox)
|
||||
{
|
||||
if (*mbox == SYS_MBOX_NULL)
|
||||
return 0;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
void sys_mbox_set_invalid(sys_mbox_t *mbox)
|
||||
{
|
||||
*mbox = SYS_MBOX_NULL;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
// Creates a new semaphore. The "count" argument specifies
|
||||
// the initial state of the semaphore.
|
||||
err_t sys_sem_new(sys_sem_t *sem, u8_t count)
|
||||
{
|
||||
vSemaphoreCreateBinary(*sem );
|
||||
if(*sem == NULL)
|
||||
{
|
||||
|
||||
#if SYS_STATS
|
||||
++lwip_stats.sys.sem.err;
|
||||
#endif /* SYS_STATS */
|
||||
return ERR_MEM;
|
||||
}
|
||||
|
||||
if(count == 0) // Means it can't be taken
|
||||
{
|
||||
xSemaphoreTake(*sem,1);
|
||||
}
|
||||
|
||||
#if SYS_STATS
|
||||
++lwip_stats.sys.sem.used;
|
||||
if (lwip_stats.sys.sem.max < lwip_stats.sys.sem.used) {
|
||||
lwip_stats.sys.sem.max = lwip_stats.sys.sem.used;
|
||||
}
|
||||
#endif /* SYS_STATS */
|
||||
|
||||
return ERR_OK;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/*
|
||||
Blocks the thread while waiting for the semaphore to be
|
||||
signaled. If the "timeout" argument is non-zero, the thread should
|
||||
only be blocked for the specified time (measured in
|
||||
milliseconds).
|
||||
|
||||
If the timeout argument is non-zero, the return value is the number of
|
||||
milliseconds spent waiting for the semaphore to be signaled. If the
|
||||
semaphore wasn't signaled within the specified time, the return value is
|
||||
SYS_ARCH_TIMEOUT. If the thread didn't have to wait for the semaphore
|
||||
(i.e., it was already signaled), the function may return zero.
|
||||
|
||||
Notice that lwIP implements a function with a similar name,
|
||||
sys_sem_wait(), that uses the sys_arch_sem_wait() function.
|
||||
*/
|
||||
u32_t sys_arch_sem_wait(sys_sem_t *sem, u32_t timeout)
|
||||
{
|
||||
portTickType StartTime, EndTime, Elapsed;
|
||||
|
||||
StartTime = xTaskGetTickCount();
|
||||
|
||||
if( timeout != 0)
|
||||
{
|
||||
if( xSemaphoreTake( *sem, timeout / portTICK_RATE_MS ) == pdTRUE )
|
||||
{
|
||||
EndTime = xTaskGetTickCount();
|
||||
Elapsed = (EndTime - StartTime) * portTICK_RATE_MS;
|
||||
|
||||
return (Elapsed); // return time blocked TODO test
|
||||
}
|
||||
else
|
||||
{
|
||||
return SYS_ARCH_TIMEOUT;
|
||||
}
|
||||
}
|
||||
else // must block without a timeout
|
||||
{
|
||||
while( xSemaphoreTake( *sem, portMAX_DELAY) != pdTRUE)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
EndTime = xTaskGetTickCount();
|
||||
Elapsed = (EndTime - StartTime) * portTICK_RATE_MS;
|
||||
|
||||
return ( Elapsed ); // return time blocked
|
||||
}
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
// Signals a semaphore
|
||||
void sys_sem_signal(sys_sem_t *sem)
|
||||
{
|
||||
xSemaphoreGive(*sem);
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
// Deallocates a semaphore
|
||||
void sys_sem_free(sys_sem_t *sem)
|
||||
{
|
||||
#if SYS_STATS
|
||||
--lwip_stats.sys.sem.used;
|
||||
#endif /* SYS_STATS */
|
||||
|
||||
vQueueDelete(*sem);
|
||||
}
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
int sys_sem_valid(sys_sem_t *sem)
|
||||
{
|
||||
if (*sem == SYS_SEM_NULL)
|
||||
return 0;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
void sys_sem_set_invalid(sys_sem_t *sem)
|
||||
{
|
||||
*sem = SYS_SEM_NULL;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
err_t sys_mutex_trylock(sys_mutex_t *pxMutex)
|
||||
{
|
||||
if (xSemaphoreTake(*pxMutex, 0) == pdPASS)
|
||||
return 0;
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
// Initialize sys arch
|
||||
void sys_init(void)
|
||||
{
|
||||
#if CFG_ENABLE_LWIP_MUTEX
|
||||
sys_mutex_new(&sys_arch_mutex);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/* Mutexes*/
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/* Create a new mutex*/
|
||||
err_t sys_mutex_new(sys_mutex_t *mutex) {
|
||||
*mutex = xSemaphoreCreateMutex();
|
||||
if(*mutex == NULL)
|
||||
{
|
||||
#if SYS_STATS
|
||||
++lwip_stats.sys.mutex.err;
|
||||
#endif /* SYS_STATS */
|
||||
return ERR_MEM;
|
||||
}
|
||||
|
||||
#if SYS_STATS
|
||||
++lwip_stats.sys.mutex.used;
|
||||
if (lwip_stats.sys.mutex.max < lwip_stats.sys.mutex.used) {
|
||||
lwip_stats.sys.mutex.max = lwip_stats.sys.mutex.used;
|
||||
}
|
||||
#endif /* SYS_STATS */
|
||||
|
||||
return ERR_OK;
|
||||
}
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/* Deallocate a mutex*/
|
||||
void sys_mutex_free(sys_mutex_t *mutex)
|
||||
{
|
||||
#if SYS_STATS
|
||||
--lwip_stats.sys.mutex.used;
|
||||
#endif /* SYS_STATS */
|
||||
|
||||
vQueueDelete(*mutex);
|
||||
}
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/* Lock a mutex*/
|
||||
void sys_mutex_lock(sys_mutex_t *mutex)
|
||||
{
|
||||
sys_arch_sem_wait(mutex, BEKEN_WAIT_FOREVER);
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/* Unlock a mutex*/
|
||||
void sys_mutex_unlock(sys_mutex_t *mutex)
|
||||
{
|
||||
xSemaphoreGive(*mutex);
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
// TODO
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/*
|
||||
Starts a new thread with priority "prio" that will begin its execution in the
|
||||
function "thread()". The "arg" argument will be passed as an argument to the
|
||||
thread() function. The id of the new thread is returned. Both the id and
|
||||
the priority are system dependent.
|
||||
*/
|
||||
sys_thread_t sys_thread_new(const char *name, lwip_thread_fn thread , void *arg, int stacksize, int prio)
|
||||
{
|
||||
xTaskHandle CreatedTask;
|
||||
int result;
|
||||
|
||||
result = xTaskCreate( thread, ( portCHAR * ) name, stacksize, arg, prio, &CreatedTask );
|
||||
if(result == pdPASS)
|
||||
{
|
||||
return CreatedTask;
|
||||
}
|
||||
else
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
int sys_thread_delete(xTaskHandle pid)
|
||||
{
|
||||
return pdPASS;
|
||||
}
|
||||
|
||||
/*
|
||||
This optional function does a "fast" critical region protection and returns
|
||||
the previous protection level. This function is only called during very short
|
||||
critical regions. An embedded system which supports ISR-based drivers might
|
||||
want to implement this function by disabling interrupts. Task-based systems
|
||||
might want to implement this by using a mutex or disabling tasking. This
|
||||
function should support recursive calls from the same task or interrupt. In
|
||||
other words, sys_arch_protect() could be called while already protected. In
|
||||
that case the return value indicates that it is already protected.
|
||||
|
||||
sys_arch_protect() is only required if your port is supporting an operating
|
||||
system.
|
||||
*/
|
||||
sys_prot_t sys_arch_protect(void)
|
||||
{
|
||||
#if CFG_ENABLE_LWIP_MUTEX
|
||||
sys_mutex_lock(&sys_arch_mutex);
|
||||
|
||||
return 0;
|
||||
#else
|
||||
return port_disable_interrupts_flag();
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
This optional function does a "fast" set of critical region protection to the
|
||||
value specified by pval. See the documentation for sys_arch_protect() for
|
||||
more information. This function is only required if your port is supporting
|
||||
an operating system.
|
||||
*/
|
||||
void sys_arch_unprotect(sys_prot_t pval)
|
||||
{
|
||||
#if CFG_ENABLE_LWIP_MUTEX
|
||||
(void)pval;
|
||||
sys_mutex_unlock(&sys_arch_mutex);
|
||||
#else
|
||||
port_enable_interrupts_flag(pval);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Prints an assertion messages and aborts execution.
|
||||
*/
|
||||
void sys_assert( const char *msg )
|
||||
{
|
||||
(void) msg;
|
||||
|
||||
/*FSL:only needed for debugging*/
|
||||
printf(msg);
|
||||
printf("\n\r");
|
||||
vPortEnterCritical();
|
||||
|
||||
for(;;)
|
||||
;
|
||||
}
|
||||
|
||||
u32_t sys_now(void)
|
||||
{
|
||||
return xTaskGetTickCount() * portTICK_RATE_MS;
|
||||
}
|
||||
|
||||
u32_t sys_jiffies(void)
|
||||
{
|
||||
return xTaskGetTickCount() * portTICK_RATE_MS;
|
||||
}
|
||||
|
||||
void sys_arch_msleep(int ms)
|
||||
{
|
||||
vTaskDelay(ms / portTICK_RATE_MS);
|
||||
}
|
||||
// eof
|
||||
|
||||
@@ -14,11 +14,11 @@ endif()
|
||||
|
||||
set(LWIP_VERSION_MAJOR "2")
|
||||
set(LWIP_VERSION_MINOR "2")
|
||||
set(LWIP_VERSION_REVISION "0")
|
||||
set(LWIP_VERSION_REVISION "2")
|
||||
# LWIP_VERSION_RC is set to LWIP_RC_RELEASE for official releases
|
||||
# LWIP_VERSION_RC is set to LWIP_RC_DEVELOPMENT for Git versions
|
||||
# Numbers 1..31 are reserved for release candidates
|
||||
set(LWIP_VERSION_RC "1")
|
||||
set(LWIP_VERSION_RC "LWIP_RC_DEVELOPMENT")
|
||||
|
||||
if ("${LWIP_VERSION_RC}" STREQUAL "LWIP_RC_RELEASE")
|
||||
set(LWIP_VERSION_STRING
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
#if LWIP_DNS && LWIP_SOCKET
|
||||
|
||||
#include "lwip/err.h"
|
||||
#include "lwip/errno.h"
|
||||
#include "lwip/mem.h"
|
||||
#include "lwip/memp.h"
|
||||
#include "lwip/ip_addr.h"
|
||||
@@ -62,7 +63,7 @@ int h_errno;
|
||||
#endif /* LWIP_DNS_API_DECLARE_H_ERRNO */
|
||||
|
||||
/** LWIP_DNS_API_HOSTENT_STORAGE: if set to 0 (default), lwip_gethostbyname()
|
||||
* returns the same global variabe for all calls (in all threads).
|
||||
* returns the same global variable for all calls (in all threads).
|
||||
* When set to 1, your port should provide a function
|
||||
* struct hostent* sys_thread_hostent( struct hostent* h);
|
||||
* which have to do a copy of "h" and return a pointer ont the "per-thread"
|
||||
@@ -382,7 +383,9 @@ lwip_getaddrinfo(const char *nodename, const char *servname,
|
||||
/* set up sockaddr */
|
||||
inet6_addr_from_ip6addr(&sa6->sin6_addr, ip_2_ip6(&addr));
|
||||
sa6->sin6_family = AF_INET6;
|
||||
#if LWIP_SOCKET_HAVE_SA_LEN
|
||||
sa6->sin6_len = sizeof(struct sockaddr_in6);
|
||||
#endif /* LWIP_SOCKET_HAVE_SA_LEN */
|
||||
sa6->sin6_port = lwip_htons((u16_t)port_nr);
|
||||
sa6->sin6_scope_id = ip6_addr_zone(ip_2_ip6(&addr));
|
||||
ai->ai_family = AF_INET6;
|
||||
@@ -393,7 +396,9 @@ lwip_getaddrinfo(const char *nodename, const char *servname,
|
||||
/* set up sockaddr */
|
||||
inet_addr_from_ip4addr(&sa4->sin_addr, ip_2_ip4(&addr));
|
||||
sa4->sin_family = AF_INET;
|
||||
#if LWIP_SOCKET_HAVE_SA_LEN
|
||||
sa4->sin_len = sizeof(struct sockaddr_in);
|
||||
#endif /* LWIP_SOCKET_HAVE_SA_LEN */
|
||||
sa4->sin_port = lwip_htons((u16_t)port_nr);
|
||||
ai->ai_family = AF_INET;
|
||||
#endif /* LWIP_IPV4 */
|
||||
|
||||
@@ -660,7 +660,7 @@ lwip_accept(int s, struct sockaddr *addr, socklen_t *addrlen)
|
||||
{
|
||||
struct lwip_sock *sock, *nsock;
|
||||
struct netconn *newconn;
|
||||
ip_addr_t naddr;
|
||||
ip_addr_t naddr = {0};
|
||||
u16_t port = 0;
|
||||
int newsock;
|
||||
err_t err;
|
||||
@@ -699,25 +699,6 @@ lwip_accept(int s, struct sockaddr *addr, socklen_t *addrlen)
|
||||
LWIP_ASSERT("invalid socket index", (newsock >= LWIP_SOCKET_OFFSET) && (newsock < NUM_SOCKETS + LWIP_SOCKET_OFFSET));
|
||||
nsock = &sockets[newsock - LWIP_SOCKET_OFFSET];
|
||||
|
||||
/* See event_callback: If data comes in right away after an accept, even
|
||||
* though the server task might not have created a new socket yet.
|
||||
* In that case, newconn->socket is counted down (newconn->socket--),
|
||||
* so nsock->rcvevent is >= 1 here!
|
||||
*/
|
||||
SYS_ARCH_PROTECT(lev);
|
||||
recvevent = (s16_t)(-1 - newconn->callback_arg.socket);
|
||||
newconn->callback_arg.socket = newsock;
|
||||
SYS_ARCH_UNPROTECT(lev);
|
||||
|
||||
if (newconn->callback) {
|
||||
LOCK_TCPIP_CORE();
|
||||
while (recvevent > 0) {
|
||||
recvevent--;
|
||||
newconn->callback(newconn, NETCONN_EVT_RCVPLUS, 0);
|
||||
}
|
||||
UNLOCK_TCPIP_CORE();
|
||||
}
|
||||
|
||||
/* Note that POSIX only requires us to check addr is non-NULL. addrlen must
|
||||
* not be NULL if addr is valid.
|
||||
*/
|
||||
@@ -738,7 +719,28 @@ lwip_accept(int s, struct sockaddr *addr, socklen_t *addrlen)
|
||||
*addrlen = IPADDR_SOCKADDR_GET_LEN(&tempaddr);
|
||||
}
|
||||
MEMCPY(addr, &tempaddr, *addrlen);
|
||||
}
|
||||
|
||||
/* See event_callback: If data comes in right away after an accept, even
|
||||
* though the server task might not have created a new socket yet.
|
||||
* In that case, newconn->socket is counted down (newconn->socket--),
|
||||
* so nsock->rcvevent is >= 1 here!
|
||||
*/
|
||||
SYS_ARCH_PROTECT(lev);
|
||||
recvevent = (s16_t)(-1 - newconn->callback_arg.socket);
|
||||
newconn->callback_arg.socket = newsock;
|
||||
SYS_ARCH_UNPROTECT(lev);
|
||||
|
||||
if (newconn->callback) {
|
||||
LOCK_TCPIP_CORE();
|
||||
while (recvevent > 0) {
|
||||
recvevent--;
|
||||
newconn->callback(newconn, NETCONN_EVT_RCVPLUS, 0);
|
||||
}
|
||||
UNLOCK_TCPIP_CORE();
|
||||
}
|
||||
|
||||
if ((addr != NULL) && (addrlen != NULL)) {
|
||||
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_accept(%d) returning new sock=%d addr=", s, newsock));
|
||||
ip_addr_debug_print_val(SOCKETS_DEBUG, naddr);
|
||||
LWIP_DEBUGF(SOCKETS_DEBUG, (" port=%"U16_F"\n", port));
|
||||
@@ -2920,6 +2922,49 @@ lwip_sockopt_to_ipopt(int optname)
|
||||
}
|
||||
}
|
||||
|
||||
#if LWIP_IPV6 && LWIP_RAW
|
||||
static void
|
||||
lwip_getsockopt_impl_ipv6_checksum(int s, struct lwip_sock* sock, void* optval)
|
||||
{
|
||||
if (sock->conn->pcb.raw->chksum_reqd == 0) {
|
||||
*(int*)optval = -1;
|
||||
}
|
||||
else {
|
||||
*(int*)optval = sock->conn->pcb.raw->chksum_offset;
|
||||
}
|
||||
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_RAW, IPV6_CHECKSUM) = %d\n",
|
||||
s, (*(int*)optval)));
|
||||
}
|
||||
|
||||
static int
|
||||
lwip_setsockopt_impl_ipv6_checksum(int s, struct lwip_sock* sock, const void* optval, socklen_t optlen)
|
||||
{
|
||||
/* It should not be possible to disable the checksum generation with ICMPv6
|
||||
* as per RFC 3542 chapter 3.1 */
|
||||
if (sock->conn->pcb.raw->protocol == IPPROTO_ICMPV6) {
|
||||
done_socket(sock);
|
||||
return EINVAL;
|
||||
}
|
||||
|
||||
LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, int, NETCONN_RAW);
|
||||
if (*(const int*)optval < 0) {
|
||||
sock->conn->pcb.raw->chksum_reqd = 0;
|
||||
}
|
||||
else if (*(const int*)optval & 1) {
|
||||
/* Per RFC3542, odd offsets are not allowed */
|
||||
done_socket(sock);
|
||||
return EINVAL;
|
||||
}
|
||||
else {
|
||||
sock->conn->pcb.raw->chksum_reqd = 1;
|
||||
sock->conn->pcb.raw->chksum_offset = (u16_t) * (const int*)optval;
|
||||
}
|
||||
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_RAW, IPV6_CHECKSUM, ..) -> %d\n",
|
||||
s, sock->conn->pcb.raw->chksum_reqd));
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/** lwip_getsockopt_impl: the actual implementation of getsockopt:
|
||||
* same argument as lwip_getsockopt, either called directly or through callback
|
||||
*/
|
||||
@@ -2934,6 +2979,7 @@ lwip_getsockopt_impl(int s, int level, int optname, void *optval, socklen_t *opt
|
||||
|
||||
#ifdef LWIP_HOOK_SOCKETS_GETSOCKOPT
|
||||
if (LWIP_HOOK_SOCKETS_GETSOCKOPT(s, sock, level, optname, optval, optlen, &err)) {
|
||||
done_socket(sock);
|
||||
return err;
|
||||
}
|
||||
#endif
|
||||
@@ -3169,6 +3215,12 @@ lwip_getsockopt_impl(int s, int level, int optname, void *optval, socklen_t *opt
|
||||
/* Level: IPPROTO_IPV6 */
|
||||
case IPPROTO_IPV6:
|
||||
switch (optname) {
|
||||
#if LWIP_IPV6 && LWIP_RAW
|
||||
case IPV6_CHECKSUM:
|
||||
LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, *optlen, int, NETCONN_RAW);
|
||||
lwip_getsockopt_impl_ipv6_checksum(s, sock, optval);
|
||||
break;
|
||||
#endif /* LWIP_IPV6 && LWIP_RAW */
|
||||
case IPV6_V6ONLY:
|
||||
LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, *optlen, int);
|
||||
*(int *)optval = (netconn_get_ipv6only(sock->conn) ? 1 : 0);
|
||||
@@ -3219,13 +3271,7 @@ lwip_getsockopt_impl(int s, int level, int optname, void *optval, socklen_t *opt
|
||||
#if LWIP_IPV6 && LWIP_RAW
|
||||
case IPV6_CHECKSUM:
|
||||
LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, *optlen, int, NETCONN_RAW);
|
||||
if (sock->conn->pcb.raw->chksum_reqd == 0) {
|
||||
*(int *)optval = -1;
|
||||
} else {
|
||||
*(int *)optval = sock->conn->pcb.raw->chksum_offset;
|
||||
}
|
||||
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_RAW, IPV6_CHECKSUM) = %d\n",
|
||||
s, (*(int *)optval)) );
|
||||
lwip_getsockopt_impl_ipv6_checksum(s, sock, optval);
|
||||
break;
|
||||
#endif /* LWIP_IPV6 && LWIP_RAW */
|
||||
default:
|
||||
@@ -3355,6 +3401,7 @@ lwip_setsockopt_impl(int s, int level, int optname, const void *optval, socklen_
|
||||
|
||||
#ifdef LWIP_HOOK_SOCKETS_SETSOCKOPT
|
||||
if (LWIP_HOOK_SOCKETS_SETSOCKOPT(s, sock, level, optname, optval, optlen, &err)) {
|
||||
done_socket(sock);
|
||||
return err;
|
||||
}
|
||||
#endif
|
||||
@@ -3646,7 +3693,15 @@ lwip_setsockopt_impl(int s, int level, int optname, const void *optval, socklen_
|
||||
/* Level: IPPROTO_IPV6 */
|
||||
case IPPROTO_IPV6:
|
||||
switch (optname) {
|
||||
case IPV6_V6ONLY:
|
||||
#if LWIP_IPV6 && LWIP_RAW
|
||||
case IPV6_CHECKSUM:
|
||||
err = lwip_setsockopt_impl_ipv6_checksum(s, sock, optval, optlen);
|
||||
if (err) {
|
||||
return err;
|
||||
}
|
||||
break;
|
||||
#endif /* LWIP_IPV6 && LWIP_RAW */
|
||||
case IPV6_V6ONLY:
|
||||
LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, optlen, int);
|
||||
if (*(const int *)optval) {
|
||||
netconn_set_ipv6only(sock->conn, 1);
|
||||
@@ -3744,26 +3799,10 @@ lwip_setsockopt_impl(int s, int level, int optname, const void *optval, socklen_
|
||||
switch (optname) {
|
||||
#if LWIP_IPV6 && LWIP_RAW
|
||||
case IPV6_CHECKSUM:
|
||||
/* It should not be possible to disable the checksum generation with ICMPv6
|
||||
* as per RFC 3542 chapter 3.1 */
|
||||
if (sock->conn->pcb.raw->protocol == IPPROTO_ICMPV6) {
|
||||
done_socket(sock);
|
||||
return EINVAL;
|
||||
err = lwip_setsockopt_impl_ipv6_checksum(s, sock, optval, optlen);
|
||||
if (err) {
|
||||
return err;
|
||||
}
|
||||
|
||||
LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, int, NETCONN_RAW);
|
||||
if (*(const int *)optval < 0) {
|
||||
sock->conn->pcb.raw->chksum_reqd = 0;
|
||||
} else if (*(const int *)optval & 1) {
|
||||
/* Per RFC3542, odd offsets are not allowed */
|
||||
done_socket(sock);
|
||||
return EINVAL;
|
||||
} else {
|
||||
sock->conn->pcb.raw->chksum_reqd = 1;
|
||||
sock->conn->pcb.raw->chksum_offset = (u16_t) * (const int *)optval;
|
||||
}
|
||||
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_RAW, IPV6_CHECKSUM, ..) -> %d\n",
|
||||
s, sock->conn->pcb.raw->chksum_reqd));
|
||||
break;
|
||||
#endif /* LWIP_IPV6 && LWIP_RAW */
|
||||
default:
|
||||
|
||||
@@ -68,11 +68,20 @@ sys_mutex_t lock_tcpip_core;
|
||||
static void tcpip_thread_handle_msg(struct tcpip_msg *msg);
|
||||
|
||||
#if !LWIP_TIMERS
|
||||
/* wait for a message with timers disabled (e.g. pass a timer-check trigger into tcpip_thread) */
|
||||
#define TCPIP_MBOX_FETCH(mbox, msg) sys_mbox_fetch(mbox, msg)
|
||||
|
||||
/** Wait for a message with timers disabled (e.g. pass a timer-check trigger into tcpip_thread) */
|
||||
static void
|
||||
tcpip_mbox_fetch(sys_mbox_t* mbox, void** msg)
|
||||
{
|
||||
LWIP_ASSERT_CORE_LOCKED();
|
||||
|
||||
UNLOCK_TCPIP_CORE();
|
||||
sys_mbox_fetch(mbox, msg);
|
||||
LOCK_TCPIP_CORE();
|
||||
}
|
||||
|
||||
#else /* !LWIP_TIMERS */
|
||||
/* wait for a message, timeouts are processed while waiting */
|
||||
#define TCPIP_MBOX_FETCH(mbox, msg) tcpip_timeouts_mbox_fetch(mbox, msg)
|
||||
|
||||
/**
|
||||
* Wait (forever) for a message to arrive in an mbox.
|
||||
* While waiting, timeouts are processed.
|
||||
@@ -81,7 +90,7 @@ static void tcpip_thread_handle_msg(struct tcpip_msg *msg);
|
||||
* @param msg the place to store the message
|
||||
*/
|
||||
static void
|
||||
tcpip_timeouts_mbox_fetch(sys_mbox_t *mbox, void **msg)
|
||||
tcpip_mbox_fetch(sys_mbox_t *mbox, void **msg)
|
||||
{
|
||||
u32_t sleeptime, res;
|
||||
|
||||
@@ -139,7 +148,7 @@ tcpip_thread(void *arg)
|
||||
while (1) { /* MAIN Loop */
|
||||
LWIP_TCPIP_THREAD_ALIVE();
|
||||
/* wait for a message, timeouts are processed while waiting */
|
||||
TCPIP_MBOX_FETCH(&tcpip_mbox, (void **)&msg);
|
||||
tcpip_mbox_fetch(&tcpip_mbox, (void **)&msg);
|
||||
if (msg == NULL) {
|
||||
LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: invalid message: NULL\n"));
|
||||
LWIP_ASSERT("tcpip_thread: invalid message", 0);
|
||||
@@ -428,7 +437,7 @@ tcpip_untimeout(sys_timeout_handler h, void *arg)
|
||||
|
||||
/**
|
||||
* Sends a message to TCPIP thread to call a function. Caller thread blocks on
|
||||
* on a provided semaphore, which ist NOT automatically signalled by TCPIP thread,
|
||||
* on a provided semaphore, which is NOT automatically signalled by TCPIP thread,
|
||||
* this has to be done by the user.
|
||||
* It is recommended to use LWIP_TCPIP_CORE_LOCKING since this is the way
|
||||
* with least runtime overhead.
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
* GOOD custom entropy
|
||||
*
|
||||
* Missing things / @todo:
|
||||
* - some unhandled/untested things migh be caught by LWIP_ASSERTs...
|
||||
* - some unhandled/untested things might be caught by LWIP_ASSERTs...
|
||||
*/
|
||||
|
||||
#include "lwip/opt.h"
|
||||
@@ -133,6 +133,15 @@ static err_t altcp_mbedtls_handle_rx_appldata(struct altcp_pcb *conn, altcp_mbed
|
||||
static int altcp_mbedtls_bio_send(void *ctx, const unsigned char *dataptr, size_t size);
|
||||
|
||||
|
||||
static void
|
||||
altcp_mbedtls_flush_output(altcp_mbedtls_state_t* state)
|
||||
{
|
||||
int flushed = mbedtls_ssl_flush_output(&state->ssl_context);
|
||||
if (flushed) {
|
||||
LWIP_DEBUGF(ALTCP_MBEDTLS_DEBUG, ("mbedtls_ssl_flush_output failed: %d\n", flushed));
|
||||
}
|
||||
}
|
||||
|
||||
/* callback functions from inner/lower connection: */
|
||||
|
||||
/** Accept callback from lower connection (i.e. TCP)
|
||||
@@ -531,7 +540,7 @@ altcp_mbedtls_lower_sent(void *arg, struct altcp_pcb *inner_conn, u16_t len)
|
||||
/* remove ACKed bytes from overhead adjust counter */
|
||||
state->overhead_bytes_adjust -= len;
|
||||
/* try to send more if we failed before (may increase overhead adjust counter) */
|
||||
mbedtls_ssl_flush_output(&state->ssl_context);
|
||||
altcp_mbedtls_flush_output(state);
|
||||
/* remove calculated overhead from ACKed bytes len */
|
||||
app_len = len - (u16_t)overhead;
|
||||
/* update application write counter and inform application */
|
||||
@@ -559,7 +568,7 @@ altcp_mbedtls_lower_poll(void *arg, struct altcp_pcb *inner_conn)
|
||||
if (conn->state) {
|
||||
altcp_mbedtls_state_t *state = (altcp_mbedtls_state_t *)conn->state;
|
||||
/* try to send more if we failed before */
|
||||
mbedtls_ssl_flush_output(&state->ssl_context);
|
||||
altcp_mbedtls_flush_output(state);
|
||||
if (altcp_mbedtls_handle_rx_appldata(conn, state) == ERR_ABRT) {
|
||||
return ERR_ABRT;
|
||||
}
|
||||
@@ -1233,7 +1242,7 @@ altcp_mbedtls_write(struct altcp_pcb *conn, const void *dataptr, u16_t len, u8_t
|
||||
allow sending more if this succeeded (this is a hack because neither
|
||||
returning 0 nor MBEDTLS_ERR_SSL_WANT_WRITE worked for me) */
|
||||
if (state->ssl_context.out_left) {
|
||||
mbedtls_ssl_flush_output(&state->ssl_context);
|
||||
altcp_mbedtls_flush_output(state);
|
||||
if (state->ssl_context.out_left) {
|
||||
return ERR_MEM;
|
||||
}
|
||||
|
||||
@@ -576,6 +576,10 @@ const struct altcp_functions altcp_proxyconnect_functions = {
|
||||
altcp_default_get_tcp_addrinfo,
|
||||
altcp_default_get_ip,
|
||||
altcp_default_get_port
|
||||
#if LWIP_TCP_KEEPALIVE
|
||||
, altcp_default_keepalive_disable
|
||||
, altcp_default_keepalive_enable
|
||||
#endif
|
||||
#ifdef LWIP_DEBUG
|
||||
, altcp_default_dbg_get_tcp_state
|
||||
#endif
|
||||
|
||||
@@ -229,12 +229,15 @@ http_parse_response_status(struct pbuf *p, u16_t *http_version, u16_t *http_stat
|
||||
} else {
|
||||
status_num_len = end1 - space1 - 1;
|
||||
}
|
||||
memset(status_num, 0, sizeof(status_num));
|
||||
if (pbuf_copy_partial(p, status_num, (u16_t)status_num_len, space1 + 1) == status_num_len) {
|
||||
int status = atoi(status_num);
|
||||
if ((status > 0) && (status <= 0xFFFF)) {
|
||||
*http_status = (u16_t)status;
|
||||
return ERR_OK;
|
||||
if (status_num_len < sizeof(status_num)) {
|
||||
if (pbuf_copy_partial(p, status_num, (u16_t)status_num_len, space1 + 1) == status_num_len) {
|
||||
int status;
|
||||
status_num[status_num_len] = 0;
|
||||
status = atoi(status_num);
|
||||
if ((status > 0) && (status <= 0xFFFF)) {
|
||||
*http_status = (u16_t)status;
|
||||
return ERR_OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -261,11 +264,14 @@ http_wait_headers(struct pbuf *p, u32_t *content_length, u16_t *total_header_len
|
||||
if (content_len_line_end != 0xFFFF) {
|
||||
char content_len_num[16];
|
||||
u16_t content_len_num_len = (u16_t)(content_len_line_end - content_len_hdr - 16);
|
||||
memset(content_len_num, 0, sizeof(content_len_num));
|
||||
if (pbuf_copy_partial(p, content_len_num, content_len_num_len, content_len_hdr + 16) == content_len_num_len) {
|
||||
int len = atoi(content_len_num);
|
||||
if ((len >= 0) && ((u32_t)len < HTTPC_CONTENT_LEN_INVALID)) {
|
||||
*content_length = (u32_t)len;
|
||||
if (content_len_num_len < sizeof(content_len_num)) {
|
||||
if (pbuf_copy_partial(p, content_len_num, content_len_num_len, content_len_hdr + 16) == content_len_num_len) {
|
||||
int len;
|
||||
content_len_num[content_len_num_len] = 0;
|
||||
len = atoi(content_len_num);
|
||||
if ((len >= 0) && ((u32_t)len < HTTPC_CONTENT_LEN_INVALID)) {
|
||||
*content_length = (u32_t)len;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -489,7 +495,7 @@ static int
|
||||
httpc_create_request_string(const httpc_connection_t *settings, const char* server_name, int server_port, const char* uri,
|
||||
int use_host, char *buffer, size_t buffer_size)
|
||||
{
|
||||
if (settings->use_proxy) {
|
||||
if (settings && settings->use_proxy) {
|
||||
LWIP_ASSERT("server_name != NULL", server_name != NULL);
|
||||
if (server_port != HTTP_DEFAULT_PORT) {
|
||||
return snprintf(buffer, buffer_size, HTTPC_REQ_11_PROXY_PORT_FORMAT(server_name, server_port, uri, server_name));
|
||||
@@ -517,6 +523,7 @@ httpc_init_connection_common(httpc_state_t **connection, const httpc_connection_
|
||||
size_t server_name_len, uri_len;
|
||||
#endif
|
||||
|
||||
LWIP_ERROR("httpc connection settings not give", settings != NULL, return ERR_ARG;);
|
||||
LWIP_ASSERT("uri != NULL", uri != NULL);
|
||||
|
||||
/* get request len */
|
||||
@@ -561,12 +568,12 @@ httpc_init_connection_common(httpc_state_t **connection, const httpc_connection_
|
||||
req->uri = req->server_name + server_name_len + 1;
|
||||
memcpy(req->uri, uri, uri_len + 1);
|
||||
#endif
|
||||
req->pcb = altcp_new(settings->altcp_allocator);
|
||||
req->pcb = altcp_new(settings ? settings->altcp_allocator : NULL);
|
||||
if(req->pcb == NULL) {
|
||||
httpc_free_state(req);
|
||||
return ERR_MEM;
|
||||
}
|
||||
req->remote_port = settings->use_proxy ? settings->proxy_port : server_port;
|
||||
req->remote_port = (settings && settings->use_proxy) ? settings->proxy_port : server_port;
|
||||
altcp_arg(req->pcb, req);
|
||||
altcp_recv(req->pcb, httpc_tcp_recv);
|
||||
altcp_err(req->pcb, httpc_tcp_err);
|
||||
@@ -626,7 +633,7 @@ httpc_init_connection_addr(httpc_state_t **connection, const httpc_connection_t
|
||||
* @param settings connection settings (callbacks, proxy, etc.)
|
||||
* @param recv_fn the http body (not the headers) are passed to this callback
|
||||
* @param callback_arg argument passed to all the callbacks
|
||||
* @param connection retreives the connection handle (to match in callbacks)
|
||||
* @param connection retrieves the connection handle (to match in callbacks)
|
||||
* @return ERR_OK if starting the request succeeds (callback_fn will be called later)
|
||||
* or an error code
|
||||
*/
|
||||
@@ -671,7 +678,7 @@ httpc_get_file(const ip_addr_t* server_addr, u16_t port, const char* uri, const
|
||||
* @param settings connection settings (callbacks, proxy, etc.)
|
||||
* @param recv_fn the http body (not the headers) are passed to this callback
|
||||
* @param callback_arg argument passed to all the callbacks
|
||||
* @param connection retreives the connection handle (to match in callbacks)
|
||||
* @param connection retrieves the connection handle (to match in callbacks)
|
||||
* @return ERR_OK if starting the request succeeds (callback_fn will be called later)
|
||||
* or an error code
|
||||
*/
|
||||
@@ -689,12 +696,12 @@ httpc_get_file_dns(const char* server_name, u16_t port, const char* uri, const h
|
||||
return err;
|
||||
}
|
||||
|
||||
if (settings->use_proxy) {
|
||||
if (settings && settings->use_proxy) {
|
||||
err = httpc_get_internal_addr(req, &settings->proxy_addr);
|
||||
} else {
|
||||
err = httpc_get_internal_dns(req, server_name);
|
||||
}
|
||||
if(err != ERR_OK) {
|
||||
if (err != ERR_OK) {
|
||||
httpc_free_state(req);
|
||||
return err;
|
||||
}
|
||||
@@ -727,12 +734,17 @@ httpc_fs_init(httpc_filestate_t **filestate_out, const char* local_file_name,
|
||||
{
|
||||
httpc_filestate_t *filestate;
|
||||
size_t file_len, alloc_len;
|
||||
mem_size_t alloc_mem_size;
|
||||
FILE *f;
|
||||
|
||||
file_len = strlen(local_file_name);
|
||||
alloc_len = sizeof(httpc_filestate_t) + file_len + 1;
|
||||
|
||||
filestate = (httpc_filestate_t *)mem_malloc((mem_size_t)alloc_len);
|
||||
alloc_mem_size = (mem_size_t)alloc_len;
|
||||
if (alloc_mem_size < alloc_len) {
|
||||
/* overflow */
|
||||
return ERR_MEM;
|
||||
}
|
||||
filestate = (httpc_filestate_t *)mem_malloc(alloc_mem_size);
|
||||
if (filestate == NULL) {
|
||||
return ERR_MEM;
|
||||
}
|
||||
@@ -812,7 +824,7 @@ httpc_fs_tcp_recv(void *arg, struct altcp_pcb *pcb, struct pbuf *p, err_t err)
|
||||
* @param uri uri to get from the server, remember leading "/"!
|
||||
* @param settings connection settings (callbacks, proxy, etc.)
|
||||
* @param callback_arg argument passed to all the callbacks
|
||||
* @param connection retreives the connection handle (to match in callbacks)
|
||||
* @param connection retrieves the connection handle (to match in callbacks)
|
||||
* @return ERR_OK if starting the request succeeds (callback_fn will be called later)
|
||||
* or an error code
|
||||
*/
|
||||
@@ -864,7 +876,7 @@ httpc_get_file_to_disk(const ip_addr_t* server_addr, u16_t port, const char* uri
|
||||
* @param uri uri to get from the server, remember leading "/"!
|
||||
* @param settings connection settings (callbacks, proxy, etc.)
|
||||
* @param callback_arg argument passed to all the callbacks
|
||||
* @param connection retreives the connection handle (to match in callbacks)
|
||||
* @param connection retrieves the connection handle (to match in callbacks)
|
||||
* @return ERR_OK if starting the request succeeds (callback_fn will be called later)
|
||||
* or an error code
|
||||
*/
|
||||
|
||||
@@ -120,7 +120,6 @@
|
||||
#define CRLF "\r\n"
|
||||
#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE
|
||||
#define HTTP11_CONNECTIONKEEPALIVE "Connection: keep-alive"
|
||||
#define HTTP11_CONNECTIONKEEPALIVE2 "Connection: Keep-Alive"
|
||||
#endif
|
||||
|
||||
#if LWIP_HTTPD_DYNAMIC_FILE_READ
|
||||
@@ -471,6 +470,32 @@ http_state_alloc(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/** Make sure the post code knows that the connection is closed */
|
||||
static void
|
||||
http_state_close_post(struct http_state* hs)
|
||||
{
|
||||
#if LWIP_HTTPD_SUPPORT_POST
|
||||
if (hs != NULL) {
|
||||
if ((hs->post_content_len_left != 0)
|
||||
#if LWIP_HTTPD_POST_MANUAL_WND
|
||||
|| ((hs->no_auto_wnd != 0) && (hs->unrecved_bytes != 0))
|
||||
#endif /* LWIP_HTTPD_POST_MANUAL_WND */
|
||||
) {
|
||||
/* prevent calling httpd_post_finished twice */
|
||||
hs->post_content_len_left = 0;
|
||||
#if LWIP_HTTPD_POST_MANUAL_WND
|
||||
hs->unrecved_bytes = 0;
|
||||
#endif /* LWIP_HTTPD_POST_MANUAL_WND */
|
||||
/* make sure the post code knows that the connection is closed */
|
||||
http_uri_buf[0] = 0;
|
||||
httpd_post_finished(hs, http_uri_buf, LWIP_HTTPD_URI_BUF_LEN);
|
||||
}
|
||||
}
|
||||
#else /* LWIP_HTTPD_SUPPORT_POST*/
|
||||
LWIP_UNUSED_ARG(hs);
|
||||
#endif /* LWIP_HTTPD_SUPPORT_POST*/
|
||||
}
|
||||
|
||||
/** Free a struct http_state.
|
||||
* Also frees the file data if dynamic.
|
||||
*/
|
||||
@@ -505,6 +530,7 @@ http_state_eof(struct http_state *hs)
|
||||
hs->req = NULL;
|
||||
}
|
||||
#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */
|
||||
http_state_close_post(hs);
|
||||
}
|
||||
|
||||
/** Free a struct http_state.
|
||||
@@ -598,20 +624,7 @@ http_close_or_abort_conn(struct altcp_pcb *pcb, struct http_state *hs, u8_t abor
|
||||
err_t err;
|
||||
LWIP_DEBUGF(HTTPD_DEBUG, ("Closing connection %p\n", (void *)pcb));
|
||||
|
||||
#if LWIP_HTTPD_SUPPORT_POST
|
||||
if (hs != NULL) {
|
||||
if ((hs->post_content_len_left != 0)
|
||||
#if LWIP_HTTPD_POST_MANUAL_WND
|
||||
|| ((hs->no_auto_wnd != 0) && (hs->unrecved_bytes != 0))
|
||||
#endif /* LWIP_HTTPD_POST_MANUAL_WND */
|
||||
) {
|
||||
/* make sure the post code knows that the connection is closed */
|
||||
http_uri_buf[0] = 0;
|
||||
httpd_post_finished(hs, http_uri_buf, LWIP_HTTPD_URI_BUF_LEN);
|
||||
}
|
||||
}
|
||||
#endif /* LWIP_HTTPD_SUPPORT_POST*/
|
||||
|
||||
http_state_close_post(hs);
|
||||
|
||||
altcp_arg(pcb, NULL);
|
||||
altcp_recv(pcb, NULL);
|
||||
@@ -1818,7 +1831,7 @@ http_post_request(struct pbuf *inp, struct http_state *hs,
|
||||
#define HTTP_HDR_CONTENT_LEN "Content-Length: "
|
||||
#define HTTP_HDR_CONTENT_LEN_LEN 16
|
||||
#define HTTP_HDR_CONTENT_LEN_DIGIT_MAX_LEN 10
|
||||
char *scontent_len = lwip_strnstr(uri_end + 1, HTTP_HDR_CONTENT_LEN, crlfcrlf - (uri_end + 1));
|
||||
char *scontent_len = lwip_strnistr(uri_end + 1, HTTP_HDR_CONTENT_LEN, crlfcrlf - (uri_end + 1));
|
||||
if (scontent_len != NULL) {
|
||||
char *scontent_len_end = lwip_strnstr(scontent_len + HTTP_HDR_CONTENT_LEN_LEN, CRLF, HTTP_HDR_CONTENT_LEN_DIGIT_MAX_LEN);
|
||||
if (scontent_len_end != NULL) {
|
||||
@@ -2086,8 +2099,7 @@ http_parse_request(struct pbuf *inp, struct http_state *hs, struct altcp_pcb *pc
|
||||
#if LWIP_HTTPD_SUPPORT_11_KEEPALIVE
|
||||
/* This is HTTP/1.0 compatible: for strict 1.1, a connection
|
||||
would always be persistent unless "close" was specified. */
|
||||
if (!is_09 && (lwip_strnstr(data, HTTP11_CONNECTIONKEEPALIVE, data_len) ||
|
||||
lwip_strnstr(data, HTTP11_CONNECTIONKEEPALIVE2, data_len))) {
|
||||
if (!is_09 && lwip_strnistr(data, HTTP11_CONNECTIONKEEPALIVE, data_len)) {
|
||||
hs->keepalive = 1;
|
||||
} else {
|
||||
hs->keepalive = 0;
|
||||
@@ -2401,7 +2413,7 @@ http_init_file(struct http_state *hs, struct fs_file *file, int is_09, const cha
|
||||
search for the end of the header. */
|
||||
char *file_start = lwip_strnstr(hs->file, CRLF CRLF, hs->left);
|
||||
if (file_start != NULL) {
|
||||
int diff = file_start + 4 - hs->file;
|
||||
size_t diff = file_start + 4 - hs->file;
|
||||
hs->file += diff;
|
||||
hs->left -= (u32_t)diff;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ while($file = <FILES>) {
|
||||
print(HEADER "HTTP/1.0 200 OK\r\n");
|
||||
}
|
||||
print(HEADER "Server: lwIP/pre-0.6 (http://www.sics.se/~adam/lwip/)\r\n");
|
||||
if($file =~ /\.html$/) {
|
||||
if($file =~ /\.s?html?$/) {
|
||||
print(HEADER "Content-type: text/html\r\n");
|
||||
} elsif($file =~ /\.gif$/) {
|
||||
print(HEADER "Content-type: image/gif\r\n");
|
||||
|
||||
@@ -77,7 +77,7 @@ static int deflate_level; /* default compression level, can be changed via comma
|
||||
#define CHDIR(path) SetCurrentDirectoryA(path)
|
||||
#define CHDIR_SUCCEEDED(ret) (ret == TRUE)
|
||||
|
||||
#elif __linux__
|
||||
#elif __linux__ || __APPLE__
|
||||
|
||||
#define GETCWD(path, len) getcwd(path, len)
|
||||
#define GETCWD_SUCCEEDED(ret) (ret != NULL)
|
||||
@@ -895,6 +895,10 @@ static int is_ssi_file(const char *filename)
|
||||
/* build up the relative path to this file */
|
||||
size_t sublen = strlen(curSubdir);
|
||||
size_t freelen = sizeof(curSubdir) - sublen - 1;
|
||||
if (sublen + strlen(filename) + 1 >= sizeof(curSubdir)) {
|
||||
/* prevent buffer overflow */
|
||||
return 0;
|
||||
}
|
||||
strncat(curSubdir, "/", freelen);
|
||||
strncat(curSubdir, filename, freelen - 1);
|
||||
curSubdir[sizeof(curSubdir) - 1] = 0;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2013-2019, tinydir authors:
|
||||
Copyright (c) 2013-2021, tinydir authors:
|
||||
- Cong Xu
|
||||
- Lautis Sun
|
||||
- Baudouin Feildel
|
||||
@@ -125,8 +125,13 @@ extern "C" {
|
||||
# define _TINYDIR_FUNC static __inline
|
||||
#elif !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
|
||||
# define _TINYDIR_FUNC static __inline__
|
||||
#else
|
||||
#elif defined(__cplusplus)
|
||||
# define _TINYDIR_FUNC static inline
|
||||
#elif defined(__GNUC__)
|
||||
/* Suppress unused function warning */
|
||||
# define _TINYDIR_FUNC __attribute__((unused)) static
|
||||
#else
|
||||
# define _TINYDIR_FUNC static
|
||||
#endif
|
||||
|
||||
/* readdir_r usage; define TINYDIR_USE_READDIR_R to use it (if supported) */
|
||||
@@ -543,7 +548,9 @@ int tinydir_readfile(const tinydir_dir *dir, tinydir_file *file)
|
||||
if (_tstat(
|
||||
#elif (defined _BSD_SOURCE) || (defined _DEFAULT_SOURCE) \
|
||||
|| ((defined _XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)) \
|
||||
|| ((defined _POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L))
|
||||
|| ((defined _POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L)) \
|
||||
|| ((defined __APPLE__) && (defined __MACH__)) \
|
||||
|| (defined BSD)
|
||||
if (lstat(
|
||||
#else
|
||||
if (stat(
|
||||
@@ -636,7 +643,7 @@ int tinydir_file_open(tinydir_file *file, const _tinydir_char_t *path)
|
||||
int result = 0;
|
||||
int found = 0;
|
||||
_tinydir_char_t dir_name_buf[_TINYDIR_PATH_MAX];
|
||||
_tinydir_char_t file_name_buf[_TINYDIR_FILENAME_MAX];
|
||||
_tinydir_char_t file_name_buf[_TINYDIR_PATH_MAX];
|
||||
_tinydir_char_t *dir_name;
|
||||
_tinydir_char_t *base_name;
|
||||
#if (defined _MSC_VER || defined __MINGW32__)
|
||||
|
||||
@@ -302,7 +302,7 @@ lwiperf_tcp_client_send_more(lwiperf_state_tcp_t *conn)
|
||||
/* this session is byte-limited */
|
||||
u32_t amount_bytes = lwip_htonl(conn->settings.amount);
|
||||
/* @todo: this can send up to 1*MSS more than requested... */
|
||||
if (amount_bytes >= conn->bytes_transferred) {
|
||||
if (conn->bytes_transferred >= amount_bytes) {
|
||||
/* all requested bytes transferred -> close the connection */
|
||||
lwiperf_tcp_close(conn, LWIPERF_TCP_DONE_CLIENT);
|
||||
return ERR_OK;
|
||||
|
||||
@@ -1272,7 +1272,7 @@ mdns_parse_pkt_known_answers(struct netif *netif, struct mdns_packet *pkt,
|
||||
} else if (match & REPLY_SERVICE_TXT) {
|
||||
mdns_prepare_txtdata(service);
|
||||
if (service->txtdata.length == ans.rd_length &&
|
||||
pbuf_memcmp(pkt->pbuf, ans.rd_offset, service->txtdata.name, ans.rd_length) == 0) {
|
||||
pbuf_memcmp(pkt->pbuf, ans.rd_offset, service->txtdata.rdata, ans.rd_length) == 0) {
|
||||
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: Skipping known answer: TXT\n"));
|
||||
reply->serv_replies[i] &= ~REPLY_SERVICE_TXT;
|
||||
}
|
||||
@@ -1792,7 +1792,7 @@ mdns_probe_conflict(struct netif *netif, s8_t slot)
|
||||
}
|
||||
|
||||
/**
|
||||
* Loockup matching request for response MDNS packet
|
||||
* Lookup matching request for response MDNS packet
|
||||
*/
|
||||
#if LWIP_MDNS_SEARCH
|
||||
static struct mdns_request *
|
||||
@@ -2050,7 +2050,7 @@ mdns_handle_response(struct mdns_packet *pkt, struct netif *netif)
|
||||
} else if (ans.info.type == DNS_RRTYPE_TXT) {
|
||||
mdns_prepare_txtdata(service);
|
||||
if (service->txtdata.length == ans.rd_length &&
|
||||
pbuf_memcmp(pkt->pbuf, ans.rd_offset, service->txtdata.name, ans.rd_length) == 0) {
|
||||
pbuf_memcmp(pkt->pbuf, ans.rd_offset, service->txtdata.rdata, ans.rd_length) == 0) {
|
||||
LWIP_DEBUGF(MDNS_DEBUG, ("mDNS: response equals our own TXT record -> no conflict\n"));
|
||||
conflict = 0;
|
||||
}
|
||||
@@ -2613,10 +2613,29 @@ mdns_resp_rename_service(struct netif *netif, u8_t slot, const char *name)
|
||||
return ERR_OK;
|
||||
}
|
||||
|
||||
/* Adds an RFC 1035 character-string to TXT RDATA. */
|
||||
static err_t
|
||||
mdns_txt_add_charstr(struct mdns_txtdata *txtdata, const char *value, u8_t len)
|
||||
{
|
||||
if (1 + len + txtdata->length > MDNS_TXT_RDATA_MAXLEN) {
|
||||
LWIP_DEBUGF(MDNS_DEBUG, ("mdns_txt_add_charstr: adding string would exceed buffer (1+%d+%d > %d). Consider increasing MDNS_TXT_RDATA_MAXLEN.\n",
|
||||
len, txtdata->length, MDNS_TXT_RDATA_MAXLEN));
|
||||
return ERR_MEM;
|
||||
}
|
||||
txtdata->rdata[txtdata->length] = len;
|
||||
txtdata->length++;
|
||||
if (len) {
|
||||
MEMCPY(&txtdata->rdata[txtdata->length], value, len);
|
||||
txtdata->length += len;
|
||||
}
|
||||
return ERR_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup mdns
|
||||
* Call this function from inside the service_get_txt_fn_t callback to add text data.
|
||||
* Buffer for TXT data is 256 bytes, and each field is prefixed with a length byte.
|
||||
* Buffer for TXT data is MDNS_TXT_RDATA_MAXLEN (default 256) bytes, and each
|
||||
* field is prefixed with a length byte.
|
||||
* @param service The service provided to the get_txt callback
|
||||
* @param txt String to add to the TXT field.
|
||||
* @param txt_len Length of string
|
||||
@@ -2628,8 +2647,10 @@ mdns_resp_add_service_txtitem(struct mdns_service *service, const char *txt, u8_
|
||||
LWIP_ASSERT_CORE_LOCKED();
|
||||
LWIP_ASSERT("mdns_resp_add_service_txtitem: service != NULL", service);
|
||||
|
||||
LWIP_DEBUGF(MDNS_DEBUG, ("mDNS: adding txtitem: txt_len=%d, %02x %02x %02x %02x\n", txt_len, (int)txt[0], (int)txt[1], (int)txt[2], (int)txt[3])); /* DEBUG FIXME(dlitz) */
|
||||
|
||||
/* Use a mdns_domain struct to store txt chunks since it is the same encoding */
|
||||
return mdns_domain_add_label(&service->txtdata, txt, txt_len);
|
||||
return mdns_txt_add_charstr(&service->txtdata, txt, txt_len);
|
||||
}
|
||||
|
||||
#if LWIP_MDNS_SEARCH
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
#define DOMAIN_JUMP_SIZE 2
|
||||
#define DOMAIN_JUMP 0xc000
|
||||
|
||||
#define TOPDOMAIN_LOCAL "local"
|
||||
#define TOPDOMAIN_LOCAL "local2"
|
||||
|
||||
#define REVERSE_PTR_TOPDOMAIN "arpa"
|
||||
#define REVERSE_PTR_V4_DOMAIN "in-addr"
|
||||
|
||||
@@ -62,7 +62,7 @@ static void mdns_clear_outmsg(struct mdns_outmsg *outmsg);
|
||||
void
|
||||
mdns_prepare_txtdata(struct mdns_service *service)
|
||||
{
|
||||
memset(&service->txtdata, 0, sizeof(struct mdns_domain));
|
||||
memset(&service->txtdata, 0, sizeof(struct mdns_txtdata));
|
||||
if (service->txt_fn) {
|
||||
service->txt_fn(service, service->txt_userdata);
|
||||
}
|
||||
@@ -508,7 +508,7 @@ mdns_add_txt_answer(struct mdns_outpacket *reply, struct mdns_outmsg *msg,
|
||||
}
|
||||
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: Responding with TXT record\n"));
|
||||
return mdns_add_answer(reply, &service_instance, DNS_RRTYPE_TXT, DNS_RRCLASS_IN,
|
||||
msg->cache_flush, ttl, (u8_t *) &service->txtdata.name,
|
||||
msg->cache_flush, ttl, service->txtdata.rdata,
|
||||
service->txtdata.length, NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -318,7 +318,7 @@ mqtt_append_request(struct mqtt_request_t **tail, struct mqtt_request_t *r)
|
||||
|
||||
LWIP_ASSERT("mqtt_append_request: tail != NULL", tail != NULL);
|
||||
|
||||
/* Iterate trough queue to find head, and count total timeout time */
|
||||
/* Iterate through queue to find head, and count total timeout time */
|
||||
for (iter = *tail; iter != NULL; iter = iter->next) {
|
||||
time_before += iter->timeout_diff;
|
||||
head = iter;
|
||||
@@ -1337,9 +1337,16 @@ mqtt_client_connect(mqtt_client_t *client, const ip_addr_t *ip_addr, u16_t port,
|
||||
LWIP_ERROR("mqtt_client_connect: client_info->will_topic length overflow", len <= 0xFF, return ERR_VAL);
|
||||
LWIP_ERROR("mqtt_client_connect: client_info->will_topic length must be > 0", len > 0, return ERR_VAL);
|
||||
will_topic_len = (u8_t)len;
|
||||
len = strlen(client_info->will_msg);
|
||||
LWIP_ERROR("mqtt_client_connect: client_info->will_msg length overflow", len <= 0xFF, return ERR_VAL);
|
||||
will_msg_len = (u8_t)len;
|
||||
if (client_info->will_msg_len == 0)
|
||||
{
|
||||
len = strlen(client_info->will_msg);
|
||||
LWIP_ERROR("mqtt_client_connect: client_info->will_msg length overflow", len <= 0xFF, return ERR_VAL);
|
||||
will_msg_len = (u8_t)len;
|
||||
}
|
||||
else
|
||||
{
|
||||
will_msg_len = client_info->will_msg_len;
|
||||
}
|
||||
len = remaining_length + 2 + will_topic_len + 2 + will_msg_len;
|
||||
LWIP_ERROR("mqtt_client_connect: remaining_length overflow", len <= 0xFFFF, return ERR_VAL);
|
||||
remaining_length = (u16_t)len;
|
||||
|
||||
@@ -391,7 +391,7 @@ netbiosns_recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, const ip_addr_t
|
||||
resp->resp_hdr.authorityRRs = 0;
|
||||
resp->resp_hdr.additionalRRs = 0;
|
||||
|
||||
/* prepare NetBIOS header datas */
|
||||
/* prepare NetBIOS header data */
|
||||
MEMCPY( resp->resp_name.encname, netbios_question_hdr->encname, sizeof(netbios_question_hdr->encname));
|
||||
resp->resp_name.nametype = netbios_question_hdr->nametype;
|
||||
resp->resp_name.type = netbios_question_hdr->type;
|
||||
|
||||
@@ -1305,7 +1305,7 @@ smtp_process(void *arg, struct altcp_pcb *pcb, struct pbuf *p)
|
||||
LWIP_DEBUGF(SMTP_DEBUG_TRACE, ("smtp_process: received response code: %d\n", response_code));
|
||||
if (smtp_is_response_finished(s) != ERR_OK) {
|
||||
LWIP_DEBUGF(SMTP_DEBUG_TRACE, ("smtp_process: partly received response code: %d\n", response_code));
|
||||
/* wait for next packet to complete the respone */
|
||||
/* wait for next packet to complete the response */
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -463,14 +463,8 @@ snmp_asn1_dec_s32t(struct snmp_pbuf_stream *pbuf_stream, u16_t len, s32_t *value
|
||||
if ((len > 0) && (len < 5)) {
|
||||
PBUF_OP_EXEC(snmp_pbuf_stream_read(pbuf_stream, &data));
|
||||
|
||||
if (data & 0x80) {
|
||||
/* negative, start from -1 */
|
||||
*value = -1;
|
||||
*value = (*value << 8) | data;
|
||||
} else {
|
||||
/* positive, start from 0 */
|
||||
*value = data;
|
||||
}
|
||||
/* sign extension */
|
||||
*value = (s8_t)data;
|
||||
len--;
|
||||
/* shift in the remaining value */
|
||||
while (len > 0) {
|
||||
|
||||
@@ -584,7 +584,7 @@ snmp_oid_prefix(struct snmp_obj_id *target, const u32_t *oid, u8_t oid_len)
|
||||
|
||||
/**
|
||||
* Combine two OIDs into struct snmp_obj_id
|
||||
* @param target Assignmet target
|
||||
* @param target Assignment target
|
||||
* @param oid1 OID 1
|
||||
* @param oid1_len OID 1 length
|
||||
* @param oid2 OID 2
|
||||
|
||||
@@ -328,7 +328,6 @@ snmp_receive(void *handle, struct pbuf *p, const ip_addr_t *source_ip, u16_t por
|
||||
struct snmp_varbind vb;
|
||||
|
||||
vb.next = NULL;
|
||||
vb.prev = NULL;
|
||||
vb.type = SNMP_ASN1_TYPE_COUNTER32;
|
||||
vb.value_len = sizeof(u32_t);
|
||||
|
||||
@@ -1058,7 +1057,7 @@ snmp_parse_inbound_frame(struct snmp_request *request)
|
||||
IF_PARSE_EXEC(snmpv3_get_user((char *)request->msg_user_name, &auth, key, NULL, NULL));
|
||||
IF_PARSE_EXEC(snmpv3_auth(&auth_stream, request->inbound_pbuf->tot_len, key, auth, hmac));
|
||||
|
||||
if (memcmp(request->msg_authentication_parameters, hmac, SNMP_V3_MAX_AUTH_PARAM_LENGTH)) {
|
||||
if (lwip_memcmp_consttime(request->msg_authentication_parameters, hmac, SNMP_V3_MAX_AUTH_PARAM_LENGTH)) {
|
||||
snmp_stats.wrongdigests++;
|
||||
request->msg_flags = SNMP_V3_NOAUTHNOPRIV;
|
||||
request->error_status = SNMP_ERR_AUTHORIZATIONERROR;
|
||||
|
||||
@@ -137,7 +137,6 @@ static s32_t req_id = 1;
|
||||
* @param dst_idx index in 0 .. SNMP_TRAP_DESTINATIONS-1
|
||||
* @param enable switch if 0 destination is disabled >0 enabled.
|
||||
*
|
||||
* @retval void
|
||||
*/
|
||||
void
|
||||
snmp_trap_dst_enable(u8_t dst_idx, u8_t enable)
|
||||
@@ -154,7 +153,6 @@ snmp_trap_dst_enable(u8_t dst_idx, u8_t enable)
|
||||
* @param dst_idx index in 0 .. SNMP_TRAP_DESTINATIONS-1
|
||||
* @param dst IPv4 address in host order.
|
||||
*
|
||||
* @retval void
|
||||
*/
|
||||
void
|
||||
snmp_trap_dst_ip_set(u8_t dst_idx, const ip_addr_t *dst)
|
||||
@@ -171,7 +169,6 @@ snmp_trap_dst_ip_set(u8_t dst_idx, const ip_addr_t *dst)
|
||||
*
|
||||
* @param enable enable SNMP traps
|
||||
*
|
||||
* @retval void
|
||||
*/
|
||||
void
|
||||
snmp_set_auth_traps_enabled(u8_t enable)
|
||||
@@ -200,7 +197,6 @@ snmp_get_auth_traps_enabled(void)
|
||||
*
|
||||
* @param snmp_version version that will be used for sending traps
|
||||
*
|
||||
* @retval void
|
||||
*/
|
||||
void
|
||||
snmp_set_default_trap_version(u8_t snmp_version)
|
||||
@@ -274,7 +270,6 @@ snmp_prepare_trap_oid(struct snmp_obj_id *dest_snmp_trap_oid, const struct snmp_
|
||||
* @param generic_trap SNMP v1 generic trap
|
||||
* @param specific_trap SNMP v1 specific trap
|
||||
* @param varbinds list of varbinds
|
||||
* @retval void
|
||||
*/
|
||||
static void
|
||||
snmp_prepare_necessary_msg_fields(struct snmp_msg_trap *trap_msg, const struct snmp_obj_id *eoid, s32_t generic_trap, s32_t specific_trap, struct snmp_varbind *varbinds)
|
||||
@@ -351,13 +346,11 @@ snmp_send_trap_or_notification_or_inform_generic(struct snmp_msg_trap *trap_msg,
|
||||
u16_t tot_len = 0;
|
||||
err_t err = ERR_OK;
|
||||
u32_t timestamp = 0;
|
||||
struct snmp_varbind *original_varbinds = varbinds;
|
||||
struct snmp_varbind *original_prev = NULL;
|
||||
struct snmp_obj_id snmp_trap_oid = { 0 }; /* used for converting SNMPv1 generic/specific trap parameter to SNMPv2 snmpTrapOID */
|
||||
struct snmp_varbind snmp_v2_special_varbinds[] = {
|
||||
/* First varbind is used to store sysUpTime */
|
||||
{
|
||||
NULL, /* *next */
|
||||
NULL, /* *prev */
|
||||
{ /* oid */
|
||||
8, /* oid len */
|
||||
{1, 3, 6, 1, 2, 1, 1, 3} /* oid for sysUpTime */
|
||||
@@ -369,7 +362,6 @@ snmp_send_trap_or_notification_or_inform_generic(struct snmp_msg_trap *trap_msg,
|
||||
/* Second varbind is used to store snmpTrapOID */
|
||||
{
|
||||
NULL, /* *next */
|
||||
NULL, /* *prev */
|
||||
{ /* oid */
|
||||
10, /* oid len */
|
||||
{1, 3, 6, 1, 6, 3, 1, 1, 4, 1} /* oid for snmpTrapOID */
|
||||
@@ -383,7 +375,6 @@ snmp_send_trap_or_notification_or_inform_generic(struct snmp_msg_trap *trap_msg,
|
||||
LWIP_ASSERT_SNMP_LOCKED();
|
||||
|
||||
snmp_v2_special_varbinds[0].next = &snmp_v2_special_varbinds[1];
|
||||
snmp_v2_special_varbinds[1].prev = &snmp_v2_special_varbinds[0];
|
||||
|
||||
snmp_v2_special_varbinds[0].value = ×tamp;
|
||||
|
||||
@@ -391,15 +382,10 @@ snmp_send_trap_or_notification_or_inform_generic(struct snmp_msg_trap *trap_msg,
|
||||
|
||||
/* see rfc3584 */
|
||||
if (trap_msg->snmp_version == SNMP_VERSION_2c) {
|
||||
struct snmp_obj_id snmp_trap_oid = { 0 }; /* used for converting SNMPv1 generic/specific trap parameter to SNMPv2 snmpTrapOID */
|
||||
err = snmp_prepare_trap_oid(&snmp_trap_oid, eoid, generic_trap, specific_trap);
|
||||
if (err == ERR_OK) {
|
||||
snmp_v2_special_varbinds[1].value_len = snmp_trap_oid.len * sizeof(snmp_trap_oid.id[0]);
|
||||
snmp_v2_special_varbinds[1].value = snmp_trap_oid.id;
|
||||
if (varbinds != NULL) {
|
||||
original_prev = varbinds->prev;
|
||||
varbinds->prev = &snmp_v2_special_varbinds[1];
|
||||
}
|
||||
varbinds = snmp_v2_special_varbinds; /* After inserting two varbinds at the beginning of the list, make sure that pointer is pointing to the first element */
|
||||
}
|
||||
}
|
||||
@@ -422,9 +408,6 @@ snmp_send_trap_or_notification_or_inform_generic(struct snmp_msg_trap *trap_msg,
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((trap_msg->snmp_version == SNMP_VERSION_2c) && (original_varbinds != NULL)) {
|
||||
original_varbinds->prev = original_prev;
|
||||
}
|
||||
req_id++;
|
||||
return err;
|
||||
}
|
||||
@@ -498,7 +481,6 @@ snmp_send_trap_specific(s32_t specific_trap, struct snmp_varbind *varbinds)
|
||||
/**
|
||||
* @ingroup snmp_traps
|
||||
* Send coldstart trap
|
||||
* @retval void
|
||||
*/
|
||||
void
|
||||
snmp_coldstart_trap(void)
|
||||
@@ -509,7 +491,6 @@ snmp_coldstart_trap(void)
|
||||
/**
|
||||
* @ingroup snmp_traps
|
||||
* Send authentication failure trap (used internally by agent)
|
||||
* @retval void
|
||||
*/
|
||||
void
|
||||
snmp_authfail_trap(void)
|
||||
@@ -727,7 +708,6 @@ snmp_trap_header_enc_pdu(struct snmp_msg_trap *trap, struct snmp_pbuf_stream *pb
|
||||
* Encodes trap header part that is SNMP v1 header specific.
|
||||
* @param trap Trap message
|
||||
* @param pbuf_stream stream used for storing data inside pbuf
|
||||
* @retval void
|
||||
*/
|
||||
static err_t
|
||||
snmp_trap_header_enc_v1_specific(struct snmp_msg_trap *trap, struct snmp_pbuf_stream *pbuf_stream)
|
||||
@@ -781,7 +761,6 @@ snmp_trap_header_enc_v1_specific(struct snmp_msg_trap *trap, struct snmp_pbuf_st
|
||||
*
|
||||
* @param trap Trap message
|
||||
* @param pbuf_stream stream used for storing data inside pbuf
|
||||
* @retval void
|
||||
*/
|
||||
static err_t
|
||||
snmp_trap_header_enc_v2c_specific(struct snmp_msg_trap *trap, struct snmp_pbuf_stream *pbuf_stream)
|
||||
@@ -814,7 +793,6 @@ snmp_trap_header_enc_v2c_specific(struct snmp_msg_trap *trap, struct snmp_pbuf_s
|
||||
*
|
||||
* @param trap Trap message
|
||||
* @param pbuf_stream stream used for storing data inside pbuf
|
||||
* @retval void
|
||||
*/
|
||||
static err_t
|
||||
snmp_trap_header_enc(struct snmp_msg_trap *trap, struct snmp_pbuf_stream *pbuf_stream)
|
||||
|
||||
@@ -914,7 +914,8 @@ sntp_getkodreceived(u8_t idx)
|
||||
* Initialize one of the NTP servers by name
|
||||
*
|
||||
* @param idx the index of the NTP server to set must be < SNTP_MAX_SERVERS
|
||||
* @param server DNS name of the NTP server to set, to be resolved at contact time
|
||||
* @param server DNS name of the NTP server to set, to be resolved at contact
|
||||
* time. Note sntp stores the pointer, it doesn't copy the string.
|
||||
*/
|
||||
void
|
||||
sntp_setservername(u8_t idx, const char *server)
|
||||
|
||||
@@ -157,7 +157,7 @@ send_request(const ip_addr_t *addr, u16_t port, u16_t opcode, const char* fname,
|
||||
static err_t
|
||||
send_error(const ip_addr_t *addr, u16_t port, enum tftp_error code, const char *str)
|
||||
{
|
||||
int str_length = strlen(str);
|
||||
size_t str_length = strlen(str);
|
||||
struct pbuf *p;
|
||||
u16_t *payload;
|
||||
err_t ret;
|
||||
@@ -454,10 +454,12 @@ tftp_init_common(u8_t mode, const struct tftp_context *ctx)
|
||||
return ERR_MEM;
|
||||
}
|
||||
|
||||
ret = udp_bind(pcb, IP_ANY_TYPE, TFTP_PORT);
|
||||
if (ret != ERR_OK) {
|
||||
udp_remove(pcb);
|
||||
return ret;
|
||||
if (mode & LWIP_TFTP_MODE_SERVER) {
|
||||
ret = udp_bind(pcb, IP_ANY_TYPE, TFTP_PORT);
|
||||
if (ret != ERR_OK) {
|
||||
udp_remove(pcb);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
tftp_state.handle = NULL;
|
||||
|
||||
@@ -261,3 +261,26 @@ lwip_itoa(char *result, size_t bufsize, int number)
|
||||
memmove(res, tmp, (size_t)((result + bufsize) - tmp));
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef lwip_memcmp_consttime
|
||||
/**
|
||||
* @ingroup sys_nonstandard
|
||||
* The goal of this function is to compare memory with constant runtime in order to prevent
|
||||
* timing attacks to various parts in the stack.
|
||||
* To do that, in contrast to memcmp(), it only returns:
|
||||
* 0: equal
|
||||
* != 0: not equal
|
||||
*/
|
||||
int lwip_memcmp_consttime(const void* s1, const void* s2, size_t len)
|
||||
{
|
||||
size_t i;
|
||||
const unsigned char* a1 = (const unsigned char*)s1;
|
||||
const unsigned char* a2 = (const unsigned char*)s2;
|
||||
unsigned char ret = 0;
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
ret |= a1[i] ^ a2[i];
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -196,8 +196,11 @@ PACK_STRUCT_END
|
||||
#if (LWIP_ALTCP && LWIP_EVENT_API)
|
||||
#error "The application layered tcp API does not work with LWIP_EVENT_API"
|
||||
#endif
|
||||
#if (MEM_LIBC_MALLOC && MEM_USE_POOLS)
|
||||
#error "MEM_LIBC_MALLOC and MEM_USE_POOLS may not both be simultaneously enabled in your lwipopts.h"
|
||||
#if (MEM_CUSTOM_ALLOCATOR && !(defined(MEM_CUSTOM_FREE) && defined(MEM_CUSTOM_MALLOC) && defined(MEM_CUSTOM_CALLOC)))
|
||||
#error "All of MEM_CUSTOM_FREE/MEM_CUSTOM_MALLOC/MEM_CUSTOM_CALLOC must be provided if MEM_CUSTOM_ALLOCATOR is enabled in your lwipopts.h"
|
||||
#endif
|
||||
#if (MEM_USE_POOLS && MEM_CUSTOM_ALLOCATOR)
|
||||
#error "MEM_USE_POOLS may not be used with a custom allocator (MEM_CUSTOM_ALLOCATOR or MEM_LIBC_MALLOC) enabled in your lwipopts.h"
|
||||
#endif
|
||||
#if (MEM_USE_POOLS && !MEMP_USE_CUSTOM_POOLS)
|
||||
#error "MEM_USE_POOLS requires custom pools (MEMP_USE_CUSTOM_POOLS) to be enabled in your lwipopts.h"
|
||||
|
||||
@@ -143,7 +143,7 @@ acd_add(struct netif *netif, struct acd *acd,
|
||||
|
||||
/**
|
||||
* @ingroup acd
|
||||
* Remvoe ACD client from the client list
|
||||
* Remove ACD client from the client list
|
||||
*
|
||||
* @param netif network interface from which to remove the acd client
|
||||
* @param acd acd module to be removed from the list
|
||||
|
||||
@@ -223,9 +223,10 @@ autoip_conflict_callback(struct netif *netif, acd_callback_enum_t state)
|
||||
autoip_restart(netif);
|
||||
break;
|
||||
case ACD_DECLINE:
|
||||
/* "delete" conflicting address so a new one will be selected in
|
||||
* autoip_start() */
|
||||
/* "delete" conflicting address and increment tried addr so a new one
|
||||
* will be selected in autoip_start() */
|
||||
ip4_addr_set_any(&autoip->llipaddr);
|
||||
autoip->tried_llipaddr++;
|
||||
autoip_stop(netif);
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -773,9 +773,6 @@ dhcp_set_struct(struct netif *netif, struct dhcp *dhcp)
|
||||
* @ingroup dhcp4
|
||||
* Removes a struct dhcp from a netif.
|
||||
*
|
||||
* ATTENTION: Only use this when not using dhcp_set_struct() to allocate the
|
||||
* struct dhcp since the memory is passed back to the heap.
|
||||
*
|
||||
* @param netif the netif from which to remove the struct dhcp
|
||||
*/
|
||||
void dhcp_cleanup(struct netif *netif)
|
||||
@@ -811,6 +808,7 @@ dhcp_start(struct netif *netif)
|
||||
{
|
||||
struct dhcp *dhcp;
|
||||
err_t result;
|
||||
u8_t saved_flags;
|
||||
|
||||
LWIP_ASSERT_CORE_LOCKED();
|
||||
LWIP_ERROR("netif != NULL", (netif != NULL), return ERR_ARG;);
|
||||
@@ -833,6 +831,8 @@ dhcp_start(struct netif *netif)
|
||||
return ERR_MEM;
|
||||
}
|
||||
|
||||
/* clear the flags, the rest is cleared below */
|
||||
dhcp->flags = 0;
|
||||
/* store this dhcp client in the netif */
|
||||
netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, dhcp);
|
||||
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): allocated dhcp\n"));
|
||||
@@ -846,9 +846,10 @@ dhcp_start(struct netif *netif)
|
||||
/* dhcp is cleared below, no need to reset flag*/
|
||||
}
|
||||
|
||||
/* clear data structure */
|
||||
/* clear data structure but preserve DHCP_FLAG_EXTERNAL_MEM for dhcp_cleanup() */
|
||||
saved_flags = dhcp->flags;
|
||||
memset(dhcp, 0, sizeof(struct dhcp));
|
||||
/* dhcp_set_state(&dhcp, DHCP_STATE_OFF); */
|
||||
dhcp->flags = saved_flags & DHCP_FLAG_EXTERNAL_MEM;
|
||||
|
||||
|
||||
#if LWIP_DHCP_DOES_ACD_CHECK
|
||||
@@ -1600,7 +1601,7 @@ again:
|
||||
/* special case: there might be more than one server */
|
||||
LWIP_DHCP_INPUT_ERROR("len %% 4 == 0", len % 4 == 0, return ERR_VAL;);
|
||||
/* limit number of DNS servers */
|
||||
decode_len = LWIP_MIN(len, 4 * DNS_MAX_SERVERS);
|
||||
decode_len = LWIP_MIN(len, 4 * LWIP_DHCP_PROVIDE_DNS_SERVERS);
|
||||
LWIP_DHCP_INPUT_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;);
|
||||
decode_idx = DHCP_OPTION_IDX_DNS_SERVER;
|
||||
break;
|
||||
|
||||
@@ -940,9 +940,9 @@ etharp_query(struct netif *netif, const ip4_addr_t *ipaddr, struct pbuf *q)
|
||||
netif_addr_idx_t i;
|
||||
|
||||
/* non-unicast address? */
|
||||
if (ip4_addr_isbroadcast(ipaddr, netif) ||
|
||||
ip4_addr_ismulticast(ipaddr) ||
|
||||
ip4_addr_isany(ipaddr)) {
|
||||
if (ip4_addr_isany(ipaddr) ||
|
||||
ip4_addr_isbroadcast(ipaddr, netif) ||
|
||||
ip4_addr_ismulticast(ipaddr)) {
|
||||
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: will not add non-unicast IP address to ARP cache\n"));
|
||||
return ERR_ARG;
|
||||
}
|
||||
|
||||
@@ -213,6 +213,7 @@ icmp_input(struct pbuf *p, struct netif *inp)
|
||||
ip4_addr_copy(iphdr->src, *src);
|
||||
ip4_addr_copy(iphdr->dest, *ip4_current_src_addr());
|
||||
ICMPH_TYPE_SET(iecho, ICMP_ER);
|
||||
p->if_idx = NETIF_NO_INDEX; /* we're reusing this pbuf, so reset its if_idx */
|
||||
#if CHECKSUM_GEN_ICMP
|
||||
IF__NETIF_CHECKSUM_ENABLED(inp, NETIF_CHECKSUM_GEN_ICMP) {
|
||||
/* adjust the checksum */
|
||||
@@ -351,7 +352,9 @@ icmp_send_response(struct pbuf *p, u8_t type, u8_t code)
|
||||
|
||||
/* Keep IP header + up to 8 bytes */
|
||||
response_pkt_len = IP_HLEN + ICMP_DEST_UNREACH_DATASIZE;
|
||||
if (p->tot_len < response_pkt_len) response_pkt_len = p->tot_len;
|
||||
if (p->tot_len < response_pkt_len) {
|
||||
response_pkt_len = p->tot_len;
|
||||
}
|
||||
|
||||
/* ICMP header + part of original packet */
|
||||
q = pbuf_alloc(PBUF_IP, sizeof(struct icmp_hdr) + response_pkt_len, PBUF_RAM);
|
||||
|
||||
@@ -175,19 +175,21 @@ ip_reass_free_complete_datagram(struct ip_reassdata *ipr, struct ip_reassdata *p
|
||||
|
||||
MIB2_STATS_INC(mib2.ipreasmfails);
|
||||
#if LWIP_ICMP
|
||||
iprh = (struct ip_reass_helper *)ipr->p->payload;
|
||||
if (iprh->start == 0) {
|
||||
/* The first fragment was received, send ICMP time exceeded. */
|
||||
/* First, de-queue the first pbuf from r->p. */
|
||||
p = ipr->p;
|
||||
ipr->p = iprh->next_pbuf;
|
||||
/* Then, copy the original header into it. */
|
||||
SMEMCPY(p->payload, &ipr->iphdr, IP_HLEN);
|
||||
icmp_time_exceeded(p, ICMP_TE_FRAG);
|
||||
clen = pbuf_clen(p);
|
||||
LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff);
|
||||
pbufs_freed = (u16_t)(pbufs_freed + clen);
|
||||
pbuf_free(p);
|
||||
if (ipr->p != NULL) {
|
||||
iprh = (struct ip_reass_helper *)ipr->p->payload;
|
||||
if (iprh->start == 0) {
|
||||
/* The first fragment was received, send ICMP time exceeded. */
|
||||
/* First, de-queue the first pbuf from r->p. */
|
||||
p = ipr->p;
|
||||
ipr->p = iprh->next_pbuf;
|
||||
/* Then, copy the original header into it. */
|
||||
SMEMCPY(p->payload, &ipr->iphdr, IP_HLEN);
|
||||
icmp_time_exceeded(p, ICMP_TE_FRAG);
|
||||
clen = pbuf_clen(p);
|
||||
LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff);
|
||||
pbufs_freed = (u16_t)(pbufs_freed + clen);
|
||||
pbuf_free(p);
|
||||
}
|
||||
}
|
||||
#endif /* LWIP_ICMP */
|
||||
|
||||
|
||||
@@ -1011,9 +1011,10 @@ netif_found:
|
||||
goto ip6_input_cleanup;
|
||||
}
|
||||
|
||||
/* Returned p point to IPv6 header.
|
||||
/* Returned p points to IPv6 header.
|
||||
* Update all our variables and pointers and continue. */
|
||||
ip6hdr = (struct ip6_hdr *)p->payload;
|
||||
ip_data.current_ip6_header = ip6hdr;
|
||||
nexth = &IP6H_NEXTH(ip6hdr);
|
||||
hlen = hlen_tot = IP6_HLEN;
|
||||
pbuf_remove_header(p, IP6_HLEN);
|
||||
|
||||
@@ -154,35 +154,37 @@ ip6_reass_free_complete_datagram(struct ip6_reassdata *ipr)
|
||||
struct ip6_reass_helper *iprh;
|
||||
|
||||
#if LWIP_ICMP6
|
||||
iprh = (struct ip6_reass_helper *)ipr->p->payload;
|
||||
if (iprh->start == 0) {
|
||||
/* The first fragment was received, send ICMP time exceeded. */
|
||||
/* First, de-queue the first pbuf from r->p. */
|
||||
p = ipr->p;
|
||||
ipr->p = iprh->next_pbuf;
|
||||
/* Restore the part that we've overwritten with our helper structure, or we
|
||||
* might send garbage (and disclose a pointer) in the ICMPv6 reply. */
|
||||
MEMCPY(p->payload, ipr->orig_hdr, sizeof(iprh));
|
||||
/* Then, move back to the original ipv6 header (we are now pointing to Fragment header).
|
||||
This cannot fail since we already checked when receiving this fragment. */
|
||||
if (pbuf_header_force(p, (s16_t)((u8_t*)p->payload - (u8_t*)ipr->iphdr))) {
|
||||
LWIP_ASSERT("ip6_reass_free: moving p->payload to ip6 header failed", 0);
|
||||
if (ipr->p != NULL) {
|
||||
iprh = (struct ip6_reass_helper *)ipr->p->payload;
|
||||
if (iprh->start == 0) {
|
||||
/* The first fragment was received, send ICMP time exceeded. */
|
||||
/* First, de-queue the first pbuf from r->p. */
|
||||
p = ipr->p;
|
||||
ipr->p = iprh->next_pbuf;
|
||||
/* Restore the part that we've overwritten with our helper structure, or we
|
||||
* might send garbage (and disclose a pointer) in the ICMPv6 reply. */
|
||||
MEMCPY(p->payload, ipr->orig_hdr, sizeof(*iprh));
|
||||
/* Then, move back to the original ipv6 header (we are now pointing to Fragment header).
|
||||
This cannot fail since we already checked when receiving this fragment. */
|
||||
if (pbuf_header_force(p, (s16_t)((u8_t*)p->payload - (u8_t*)ipr->iphdr))) {
|
||||
LWIP_ASSERT("ip6_reass_free: moving p->payload to ip6 header failed", 0);
|
||||
}
|
||||
else {
|
||||
/* Reconstruct the zoned source and destination addresses, so that we do
|
||||
* not end up sending the ICMP response over the wrong link. */
|
||||
ip6_addr_t src_addr, dest_addr;
|
||||
ip6_addr_copy_from_packed(src_addr, IPV6_FRAG_SRC(ipr));
|
||||
ip6_addr_set_zone(&src_addr, ipr->src_zone);
|
||||
ip6_addr_copy_from_packed(dest_addr, IPV6_FRAG_DEST(ipr));
|
||||
ip6_addr_set_zone(&dest_addr, ipr->dest_zone);
|
||||
/* Send the actual ICMP response. */
|
||||
icmp6_time_exceeded_with_addrs(p, ICMP6_TE_FRAG, &src_addr, &dest_addr);
|
||||
}
|
||||
clen = pbuf_clen(p);
|
||||
LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff);
|
||||
pbufs_freed = (u16_t)(pbufs_freed + clen);
|
||||
pbuf_free(p);
|
||||
}
|
||||
else {
|
||||
/* Reconstruct the zoned source and destination addresses, so that we do
|
||||
* not end up sending the ICMP response over the wrong link. */
|
||||
ip6_addr_t src_addr, dest_addr;
|
||||
ip6_addr_copy_from_packed(src_addr, IPV6_FRAG_SRC(ipr));
|
||||
ip6_addr_set_zone(&src_addr, ipr->src_zone);
|
||||
ip6_addr_copy_from_packed(dest_addr, IPV6_FRAG_DEST(ipr));
|
||||
ip6_addr_set_zone(&dest_addr, ipr->dest_zone);
|
||||
/* Send the actual ICMP response. */
|
||||
icmp6_time_exceeded_with_addrs(p, ICMP6_TE_FRAG, &src_addr, &dest_addr);
|
||||
}
|
||||
clen = pbuf_clen(p);
|
||||
LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff);
|
||||
pbufs_freed = (u16_t)(pbufs_freed + clen);
|
||||
pbuf_free(p);
|
||||
}
|
||||
#endif /* LWIP_ICMP6 */
|
||||
|
||||
@@ -447,6 +449,19 @@ ip6_reass(struct pbuf *p)
|
||||
}
|
||||
}
|
||||
#endif /* IP_REASS_CHECK_OVERLAP */
|
||||
/* Check if the fragments received so far have no gaps. */
|
||||
if (iprh_prev != NULL) {
|
||||
if (iprh_prev->end != start) {
|
||||
/* There is a fragment missing between the current
|
||||
* and the previous fragment */
|
||||
valid = 0;
|
||||
}
|
||||
}
|
||||
if (end != iprh_tmp->start) {
|
||||
/* There is a fragment missing between the current
|
||||
* and the following fragment */
|
||||
valid = 0;
|
||||
}
|
||||
/* the new pbuf should be inserted before this */
|
||||
next_pbuf = q;
|
||||
if (iprh_prev != NULL) {
|
||||
@@ -658,6 +673,7 @@ ip6_reass(struct pbuf *p)
|
||||
}
|
||||
|
||||
/* Return the pbuf chain */
|
||||
MIB2_STATS_INC(mib2.ip6reasmoks);
|
||||
return p;
|
||||
}
|
||||
/* the datagram is not (yet?) reassembled completely */
|
||||
|
||||
@@ -687,7 +687,7 @@ nd6_input(struct pbuf *p, struct netif *inp)
|
||||
case ND6_OPTION_TYPE_SOURCE_LLADDR:
|
||||
{
|
||||
struct lladdr_option *lladdr_opt;
|
||||
if (option_len < sizeof(struct lladdr_option)) {
|
||||
if (option_len < (ND6_LLADDR_OPTION_MIN_LENGTH + inp->hwaddr_len)) {
|
||||
goto lenerr_drop_free_return;
|
||||
}
|
||||
lladdr_opt = (struct lladdr_option *)buffer;
|
||||
@@ -1176,7 +1176,7 @@ nd6_tmr(void)
|
||||
|
||||
/** Send a neighbor solicitation message for a specific neighbor cache entry
|
||||
*
|
||||
* @param entry the neightbor cache entry for which to send the message
|
||||
* @param entry the neighbor cache entry for which to send the message
|
||||
* @param flags one of ND6_SEND_FLAG_*
|
||||
*/
|
||||
static void
|
||||
@@ -1707,7 +1707,7 @@ nd6_select_router(const ip6_addr_t *ip6addr, struct netif *netif)
|
||||
/* Look for valid routers. A reachable router is preferred. */
|
||||
valid_router = -1;
|
||||
for (i = 0; i < LWIP_ND6_NUM_ROUTERS; i++) {
|
||||
/* Is the router netif both set and apppropriate? */
|
||||
/* Is the router netif both set and appropriate? */
|
||||
if (default_router_list[i].neighbor_entry != NULL) {
|
||||
router_netif = default_router_list[i].neighbor_entry->netif;
|
||||
if ((router_netif != NULL) && (netif != NULL ? netif == router_netif :
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
#include "lwip/stats.h"
|
||||
#include "lwip/err.h"
|
||||
|
||||
#include <stdio.h> /* snprintf */
|
||||
#include <string.h>
|
||||
|
||||
#if MEM_LIBC_MALLOC
|
||||
@@ -151,7 +152,7 @@ mem_overflow_init_raw(void *p, size_t size)
|
||||
}
|
||||
#endif /* MEM_OVERFLOW_CHECK || MEMP_OVERFLOW_CHECK */
|
||||
|
||||
#if MEM_LIBC_MALLOC || MEM_USE_POOLS
|
||||
#if MEM_CUSTOM_ALLOCATOR || MEM_USE_POOLS
|
||||
|
||||
/** mem_init is not used when using pools instead of a heap or using
|
||||
* C library malloc().
|
||||
@@ -171,23 +172,9 @@ mem_trim(void *mem, mem_size_t size)
|
||||
LWIP_UNUSED_ARG(size);
|
||||
return mem;
|
||||
}
|
||||
#endif /* MEM_LIBC_MALLOC || MEM_USE_POOLS */
|
||||
#endif /* MEM_CUSTOM_ALLOCATOR || MEM_USE_POOLS */
|
||||
|
||||
#if MEM_LIBC_MALLOC
|
||||
/* lwIP heap implemented using C library malloc() */
|
||||
|
||||
/* in case C library malloc() needs extra protection,
|
||||
* allow these defines to be overridden.
|
||||
*/
|
||||
#ifndef mem_clib_free
|
||||
#define mem_clib_free free
|
||||
#endif
|
||||
#ifndef mem_clib_malloc
|
||||
#define mem_clib_malloc malloc
|
||||
#endif
|
||||
#ifndef mem_clib_calloc
|
||||
#define mem_clib_calloc calloc
|
||||
#endif
|
||||
#if MEM_CUSTOM_ALLOCATOR
|
||||
|
||||
#if LWIP_STATS && MEM_STATS
|
||||
#define MEM_LIBC_STATSHELPER_SIZE LWIP_MEM_ALIGN_SIZE(sizeof(mem_size_t))
|
||||
@@ -206,7 +193,7 @@ mem_trim(void *mem, mem_size_t size)
|
||||
void *
|
||||
mem_malloc(mem_size_t size)
|
||||
{
|
||||
void *ret = mem_clib_malloc(size + MEM_LIBC_STATSHELPER_SIZE);
|
||||
void *ret = MEM_CUSTOM_MALLOC(size + MEM_LIBC_STATSHELPER_SIZE);
|
||||
if (ret == NULL) {
|
||||
MEM_STATS_INC_LOCKED(err);
|
||||
} else {
|
||||
@@ -233,7 +220,7 @@ mem_free(void *rmem)
|
||||
rmem = (u8_t *)rmem - MEM_LIBC_STATSHELPER_SIZE;
|
||||
MEM_STATS_DEC_USED_LOCKED(used, *(mem_size_t *)rmem);
|
||||
#endif
|
||||
mem_clib_free(rmem);
|
||||
MEM_CUSTOM_FREE(rmem);
|
||||
}
|
||||
|
||||
#elif MEM_USE_POOLS
|
||||
@@ -805,7 +792,7 @@ mem_trim(void *rmem, mem_size_t new_size)
|
||||
/* else {
|
||||
next struct mem is used but size between mem and mem2 is not big enough
|
||||
to create another struct mem
|
||||
-> don't do anyhting.
|
||||
-> don't do anything.
|
||||
-> the remaining space stays unused since it is too small
|
||||
} */
|
||||
#if MEM_OVERFLOW_CHECK
|
||||
@@ -977,14 +964,14 @@ mem_malloc_adjust_lfree:
|
||||
|
||||
#endif /* MEM_USE_POOLS */
|
||||
|
||||
#if MEM_LIBC_MALLOC && (!LWIP_STATS || !MEM_STATS)
|
||||
#if MEM_CUSTOM_ALLOCATOR && (!LWIP_STATS || !MEM_STATS)
|
||||
void *
|
||||
mem_calloc(mem_size_t count, mem_size_t size)
|
||||
{
|
||||
return mem_clib_calloc(count, size);
|
||||
return MEM_CUSTOM_CALLOC(count, size);
|
||||
}
|
||||
|
||||
#else /* MEM_LIBC_MALLOC && (!LWIP_STATS || !MEM_STATS) */
|
||||
#else /* MEM_CUSTOM_ALLOCATOR && (!LWIP_STATS || !MEM_STATS) */
|
||||
/**
|
||||
* Contiguously allocates enough space for count objects that are size bytes
|
||||
* of memory each and returns a pointer to the allocated memory.
|
||||
@@ -1014,4 +1001,4 @@ mem_calloc(mem_size_t count, mem_size_t size)
|
||||
}
|
||||
return p;
|
||||
}
|
||||
#endif /* MEM_LIBC_MALLOC && (!LWIP_STATS || !MEM_STATS) */
|
||||
#endif /* MEM_CUSTOM_ALLOCATOR && (!LWIP_STATS || !MEM_STATS) */
|
||||
|
||||
@@ -1409,7 +1409,7 @@ netif_ip6_addr_set_parts(struct netif *netif, s8_t addr_idx, u32_t i0, u32_t i1,
|
||||
if (ip6_addr_isvalid(netif_ip6_addr_state(netif, addr_idx))) {
|
||||
netif_do_ip_addr_changed(netif_ip_addr6(netif, addr_idx), &new_ipaddr);
|
||||
}
|
||||
/* @todo: remove/readd mib2 ip6 entries? */
|
||||
/* @todo: remove/re-add mib2 ip6 entries? */
|
||||
|
||||
ip_addr_copy(netif->ip6_addr[addr_idx], new_ipaddr);
|
||||
|
||||
|
||||
@@ -186,6 +186,8 @@ pbuf_init_alloced_pbuf(struct pbuf *p, void *payload, u16_t tot_len, u16_t len,
|
||||
p->flags = flags;
|
||||
p->ref = 1;
|
||||
p->if_idx = NETIF_NO_INDEX;
|
||||
|
||||
LWIP_PBUF_CUSTOM_DATA_INIT(p);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -858,6 +860,7 @@ pbuf_cat(struct pbuf *h, struct pbuf *t)
|
||||
|
||||
LWIP_ERROR("(h != NULL) && (t != NULL) (programmer violates API)",
|
||||
((h != NULL) && (t != NULL)), return;);
|
||||
LWIP_ASSERT("Creating an infinite loop", h != t);
|
||||
|
||||
/* proceed to last pbuf of chain */
|
||||
for (p = h; p->next != NULL; p = p->next) {
|
||||
@@ -1094,12 +1097,15 @@ pbuf_copy_partial(const struct pbuf *buf, void *dataptr, u16_t len, u16_t offset
|
||||
* a copy into the user-supplied buffer.
|
||||
*
|
||||
* @param p the pbuf from which to copy data
|
||||
* @param buffer the application supplied buffer
|
||||
* @param bufsize size of the application supplied buffer
|
||||
* @param len length of data to copy (dataptr must be big enough). No more
|
||||
* than buf->tot_len will be copied, irrespective of len
|
||||
* @param buffer the application supplied buffer. May be NULL if the caller does not
|
||||
* want to copy. In this case, offset + len should be checked against p->tot_len,
|
||||
* since there's no way for the caller to know why NULL is returned.
|
||||
* @param bufsize size of the application supplied buffer (when buffer is != NULL)
|
||||
* @param len length of data to copy (p and buffer must be big enough)
|
||||
* @param offset offset into the packet buffer from where to begin copying len bytes
|
||||
* @return the number of bytes copied, or 0 on failure
|
||||
* @return - pointer into pbuf payload if that is already contiguous (no copy needed)
|
||||
* - pointer to 'buffer' if data was not contiguous and had to be copied
|
||||
* - NULL on error
|
||||
*/
|
||||
void *
|
||||
pbuf_get_contiguous(const struct pbuf *p, void *buffer, size_t bufsize, u16_t len, u16_t offset)
|
||||
@@ -1108,8 +1114,7 @@ pbuf_get_contiguous(const struct pbuf *p, void *buffer, size_t bufsize, u16_t le
|
||||
u16_t out_offset;
|
||||
|
||||
LWIP_ERROR("pbuf_get_contiguous: invalid buf", (p != NULL), return NULL;);
|
||||
LWIP_ERROR("pbuf_get_contiguous: invalid dataptr", (buffer != NULL), return NULL;);
|
||||
LWIP_ERROR("pbuf_get_contiguous: invalid dataptr", (bufsize >= len), return NULL;);
|
||||
LWIP_ERROR("pbuf_get_contiguous: invalid bufsize", (buffer == NULL) || (bufsize >= len), return NULL;);
|
||||
|
||||
q = pbuf_skip_const(p, offset, &out_offset);
|
||||
if (q != NULL) {
|
||||
@@ -1117,6 +1122,10 @@ pbuf_get_contiguous(const struct pbuf *p, void *buffer, size_t bufsize, u16_t le
|
||||
/* all data in this pbuf, return zero-copy */
|
||||
return (u8_t *)q->payload + out_offset;
|
||||
}
|
||||
if (buffer == NULL) {
|
||||
/* the caller does not want to copy */
|
||||
return NULL;
|
||||
}
|
||||
/* need to copy */
|
||||
if (pbuf_copy_partial(q, buffer, len, out_offset) != len) {
|
||||
/* copying failed: pbuf is too short */
|
||||
|
||||
@@ -610,6 +610,7 @@ raw_new(u8_t proto)
|
||||
#if LWIP_MULTICAST_TX_OPTIONS
|
||||
raw_set_multicast_ttl(pcb, RAW_TTL);
|
||||
#endif /* LWIP_MULTICAST_TX_OPTIONS */
|
||||
pcb_tci_init(pcb);
|
||||
pcb->next = raw_pcbs;
|
||||
raw_pcbs = pcb;
|
||||
}
|
||||
|
||||
@@ -1929,6 +1929,7 @@ tcp_alloc(u8_t prio)
|
||||
pcb->keep_intvl = TCP_KEEPINTVL_DEFAULT;
|
||||
pcb->keep_cnt = TCP_KEEPCNT_DEFAULT;
|
||||
#endif /* LWIP_TCP_KEEPALIVE */
|
||||
pcb_tci_init(pcb);
|
||||
}
|
||||
return pcb;
|
||||
}
|
||||
|
||||
@@ -1564,7 +1564,7 @@ tcp_receive(struct tcp_pcb *pcb)
|
||||
recv_data = inseg.p;
|
||||
/* Since this pbuf now is the responsibility of the
|
||||
application, we delete our reference to it so that we won't
|
||||
(mistakingly) deallocate it. */
|
||||
(mistakenly) deallocate it. */
|
||||
inseg.p = NULL;
|
||||
}
|
||||
if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) {
|
||||
@@ -1687,10 +1687,20 @@ tcp_receive(struct tcp_pcb *pcb)
|
||||
->ooseq. We check the lengths to see which one to
|
||||
discard. */
|
||||
if (inseg.len > next->len) {
|
||||
struct tcp_seg* cseg;
|
||||
|
||||
/* If next segment is the last segment in ooseq
|
||||
and smaller than inseg, that means it has been
|
||||
trimmed before to fit our window, so we just
|
||||
break here. */
|
||||
if (next->next == NULL) {
|
||||
break;
|
||||
}
|
||||
|
||||
/* The incoming segment is larger than the old
|
||||
segment. We replace some segments with the new
|
||||
one. */
|
||||
struct tcp_seg *cseg = tcp_seg_copy(&inseg);
|
||||
cseg = tcp_seg_copy(&inseg);
|
||||
if (cseg != NULL) {
|
||||
if (prev != NULL) {
|
||||
prev->next = cseg;
|
||||
@@ -1983,17 +1993,17 @@ tcp_parseopt(struct tcp_pcb *pcb)
|
||||
return;
|
||||
}
|
||||
/* TCP timestamp option with valid length */
|
||||
tsval = tcp_get_next_optbyte();
|
||||
tsval |= (tcp_get_next_optbyte() << 8);
|
||||
tsval = (tcp_get_next_optbyte() << 24);
|
||||
tsval |= (tcp_get_next_optbyte() << 16);
|
||||
tsval |= (tcp_get_next_optbyte() << 24);
|
||||
tsval |= (tcp_get_next_optbyte() << 8);
|
||||
tsval |= tcp_get_next_optbyte();
|
||||
if (flags & TCP_SYN) {
|
||||
pcb->ts_recent = lwip_ntohl(tsval);
|
||||
pcb->ts_recent = tsval;
|
||||
/* Enable sending timestamps in every segment now that we know
|
||||
the remote host supports it. */
|
||||
tcp_set_flags(pcb, TF_TIMESTAMP);
|
||||
} else if (TCP_SEQ_BETWEEN(pcb->ts_lastacksent, seqno, seqno + tcplen)) {
|
||||
pcb->ts_recent = lwip_ntohl(tsval);
|
||||
pcb->ts_recent = tsval;
|
||||
}
|
||||
/* Advance to next option (6 bytes already read) */
|
||||
tcp_optidx += LWIP_TCP_OPT_LEN_TS - 6;
|
||||
|
||||
@@ -301,7 +301,7 @@ tcp_seg_add_chksum(u16_t chksum, u16_t len, u16_t *seg_chksum,
|
||||
/** Checks if tcp_write is allowed or not (checks state, snd_buf and snd_queuelen).
|
||||
*
|
||||
* @param pcb the tcp pcb to check for
|
||||
* @param len length of data to send (checked agains snd_buf)
|
||||
* @param len length of data to send (checked against snd_buf)
|
||||
* @return ERR_OK if tcp_write is allowed to proceed, another err_t otherwise
|
||||
*/
|
||||
static err_t
|
||||
@@ -1987,6 +1987,9 @@ tcp_rst_common(const struct tcp_pcb *pcb, u32_t seqno, u32_t ackno,
|
||||
|
||||
LWIP_ASSERT("tcp_rst: invalid local_ip", local_ip != NULL);
|
||||
LWIP_ASSERT("tcp_rst: invalid remote_ip", remote_ip != NULL);
|
||||
/* these two are passed only for checks, disable warnings without asserts */
|
||||
LWIP_UNUSED_ARG(local_ip);
|
||||
LWIP_UNUSED_ARG(remote_ip);
|
||||
|
||||
optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(0, pcb);
|
||||
|
||||
|
||||
@@ -988,7 +988,7 @@ udp_bind(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port)
|
||||
for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
|
||||
if (pcb != ipcb) {
|
||||
/* By default, we don't allow to bind to a port that any other udp
|
||||
PCB is already bound to, unless *all* PCBs with that port have tha
|
||||
PCB is already bound to, unless *all* PCBs with that port have the
|
||||
REUSEADDR flag set. */
|
||||
#if SO_REUSE
|
||||
if (!ip_get_option(pcb, SOF_REUSEADDR) ||
|
||||
@@ -1238,6 +1238,7 @@ udp_new(void)
|
||||
#if LWIP_MULTICAST_TX_OPTIONS
|
||||
udp_set_multicast_ttl(pcb, UDP_TTL);
|
||||
#endif /* LWIP_MULTICAST_TX_OPTIONS */
|
||||
pcb_tci_init(pcb);
|
||||
}
|
||||
return pcb;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ extern "C" {
|
||||
|
||||
/**
|
||||
* @ingroup httpc
|
||||
* HTTPC_HAVE_FILE_IO: define this to 1 to have functions dowloading directly
|
||||
* HTTPC_HAVE_FILE_IO: define this to 1 to have functions downloading directly
|
||||
* to disk via fopen/fwrite.
|
||||
* These functions are example implementations of the interface only.
|
||||
*/
|
||||
@@ -116,7 +116,7 @@ typedef void (*httpc_result_fn)(void *arg, httpc_result_t httpc_result, u32_t rx
|
||||
* @param connection http client connection
|
||||
* @param arg argument specified when initiating the request
|
||||
* @param hdr header pbuf(s) (may contain data also)
|
||||
* @param hdr_len length of the heders in 'hdr'
|
||||
* @param hdr_len length of the headers in 'hdr'
|
||||
* @param content_len content length as received in the headers (-1 if not received)
|
||||
* @return if != ERR_OK is returned, the connection is aborted
|
||||
*/
|
||||
|
||||
@@ -88,6 +88,12 @@
|
||||
#define MDNS_OUTPUT_PACKET_SIZE ((MDNS_MAX_SERVICES == 1) ? 512 : 1450)
|
||||
#endif
|
||||
|
||||
/** The maximum size of TXT RDATA allocated for each service record.
|
||||
*/
|
||||
#ifndef MDNS_TXT_RDATA_MAXLEN
|
||||
# define MDNS_TXT_RDATA_MAXLEN 256
|
||||
#endif
|
||||
|
||||
/** MDNS_RESP_USENETIF_EXTCALLBACK==1: register an ext_callback on the netif
|
||||
* to automatically restart probing/announcing on status or address change.
|
||||
*/
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user