const CFI IRI::ContentFragmentIdentifier() const { if ( !_url->has_ref() ) return CFI(); string ref = Fragment(); if ( ref.find("epubcfi(") != 0 ) return CFI(); return CFI(ref); }
static void medsa_print_full(netdissect_options *ndo, const struct medsa_pkthdr *medsa, u_int caplen) { u_char tag = TAG(medsa); ND_PRINT((ndo, "%s", tok2str(tag_values, "Unknown (%u)", tag))); switch (tag) { case TAG_TO_CPU: ND_PRINT((ndo, ", %stagged", SRC_TAG(medsa) ? "" : "un")); ND_PRINT((ndo, ", dev.port:vlan %d.%d:%d", SRC_DEV(medsa), SRC_PORT(medsa), VID(medsa))); ND_PRINT((ndo, ", %s", tok2str(code_values, "Unknown (%u)", CODE(medsa)))); if (CFI(medsa)) ND_PRINT((ndo, ", CFI")); ND_PRINT((ndo, ", pri %d: ", PRI(medsa))); break; case TAG_FROM_CPU: ND_PRINT((ndo, ", %stagged", SRC_TAG(medsa) ? "" : "un")); ND_PRINT((ndo, ", dev.port:vlan %d.%d:%d", SRC_DEV(medsa), SRC_PORT(medsa), VID(medsa))); if (CFI(medsa)) ND_PRINT((ndo, ", CFI")); ND_PRINT((ndo, ", pri %d: ", PRI(medsa))); break; case TAG_FORWARD: ND_PRINT((ndo, ", %stagged", SRC_TAG(medsa) ? "" : "un")); if (TRUNK(medsa)) ND_PRINT((ndo, ", dev.trunk:vlan %d.%d:%d", SRC_DEV(medsa), SRC_PORT(medsa), VID(medsa))); else ND_PRINT((ndo, ", dev.port:vlan %d.%d:%d", SRC_DEV(medsa), SRC_PORT(medsa), VID(medsa))); if (CFI(medsa)) ND_PRINT((ndo, ", CFI")); ND_PRINT((ndo, ", pri %d: ", PRI(medsa))); break; default: ND_DEFAULTPRINT((const u_char *)medsa, caplen); return; } }
* - setup r2 (PrepareAndDispatch's args pointer) to point at * the base of all these arguments * - Save LR (for the return address) * - Set r1 (PrepareAndDispatch's methodindex argument) from ip * - r0 is passed through (self) * - Call PrepareAndDispatch * - When the call returns, we return by loading the PC off the * stack, and undoing the stack (one instruction)! * */ __asm__ ("\n" ".text\n" ".align 2\n" "SharedStub:\n" ".fnstart\n" CFI(".cfi_startproc\n") "stmfd sp!, {r1, r2, r3}\n" ".save {r1, r2, r3}\n" CFI(".cfi_def_cfa_offset 12\n") CFI(".cfi_offset r3, -4\n") CFI(".cfi_offset r2, -8\n") CFI(".cfi_offset r1, -12\n") "mov r2, sp\n" "str lr, [sp, #-4]!\n" ".save {lr}\n" CFI(".cfi_def_cfa_offset 16\n") CFI(".cfi_offset lr, -16\n") "mov r1, ip\n" "bl _PrepareAndDispatch\n" "ldr pc, [sp], #16\n" CFI(".cfi_endproc\n")