Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../../../../../../usr/lib/dtrace/sctp.d
Real path: /usr/lib/dtrace/sctp.d
Zurück
/* * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. */ #pragma D depends_on module unix #pragma D depends_on provider sctp /* * SCTP states. Keep in sync with netinet/sctp.h. We cannot use the * SED_REPLACE approach because the C preprocessor will not replace enumerated * type values, only macros. */ inline int32_t SCTP_STATE_IDLE = -5; #pragma D binding "1.12" SCTP_STATE_IDLE inline int32_t SCTP_STATE_BOUND = -4; #pragma D binding "1.12" SCTP_STATE_BOUND inline int32_t SCTP_STATE_LISTEN = -3; #pragma D binding "1.12" SCTP_STATE_LISTEN inline int32_t SCTP_STATE_COOKIE_WAIT = -2; #pragma D binding "1.12" SCTP_STATE_COOKIE_WAIT inline int32_t SCTP_STATE_COOKIE_ECHOED = -1; #pragma D binding "1.12" SCTP_STATE_COOKIE_ECHOED inline int32_t SCTP_STATE_ESTABLISHED = 0; #pragma D binding "1.12" SCTP_STATE_ESTABLISHED inline int32_t SCTP_STATE_SHUTDOWN_PENDING = 1; #pragma D binding "1.12" SCTP_STATE_SHUTDOWN_PENDING inline int32_t SCTP_STATE_SHUTDOWN_SENT = 2; #pragma D binding "1.12" SCTP_STATE_SHUTDOWN_SENT inline int32_t SCTP_STATE_SHUTDOWN_RECEIVED = 3; #pragma D binding "1.12" SCTP_STATE_SHUTDOWN_RECEIVED inline int32_t SCTP_STATE_SHUTDOWN_ACK_SENT = 4; #pragma D binding "1.12" SCTP_STATE_SHUTDOWN_ACK_SENT inline string sctp_state_string[int32_t state] = state == SCTP_STATE_IDLE ? "state-idle" : state == SCTP_STATE_BOUND ? "state-bound" : state == SCTP_STATE_LISTEN ? "state-listen" : state == SCTP_STATE_COOKIE_WAIT ? "state-cookie-wait" : state == SCTP_STATE_COOKIE_ECHOED ? "state-cookie-echoed" : state == SCTP_STATE_ESTABLISHED ? "state-established" : state == SCTP_STATE_SHUTDOWN_PENDING ? "state-shutdown-pending" : state == SCTP_STATE_SHUTDOWN_SENT ? "state-shutdown-sent" : state == SCTP_STATE_SHUTDOWN_RECEIVED ? "state-shutdown-received" : state == SCTP_STATE_SHUTDOWN_ACK_SENT ? "state-shutdown-ack-sent" : "<unknown>"; #pragma D binding "1.12" sctp_state_string /* * sctpinfo is the SCTP header fields. */ typedef struct sctpinfo { uint16_t sctp_sport; /* source port */ uint16_t sctp_dport; /* destination port */ uint32_t sctp_verify; /* verification tag */ uint32_t sctp_checksum; /* headers + data checksum */ sctp_hdr_t *sctp_hdr; /* raw SCTP header */ } sctpinfo_t; /* * sctpsinfo contains stable SCTP details from sctp_t. */ typedef struct sctpsinfo { uintptr_t sctps_addr; int sctps_num_raddrs; uintptr_t sctps_raddrs; int sctps_num_laddrs; uintptr_t *sctps_laddrs; uint16_t sctps_lport; /* local port */ uint16_t sctps_rport; /* remote port */ string sctps_laddr; /* local address, as a string */ string sctps_raddr; /* remote address, as a string */ int32_t sctps_state; } sctpsinfo_t; /* * sctplsinfo provides the old sctp state for state changes. */ typedef struct sctplsinfo { int32_t sctps_state; /* previous SCTP state */ } sctplsinfo_t; #pragma D binding "1.12" translator translator sctpinfo_t < sctp_hdr_t *S > { sctp_sport = ntohs(S->sh_sport); sctp_dport = ntohs(S->sh_dport); sctp_verify = ntohs(S->sh_verf); sctp_checksum = ntohs(S->sh_chksum); sctp_hdr = S; }; #pragma D binding "1.12" translator translator sctpsinfo_t < sctp_t *S > { sctps_addr = (uintptr_t)S; sctps_num_raddrs = S ? ((sctp_t *)S)->sctp_nfaddrs : 0; sctps_raddrs = S ? (uintptr_t)(((sctp_t *)S)->sctp_faddrs) : NULL; sctps_num_laddrs = S ? ((sctp_t *)S)->sctp_nsaddrs : 0; sctps_laddrs = S ? (uintptr_t *)(((sctp_t *)S)->sctp_saddrs) : NULL; sctps_lport = S ? ntohs(S->sctp_connp->u_port.connu_ports.connu_lport) : 0; sctps_rport = S ? ntohs(S->sctp_connp->u_port.connu_ports.connu_fport) : 0; sctps_laddr = S ? inet_ntoa6(&S->sctp_connp->connua_v6addr.connua_laddr) : "<unknown>"; sctps_raddr = S ? inet_ntoa6(&S->sctp_connp->connua_v6addr.connua_faddr) : "<unknown>"; sctps_state = S ? (int32_t)(S->sctp_state) : SCTP_STATE_IDLE; }; #pragma D binding "1.12" translator translator sctplsinfo_t < int64_t I > { sctps_state = (int32_t) I; };