prog.c (396665e8320987ff43b20a62a6a1cdae57aa1cc1) prog.c (9cbe1f581d17baff7e93936feb041c90b29eb6a8)
1/*
2 * Copyright (C) 2017 Netronome Systems, Inc.
3 *
4 * This software is dual licensed under the GNU General License Version 2,
5 * June 1991 as shown in the file COPYING in the top-level directory of this
6 * source tree or the BSD 2-Clause License provided below. You have the
7 * option to license this software under the complete terms of either license.
8 *

--- 210 unchanged lines hidden (view full) ---

219 printf("%s ", prog_type_name[info.type]);
220 else
221 printf("type %u ", info.type);
222
223 if (*info.name)
224 printf("name %s ", info.name);
225
226 printf("tag ");
1/*
2 * Copyright (C) 2017 Netronome Systems, Inc.
3 *
4 * This software is dual licensed under the GNU General License Version 2,
5 * June 1991 as shown in the file COPYING in the top-level directory of this
6 * source tree or the BSD 2-Clause License provided below. You have the
7 * option to license this software under the complete terms of either license.
8 *

--- 210 unchanged lines hidden (view full) ---

219 printf("%s ", prog_type_name[info.type]);
220 else
221 printf("type %u ", info.type);
222
223 if (*info.name)
224 printf("name %s ", info.name);
225
226 printf("tag ");
227 print_hex(info.tag, BPF_TAG_SIZE, "");
227 fprint_hex(stdout, info.tag, BPF_TAG_SIZE, "");
228 printf("\n");
229
230 if (info.load_time) {
231 char buf[32];
232
233 print_boot_time(info.load_time, buf, sizeof(buf));
234
235 /* Piggy back on load_time, since 0 uid is a valid one */

--- 78 unchanged lines hidden (view full) ---

314 unsigned int i;
315
316 for (i = 0; i < len / sizeof(*insn); i++) {
317 printf("% 4d: ", i);
318 print_bpf_insn(print_insn, NULL, insn + i, true);
319
320 if (opcodes) {
321 printf(" ");
228 printf("\n");
229
230 if (info.load_time) {
231 char buf[32];
232
233 print_boot_time(info.load_time, buf, sizeof(buf));
234
235 /* Piggy back on load_time, since 0 uid is a valid one */

--- 78 unchanged lines hidden (view full) ---

314 unsigned int i;
315
316 for (i = 0; i < len / sizeof(*insn); i++) {
317 printf("% 4d: ", i);
318 print_bpf_insn(print_insn, NULL, insn + i, true);
319
320 if (opcodes) {
321 printf(" ");
322 print_hex(insn + i, 8, " ");
322 fprint_hex(stdout, insn + i, 8, " ");
323 printf("\n");
324 }
325
326 if (insn[i].code == (BPF_LD | BPF_IMM | BPF_DW))
327 i++;
328 }
329}
330

--- 154 unchanged lines hidden ---
323 printf("\n");
324 }
325
326 if (insn[i].code == (BPF_LD | BPF_IMM | BPF_DW))
327 i++;
328 }
329}
330

--- 154 unchanged lines hidden ---