Skip to content

[GNRC PPP] HDLC definitions#5471

Closed
jia200x wants to merge 1 commit intoRIOT-OS:masterfrom
jia200x:hdlc_hdr
Closed

[GNRC PPP] HDLC definitions#5471
jia200x wants to merge 1 commit intoRIOT-OS:masterfrom
jia200x:hdlc_hdr

Conversation

@jia200x
Copy link
Copy Markdown
Member

@jia200x jia200x commented May 28, 2016

Hi.

This PR contains the definitions of HDLC header and FCS, required by GNRC PPP.

@jia200x jia200x changed the title HDLC definitions [GNRC PPP] HDLC definitions May 28, 2016
@OlegHahm OlegHahm added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: network Area: Networking GNRC labels May 31, 2016
@@ -0,0 +1,88 @@
/*
* Copyright (C) 2015 José Ignacio Alamos <[email protected]>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2016?

@OlegHahm
Copy link
Copy Markdown
Member

I think you're using tabs instead of white spaces.

@jia200x
Copy link
Copy Markdown
Member Author

jia200x commented Oct 31, 2016

@OlegHahm do you think this could be merged? These are generic HDLC definitions but are needed for PPP.

0x6b46, 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb, 0x0e70, 0x1ff9,
0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330,
0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78
};
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be provided externally (i.e. via extern in some C-file), otherwise every file that includes this would need 512b of RAM.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(and we should maybe quickly move this to a non-table solution, since we usually have more ROM than RAM)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

((but that we can do after this one is merged))

*/

/**
* @defgroup net_hdlc_fcs FCS calculation
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this can be unified with sys_checksum_crc16_ccitt (I know, most likely different polynomial!) somehow?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a different polynomial (see this). Maybe add another sys_checksum_crc function?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jia200x which is it then? According to all sources I can find HDLC uses CCITT (0x1021), too. Anyway, here's a more flexible (with regards to polynomials) and more lightweight implementation of CRC16: #6112

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@miri64 PPP uses CRC-CCITT with 0x8408 and 0xffff as initial value. I just read your implementation and I think it can be used for this case.
I will do some tests, in that case I can drop this file.

Cheers

@jia200x
Copy link
Copy Markdown
Member Author

jia200x commented Nov 2, 2016

@miri64 are we still on time to merge this? Or should be postponed?

Cheers!

@miri64
Copy link
Copy Markdown
Member

miri64 commented Nov 3, 2016

@jia200x the release is already feature freezed since yesterday (as announced multiple times on the devel mailinglist) and the release has branched from master. Even if this PR were marked for the release (which it never was apparently) it would now be difficult to get it into the release, if that is what you want, since there needs to be a backport for it.

If a maintainer finds time between testing and and bugfixing for the release to review this PR, it might get merged into master, but I would not put hopes into this. But we can merge this into master ASAP, so that it will be in 2017.01 most definitely.

@OlegHahm
Copy link
Copy Markdown
Member

What are the chances for this release?

@jia200x
Copy link
Copy Markdown
Member Author

jia200x commented Jan 16, 2017 via email

@miri64 miri64 mentioned this pull request Jun 21, 2017
@aabadie aabadie modified the milestone: Release 2017.07 Jun 23, 2017
@kYc0o kYc0o mentioned this pull request Oct 30, 2017
15 tasks
@smlng
Copy link
Copy Markdown
Member

smlng commented Jan 15, 2018

any new here, at least @miri64 comment regarding externalise the table was not addressed yet.

@jia200x
Copy link
Copy Markdown
Member Author

jia200x commented Jan 15, 2018

@sming I will drop that file, I think it's better to add that feature in another PR. Also, I think we should stick to #6112 implementation for FCS.

@kaspar030 kaspar030 removed this from the Release 2018.04 milestone Apr 16, 2018
@miri64 miri64 removed the GNRC label Oct 5, 2018
@miri64
Copy link
Copy Markdown
Member

miri64 commented Feb 18, 2019

@sming I will drop that file, I think it's better to add that feature in another PR. Also, I think we should stick to #6112 implementation for FCS.

Then let's close this PR for now as memo.

@miri64 miri64 added the State: archived State: The PR has been archived for possible future re-adaptation label Feb 18, 2019
@miri64 miri64 closed this Feb 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: network Area: Networking State: archived State: The PR has been archived for possible future re-adaptation Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants