Comments (6)
This patch caused warnings when compiling:
In file included from docsis.c:42:
docsis_symtable.h:1480:1: warning: excess elements in array initializer
{ 237, "SNMPv3AccessViewType", 4, 233, (encode_uchar), (decode_uchar), 1, 2 }, /* TLV 202.54.4 eRouter-I12 Annex B.4.6.4 */
^
docsis_symtable.h:1480:1: note: (near initialization for 'symtable')
docsis_symtable.h:1485:1: warning: excess elements in array initializer
{ 998, "GenericTLV", 0, 0, (encode_nothing), (decode_special), 0, 0 },
^
docsis_symtable.h:1485:1: note: (near initialization for 'symtable')
docsis_symtable.h:1487:1: warning: excess elements in array initializer
{ 157, "MtaConfigDelimiter", 254, 0, (encode_uchar), (decode_uchar), 1, 255 }, /* TLV 254 PKT-SP-PROV1.5-I04 Chapter 9.1 */
^
docsis_symtable.h:1487:1: note: (near initialization for 'symtable')
docsis_symtable.h:1488:1: warning: excess elements in array initializer
{ 999, "/*EndOfDataMkr*/", 255, 0, (encode_nothing), (decode_special), 0, 0 } /* TLV 255 MULPIv3.0-I24 Annex C.1.2.1 */
^
docsis_symtable.h:1488:1: note: (near initialization for 'symtable')
I think NUM_IDENTIFIERS in docsis_common.h must be incremented with 4 (clean compile with this change)
from docsis.
Hmm, odd. I didn't have to increment it myself and was able to compile it.
~/src/docsis/src$ grep "define NUM_IDENTIFIERS" docsis_common.h
#define NUM_IDENTIFIERS 1427
However, when checking the identifiers, there are more than that number:
~/src/docsis/src$ grep encode_ docsis_symtable.h | grep "[{]" | awk '{print $2}' | wc -l
1431
So, my 4 additions would put it over the max.
However, some of those are duplicates.
~/src/docsis/src$ grep encode_ docsis_symtable.h | grep "[{]" | awk '{print $2}' | sort -n | uniq | wc -l
1424
~/src/docsis/src$ grep encode_ docsis_symtable.h | grep "[{]" | awk '{print $2}' | sort -n | uniq -c | sort -n | grep -v " 1"
2 227,
2 239,
2 254,
2 340,
2 378,
2 998,
2 999,
It's possible they're getting optimized out when I'm compiling it.
It's likely those need to get de-duplicated as they will probably be causing other issues.
from docsis.
@Sicarius128 Thank you for fast reply, and thank you for your patch :)
Just for the record, it did compile successfully without tweaking NUM_IDENTIFIERS, but there was the before mentioned warning with excess elements. I did not test the binary compiled with warnings.
The build platform i use is Docker "php:8-apache-buster" with following extra packages installed:
iproute2 net-tools iputils-ping unzip automake libtool libsnmp-dev bison make gcc flex libglib2.0-dev libfl-dev
I did test docsis-files compiled with your patch + NUM_IDENTIFIERS incremented, and it seems to work just fine, the modems accept the docsis-files and TLV84 signaling seems to work just fine
from docsis.
This patch compiles without incrementing NUM_IDENTIFIERS, however, it causes some problems at runtime. Specifically, it causes an extra malformed TLV to appear at the end of decoded binaries:
GenericTLV TlvCode 255 TlvLength 0 TlvValue 0x;
When NUM_IDENTIFIERS is incremented, however, everything appears to work correctly.
from docsis.
I merged this.
Usual disclaimer: I am just doing a "rescue maintainer" job here. I do not use this software any more.
from docsis.
Thanks @Sicarius128 @kriip @prushik !
from docsis.
Related Issues (20)
- TLV81 encoding issue. DOCSIS 3.1 SSD HOT 3
- Arris MTA configfile error HOT 7
- Backslash issue HOT 3
- Fail to encode IPv6 address HOT 1
- comment-in-comment not supportedFirst TLV is MtaConfigDelimiter, forcing PacketCable MTA file
- Encode file for negative value HOT 5
- Add certificate chain file import to TLV 81 and 82 in bootfile encoding
- PacketCable 2.0 dialplan OID (CL-PKTC-EUE-RST-MIB::pktcEUERSTDMValue) HOT 8
- BitString can be decoded but not encoded HOT 4
- Cannot run tests from clean clone HOT 3
- FrameLossMeasurementTransmissionPeriodicity incorrect data type HOT 1
- PKTC Config Hash HOT 24
- ip address length mismatch when decoding GenericTLV
- Segfault when input is incorrect
- When encoding with empty MIC Key, PacketACE Refuses the file. HOT 4
- Issue in decoding configuration file
- clang: error: unknown argument HOT 7
- Installation to debian_10 HOT 2
- MIBs dynamically read or static? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docsis.