<blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">Patch Set 2:</p><p style="white-space: pre-wrap; word-wrap: break-word;">(1 comment)</p></blockquote><p>Patch set 2:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #d4ffd4; color: #000000;">Code-Review +1</span></p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/14410">View Change</a></p><p>1 comment:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.asterisk.org/c/asterisk/+/14410/2/res/res_pjsip_logger.c">File res/res_pjsip_logger.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/14410/2/res/res_pjsip_logger.c@42">Patch Set #2, Line 42:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;">struct pcap_header {<br> uint32_t magic_number; /*! \brief PCAP file format magic number */<br> uint16_t version_major; /*! \brief Major version number of the file format */<br> uint16_t version_minor; /*! \brief Minor version number of the file format */<br> int32_t thiszone; /*! \brief GMT to local correction */<br> uint32_t sigfigs; /*! \brief Accuracy of timestamps */<br> uint32_t snaplen; /*! \brief The maximum size that can be recorded in the file */<br> uint32_t network; /*! \brief Type of packets held within the file */<br>};<br><br>/*! \brief PCAP Packet Record Header */<br>struct pcap_record_header {<br> uint32_t ts_sec; /*! \brief When the record was created */<br> uint32_t ts_usec; /*! \brief When the record was created */<br> uint32_t incl_len; /*! \brief Length of packet as saved in the file */<br> uint32_t orig_len; /*! \brief Length of packet as sent over network */<br>};<br><br>/*! \brief PCAP Ethernet Header */<br>struct pcap_ethernet_header {<br> uint8_t dst[6]; /*! \brief Destination MAC address */<br> uint8_t src[6]; /*! \brief Source MAD address */<br> uint16_t type; /*! \brief The type of packet contained within */<br>} __attribute__((__packed__));<br><br>/*! \brief PCAP IPv4 Header */<br>struct pcap_ipv4_header {<br> uint8_t ver_ihl; /*! \brief IP header version and other bits */<br> uint8_t ip_tos; /*! \brief Type of service details */<br> uint16_t ip_len; /*! \brief Total length of the packet (including IPv4 header) */<br> uint16_t ip_id; /*! \brief Identification value */<br> uint16_t ip_off; /*! \brief Fragment offset */<br> uint8_t ip_ttl; /*! \brief Time to live for the packet */<br> uint8_t ip_protocol; /*! \brief Protocol of the data held within the packet (always UDP) */<br> uint16_t ip_sum; /*! \brief Checksum (not calculated for our purposes */<br> uint32_t ip_src; /*! \brief Source IP address */<br> uint32_t ip_dst; /*! \brief Destination IP address */<br>};<br><br>/*! \brief PCAP IPv6 Header */<br>struct pcap_ipv6_header {<br> union {<br> struct ip6_hdrctl {<br> uint32_t ip6_un1_flow; /*! \brief Version, traffic class, flow label */<br> uint16_t ip6_un1_plen; /*! \brief Length of the packet (not including IPv6 header) */<br> uint8_t ip6_un1_nxt; /*! \brief Next header field */<br> uint8_t ip6_un1_hlim; /*! \brief Hop Limit */<br> } ip6_un1;<br> uint8_t ip6_un2_vfc; /*! \brief Version, traffic class */<br> } ip6_ctlun;<br> struct in6_addr ip6_src; /*! \brief Source IP address */<br> struct in6_addr ip6_dst; /*! \brief Destination IP address */<br>};<br><br>/*! \brief PCAP UDP Header */<br>struct pcap_udp_header {<br> uint16_t src; /*! \brief Source IP port */<br> uint16_t dst; /*! \brief Destination IP port */<br> uint16_t length; /*! \brief Length of the UDP header plus UDP packet */<br> uint16_t checksum; /*! \brief Packet checksum, left uncalculated for our purposes */<br>};<br><br></pre></blockquote></p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">I was hesitant to go down that road in case they aren't available on different platforms, but can switch.</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">Yeah that's what I figured. I _thought_ we had libpcap in install_prereq already but that was for the testsuite, not asterisk itself. I'm OK with leaving it as is.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/14410">change 14410</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/14410"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-Change-Id: If5859161a72b0d7dd2d1f92d45bed88e0cd07d0e </div>
<div style="display:none"> Gerrit-Change-Number: 14410 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 18 May 2020 15:41:12 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: Yes </div>
<div style="display:none"> Comment-In-Reply-To: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Comment-In-Reply-To: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>