Changeset 37426 in project for wiki/eggref/5/bitstring
- Timestamp:
- 03/20/19 00:26:22 (22 months ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
wiki/eggref/5/bitstring
r37423 r37426 181 181 ; 182 182 183 ( usebitstring)183 (import bitstring) 184 184 185 185 ; The following will print "integer:3721182122", … … 199 199 ; 200 200 201 ( usebitstring)201 (import bitstring) 202 202 203 203 ; This will print "StringData:(65 66 67 68 69)" … … 211 211 (print "invalid string"))) 212 212 213 ; Example 3. IP packet parsing. 213 ; Example 3. IP packet parsing. 214 214 ; 215 215 … … 234 234 (= Protocol 2) 235 235 (= Protocol 6) 236 (= Protocol 17))) 236 (= Protocol 17))) 237 237 (CheckSum 16) 238 238 (SourceAddr 32 bitstring) … … 250 250 "\n Protocol: " Protocol 251 251 "\n CheckSum: " CheckSum 252 "\n SourceAddr: " 252 "\n SourceAddr: " 253 253 (bitmatch SourceAddr (((A)(B)(C)(D)) (list A B C D))) 254 "\n DestinationAddr: " 254 "\n DestinationAddr: " 255 255 (bitmatch DestinationAddr (((A)(B)(C)(D)) (list A B C D))))) 256 256 (else 257 257 (print "bad datagram"))) 258 258 259 259 260 ; Example 3.1 Using bitconstruct. … … 290 291 ; 291 292 ; WARNING!!! bitpacket feature is experimental !!! 292 ( use bitstring posix srfi-4)293 (import bitstring srfi-4 (chicken file posix)) 293 294 294 295 (bitpacket TGA-Header … … 387 388 == Version History 388 389 390 1.35 391 Port to CHICKEN 5 392 389 393 1.34 390 394 Fix boolean parsing to support terms following boolean terms. (Jonathan Chan)
Note: See TracChangeset
for help on using the changeset viewer.