UNPKG

perfetto-protos

Version:

Perfetto protos exposed via protobuf-es for browser and node

195 lines 6.07 kB
import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; import type { Message } from "@bufbuild/protobuf"; /** * Describes the file protos/perfetto/trace/android/network_trace.proto. */ export declare const file_protos_perfetto_trace_android_network_trace: GenFile; /** * NetworkPacketEvent records the details of a single packet sent or received * on the network (in Linux kernel terminology, one sk_buff struct). * * @generated from message perfetto.protos.NetworkPacketEvent */ export type NetworkPacketEvent = Message<"perfetto.protos.NetworkPacketEvent"> & { /** * The direction traffic is flowing for this event. * * @generated from field: optional perfetto.protos.TrafficDirection direction = 1; */ direction: TrafficDirection; /** * The name of the interface if available (e.g. 'rmnet0'). * * @generated from field: optional string interface = 2; */ interface: string; /** * The length of the packet in bytes (wire_size - L2_header_size). Ignored * when using NetworkPacketEvent as the ctx in either NetworkPacketBundle or * NetworkPacketContext. * * @generated from field: optional uint32 length = 3; */ length: number; /** * The Linux user id associated with the packet's socket. * * @generated from field: optional uint32 uid = 4; */ uid: number; /** * The Android network tag associated with the packet's socket. * * @generated from field: optional uint32 tag = 5; */ tag: number; /** * The packet's IP protocol (TCP=6, UDP=17, etc). * * @generated from field: optional uint32 ip_proto = 6; */ ipProto: number; /** * The packet's TCP flags as a bitmask (FIN=0x1, SYN=0x2, RST=0x4, etc). * * @generated from field: optional uint32 tcp_flags = 7; */ tcpFlags: number; /** * The local udp/tcp port of the packet. * * @generated from field: optional uint32 local_port = 8; */ localPort: number; /** * The remote udp/tcp port of the packet. * * @generated from field: optional uint32 remote_port = 9; */ remotePort: number; /** * The 1-byte ICMP type identifier. * * @generated from field: optional uint32 icmp_type = 10; */ icmpType: number; /** * The 1-byte ICMP code identifier. * * @generated from field: optional uint32 icmp_code = 11; */ icmpCode: number; }; /** * Describes the message perfetto.protos.NetworkPacketEvent. * Use `create(NetworkPacketEventSchema)` to create a new message. */ export declare const NetworkPacketEventSchema: GenMessage<NetworkPacketEvent>; /** * NetworkPacketBundle bundles one or more packets sharing the same attributes. * * @generated from message perfetto.protos.NetworkPacketBundle */ export type NetworkPacketBundle = Message<"perfetto.protos.NetworkPacketBundle"> & { /** * @generated from oneof perfetto.protos.NetworkPacketBundle.packet_context */ packetContext: { /** * The intern id for looking up the associated packet context. * * @generated from field: uint64 iid = 1; */ value: bigint; case: "iid"; } | { /** * The inlined context for events in this bundle. * * @generated from field: perfetto.protos.NetworkPacketEvent ctx = 2; */ value: NetworkPacketEvent; case: "ctx"; } | { case: undefined; value?: undefined; }; /** * The timestamp of the i-th packet encoded as the nanoseconds since the * enclosing TracePacket's timestamp. * * @generated from field: repeated uint64 packet_timestamps = 3 [packed = true]; */ packetTimestamps: bigint[]; /** * The length of the i-th packet in bytes (wire_size - L2_header_size). * * @generated from field: repeated uint32 packet_lengths = 4 [packed = true]; */ packetLengths: number[]; /** * Total number of packets in the bundle (when above aggregation_threshold). * * @generated from field: optional uint32 total_packets = 5; */ totalPackets: number; /** * Duration between first and last packet (when above aggregation_threshold). * * @generated from field: optional uint64 total_duration = 6; */ totalDuration: bigint; /** * Total packet length in bytes (when above aggregation_threshold). * * @generated from field: optional uint64 total_length = 7; */ totalLength: bigint; }; /** * Describes the message perfetto.protos.NetworkPacketBundle. * Use `create(NetworkPacketBundleSchema)` to create a new message. */ export declare const NetworkPacketBundleSchema: GenMessage<NetworkPacketBundle>; /** * An internable packet context. * * @generated from message perfetto.protos.NetworkPacketContext */ export type NetworkPacketContext = Message<"perfetto.protos.NetworkPacketContext"> & { /** * @generated from field: optional uint64 iid = 1; */ iid: bigint; /** * @generated from field: optional perfetto.protos.NetworkPacketEvent ctx = 2; */ ctx?: NetworkPacketEvent; }; /** * Describes the message perfetto.protos.NetworkPacketContext. * Use `create(NetworkPacketContextSchema)` to create a new message. */ export declare const NetworkPacketContextSchema: GenMessage<NetworkPacketContext>; /** * @generated from enum perfetto.protos.TrafficDirection */ export declare enum TrafficDirection { /** * @generated from enum value: DIR_UNSPECIFIED = 0; */ DIR_UNSPECIFIED = 0, /** * @generated from enum value: DIR_INGRESS = 1; */ DIR_INGRESS = 1, /** * @generated from enum value: DIR_EGRESS = 2; */ DIR_EGRESS = 2 } /** * Describes the enum perfetto.protos.TrafficDirection. */ export declare const TrafficDirectionSchema: GenEnum<TrafficDirection>; //# sourceMappingURL=network_trace_pb.d.ts.map