HEX
Server: nginx/1.22.0
System: Linux iZuf6jdxbygmf6cco977lcZ 5.10.84-10.4.al8.x86_64 #1 SMP Tue Apr 12 12:31:07 CST 2022 x86_64
User: root (0)
PHP: 7.4.29
Disabled: passthru,exec,system,chroot,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_restore,dl,readlink,symlink,popepassthru,stream_socket_server,fsocket,popen
Upload Files
File: //usr/include/linux/pingtrace.h
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
 *
 * Copyright (C) 2021 Alibaba Group
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 */

#ifndef __LINUX_PING_TRACE_H
#define __LINUX_PING_TRACE_H

#include <linux/types.h>

/* magic number in icmp header's code.
 * Although the value 1 seems not like a magic number,
 * it actually plays the role of magic number,
 * and it connot be modidied now due to some historical reasons.
 */
#define PINGTRACE_CODE_MAGIC 1
#define PINGTRACE_HDR_MAGIC 0x7ace

enum pingtrace_function {
	P_L_TX_USER,
	P_L_TX_DEVQUEUE,
	P_L_TX_DEVOUT,
	P_R_RX_ICMPRCV,
	P_R_TX_DEVOUT,
	P_L_RX_IPRCV,
	P_L_RX_SKDATAREADY,
	P_L_RX_WAKEUP,
	P_L_RX_USER,
};

enum PINGTRACE_HDR_FLAGS {
	PINGTRACE_F_DONTADD     =       1,
};

struct pingtrace_timestamp {
	__u32 ns_id;
	__u32 ifindex;
	__u16 user_id;
	__u16 function_id;
	__u32 ts;
};

struct pingtrace_hdr {
	__u8 version;
	__u8 num;
	__u16 flags;
	__u16 magic;
	__u16 reserve;
	__u32 id;
	__u32 seq;
};

struct pingtrace_pkt {
	struct pingtrace_hdr hdr;
	struct pingtrace_timestamp entries[];
};

#endif