Last active
February 21, 2021 14:38
-
-
Save MrPeanutButta/10073969 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://www.sigcomm.org/sites/default/files/ccr/papers/2012/October/2378956-2378961.pdf | |
int dir_24_8_lookup(uint32_t dst) { | |
int nh = tbl_0_23[dst >> 8]; // index in the next hop table | |
if (nh & 0x8000)nh = tbl_24_31[((nh & 0x7fff) << 8) | (dst & 0xff)]; | |
return nh; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment