IPsec/IKEv2-based VPN software for Linux
# cd <install_dir>/rockhopper-<version>/debug_tools
# sudo /etc/init.d/rockhopper stop (Ubuntu) or # sudo systemctl stop rockhopper # sudo ./output2.sh |
A text-format of each trace record: (No.) YYYY/MM/DD HH:MM:SS-MSEC ["trace-user-label"] "trace-user-id"-"trace-id" p:"process-id",t:"thread-id" ("trace-id-tag") "trace-data" ["source-file":"line-no"] |
... (733) 2012/06/23 11:59:13-790394 [mainfreq] 6-3712 p:1336,t:1372 (esp_impl_rx_decap_ipv4_ip_ip) tls_cache: 0x9ec80d8 pkt: 0x9bddf80 dec_out_p[LEN: dec_data_len]: [0x9ec7f30] 80(bytes) *0 *1 *2 *3 *4 *5 *6 *7 *8 *9 *A *B *C *D *E *F 0123456789ABCDEF 45 00 00 4e 00 0d 00 00 80 11 15 d6 c0 a8 64 14 E..N..........d. ... pad_len: 0 [rhp_esp_impl.c:1211] ... (725) 2012/06/23 11:59:13-790280 [mainfreq] 6-3717 p:1336,t:1372 (esp_impl_rx_decap_ipv4) pkt: 0x9bddf80 tls_cache: 0x9ec80d8 seqh: 0 seqh: 0x0 next_header_r: 0xb57645dc [rhp_esp_impl.c:1268] (726) 2012/06/23 11:59:13-790292 [mainfreq] 6-3302 p:1336,t:1372 (openssl_encr_aes_cbc_get_iv_len) encr: 0x9ec6ca0 AES_BLOCK_SIZE: 16 [rhp_openssl_crypto.c:1441] (727) 2012/06/23 11:59:13-790303 [mainfreq] 6-3303 p:1336,t:1372 (openssl_encr_aes_cbc_get_block_len) encr: 0x9ec6ca0 AES_BLOCK_SIZE: 16 [rhp_openssl_crypto.c:1447] (728) 2012/06/23 11:59:13-790315 [mainfreq] 6-3267 p:1336,t:1372 (openssl_integ_hmac_sha1_96_get_output_len) integ: 0x9ec8250 12: 12 [rhp_openssl_crypto.c:1007] (729) 2012/06/23 11:59:13-790326 [mainfreq] 6-3719 p:1336,t:1372 (esp_impl_rx_decap_ipv4_esp_pkt) pkt: 0x9bddf80 tls_cache: 0x9ec80d8 pkt->data[LEN: pkt->len ] [PROTO: MAC_IPV4_ESP ][IV_LEN: iv_len][ICV_LEN: icv_len] PROTO: 6 , IV LEN:16 , ICV LEN:12 , DATA LEN:158 ==<MAC>== dst_addr : 00:00:00:00:00:00 src_addr : 00:00:00:00:00:00 protocol : 0x800 (ARP:0x0806,IPv4:0x0800,IPv6:0x86DD,) ==<IPv4>== IHL : 5 Version : 4 TOS : 0x0 total_len : 144 id : 0 frag : 0x0 TTL : 0 Protocol : 17 (ICMP:1,UDP:17,TCP:6,ESP:50,AH:51) checksum : 0x0 src_addr : 10.0.0.10 dst_addr : 192.168.0.100 ==<UDP>== src_port : 8372 dst_port : 4500 len : 124 checksum : 0 ==<ESP>== spi : 3704306518(0xdccb3b56) seq : 14 [IV] [0x0] 16(bytes) *0 *1 *2 *3 *4 *5 *6 *7 *8 *9 *A *B *C *D *E *F 0123456789ABCDEF 41 b8 70 1f 66 c6 c6 8c 86 91 54 26 85 ad 1d 5d A.p.f.....T....] [Encrypted Data] [0x0] 80(bytes) *0 *1 *2 *3 *4 *5 *6 *7 *8 *9 *A *B *C *D *E *F 0123456789ABCDEF 64 aa 97 1f 8c 83 12 9d 71 08 e4 10 34 41 12 c2 d.......q...4A.. a4 36 79 91 12 a9 67 11 97 09 a6 67 0c bc 0b ac .6y...g....g.... ... [ICV] [0x0] 12(bytes) *0 *1 *2 *3 *4 *5 *6 *7 *8 *9 *A *B *C *D *E *F 0123456789ABCDEF 4a d5 1a 55 c6 18 d8 d9 82 ee bc 64 J..U.......d [TRF](ESP) 11:59:13-790326 p:1336,t:1372 10.0.0.10 >> 192.168.0.100 Len: 144:UDP[8372 >> 4500] NATT [ESP] SPI(3704306518, 0xdccb3b56) SEQ(14) Len: 116 ==<DUMP>== [0x0] 158(bytes) *0 *1 *2 *3 *4 *5 *6 *7 *8 *9 *A *B *C *D *E *F 0123456789ABCDEF 00 00 00 00 00 00 00 00 00 00 00 00 08 00 45 00 ..............E. ... (736) 2012/06/23 11:59:13-790438 [mainfreq] 6-3716 p:1336,t:1372 (esp_impl_rx_decap_ipv4_ip_ip_rtrn) tls_cache: 0x9ec80d8 pkt: 0x9bddf80 diff: 38 [rhp_esp_impl.c:1247] ... |
# sudo rhp_trace -i Buffer:00099850 bytes / 10000000 bytes (used / total). [1] common : mask[255] : ENABLED [2] syspxy : mask[255] : ENABLED [3] main : mask[255] : ENABLED [4] func : mask[255] : ENABLED [5] trace_file : mask[255] : ENABLED [6] main_freq : mask[255] : ENABLED [7] syspxy_freq : mask[255] : ENABLED [8] reserved : mask[255] : ENABLEDThe labels like "common" and "syspxy" are names of trace users. |
# cd
<install_dir>/rockhopper-<version>/debug_tools
# sudo ./output.sh |
# rhp_trace -h -e user_id [filter_mask] : enable trace -d user_id : disable trace -s output_file : save trace -t output_file xml_file ... : translate trace -z size : set trace size(byte) -r : reset trace -i : show trace configuration |
;Enable a trace user "main".
# sudo rhp_trace -e main ;Disable a trace user "main". Trace records of this user will not be stored anymore. # sudo rhp_trace -d main ; Resize debug trace buffer to 1M bytes. # sudorhp_trace -z 1000000 ; Clear debug trace buffer. # sudo rhp_trace -r |
# cd
<install_dir>/rockhopper-<version>/rockhopper/misc
# ./mk_trace_fmt.sh |