* Sender report.
*/
struct rtcp_sr {
- ntp64 sr_ntp; /* 64-bit ntp timestamp */
+ ntp64 sr_ntp; /* 64-bit ntp timestamp */
nd_uint32_t sr_ts; /* reference media timestamp */
nd_uint32_t sr_np; /* no. packets sent */
nd_uint32_t sr_nb; /* no. bytes sent */
#define RTCP_PT_APP 204
static void
-vat_print(netdissect_options *ndo, const void *hdr, register const struct udphdr *up)
+vat_print(netdissect_options *ndo, const void *hdr, const struct udphdr *up)
{
/* vat/vt audio */
u_int ts;
static void
rtp_print(netdissect_options *ndo, const void *hdr, u_int len,
- register const struct udphdr *up)
+ const struct udphdr *up)
{
/* rtp v1 or v2 */
const u_int *ip = (const u_int *)hdr;
return ep;
}
-static int udp_cksum(netdissect_options *ndo, register const struct ip *ip,
- register const struct udphdr *up,
- register u_int len)
+static int udp_cksum(netdissect_options *ndo, const struct ip *ip,
+ const struct udphdr *up,
+ u_int len)
{
return nextproto4_cksum(ndo, ip, (const uint8_t *)(const void *)up, len, len,
IPPROTO_UDP);
ip6 = NULL;
if (ip6) {
- if (ip6->ip6_nxt == IPPROTO_UDP) {
+ if (EXTRACT_U_1(ip6->ip6_nxt) == IPPROTO_UDP) {
if (sport == -1) {
ND_PRINT((ndo, "%s > %s: ",
ip6addr_string(ndo, &ip6->ip6_src),
}
void
-udp_print(netdissect_options *ndo, register const u_char *bp, u_int length,
- register const u_char *bp2, int fragmented)
+udp_print(netdissect_options *ndo, const u_char *bp, u_int length,
+ const u_char *bp2, int fragmented)
{
- register const struct udphdr *up;
- register const struct ip *ip;
- register const u_char *cp;
- register const u_char *ep = bp + length;
+ const struct udphdr *up;
+ const struct ip *ip;
+ const u_char *cp;
+ const u_char *ep = bp + length;
uint16_t sport, dport, ulen;
- register const struct ip6_hdr *ip6;
+ const struct ip6_hdr *ip6;
if (ep > ndo->ndo_snapend)
ep = ndo->ndo_snapend;
}
if (ndo->ndo_packettype) {
- register const struct sunrpc_msg *rp;
+ const struct sunrpc_msg *rp;
enum sunrpc_msg_type direction;
switch (ndo->ndo_packettype) {
udpipaddr_print(ndo, ip, sport, dport);
if (!ndo->ndo_qflag) {
- register const struct sunrpc_msg *rp;
+ const struct sunrpc_msg *rp;
enum sunrpc_msg_type direction;
rp = (const struct sunrpc_msg *)(up + 1);
udp_sum = EXTRACT_BE_U_2(up->uh_sum);
if (udp_sum == 0) {
ND_PRINT((ndo, "[no cksum] "));
- } else if (ND_TTEST2(cp[0], length)) {
+ } else if (ND_TTEST_LEN(cp, length)) {
sum = udp_cksum(ndo, ip, up, length + sizeof(struct udphdr));
if (sum != 0) {
}
else if (IP_V(ip) == 6 && ip6->ip6_plen) {
/* for IPv6, UDP checksum is mandatory */
- if (ND_TTEST2(cp[0], length)) {
+ if (ND_TTEST_LEN(cp, length)) {
sum = udp6_cksum(ndo, ip6, up, length + sizeof(struct udphdr));
udp_sum = EXTRACT_BE_U_2(up->uh_sum);
else if (IS_SRC_OR_DST_PORT(VXLAN_GPE_PORT))
vxlan_gpe_print(ndo, (const u_char *)(up + 1), length);
else if (ND_TTEST(((const struct LAP *)cp)->type) &&
- ((const struct LAP *)cp)->type == lapDDP &&
+ EXTRACT_U_1(((const struct LAP *)cp)->type) == lapDDP &&
(atalk_port(sport) || atalk_port(dport))) {
if (ndo->ndo_vflag)
ND_PRINT((ndo, "kip "));