Commit 0b83e76
authored
Deduplication of pcap header read procedures. (#2082)
* Deduplicate reading of pcap header code.
* Move toString to be free function.
* Update tests + Lint
* Fix needs swap being written to on empty file.
* Enforce strict packing.
* Lint
* Try pre-checking the remaining bytes in stream before read to fix Mac CI fail.
* Fixup checks
* Add safe version of buffer comparison macro that accepts lengths for both buffers.
* Update buffer comparisons.
* Move error checking code to append mode block.
* Add debug statements.
* Explicitly set read pointer to start of file on append mode.
* Lint
* Revert writePcapHeader to be inside PcapFileWriterDevice.
* Remove else.1 parent 66fd711 commit 0b83e76
4 files changed
Lines changed: 214 additions & 202 deletions
File tree
- Pcap++
- header
- src
- Tests
- Pcap++Test/Tests
- PcppTestFramework
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
309 | 312 | | |
310 | 313 | | |
311 | 314 | | |
312 | 315 | | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | 316 | | |
348 | 317 | | |
349 | 318 | | |
| |||
0 commit comments