Home | History | Annotate | Download | only in mrouted

Lines Matching defs:igmp

1 /*	$NetBSD: igmp.c,v 1.14 2009/04/17 16:05:43 lukem Exp $	*/
26 u_int32_t dvmrp_genid; /* IGMP generation id */
36 * Open and initialize the igmp socket, and fill in the non-changing
49 logit(LOG_ERR, errno, "IGMP socket");
113 case IGMP_MTRACE_QUERY: return "IGMP trace query ";
114 case IGMP_MTRACE_REPLY: return "IGMP trace reply ";
115 default: return "unknown IGMP msg ";
120 * Process a newly received IGMP packet that is sitting in the input
128 struct igmp *igmp;
163 igmp = (struct igmp *)(recv_buf + iphdrlen);
164 group = igmp->igmp_group.s_addr;
168 "received IP data field too short (%u bytes) for IGMP, from %s",
174 packet_kind(igmp->igmp_type, igmp->igmp_code),
177 switch (igmp->igmp_type) {
180 accept_membership_query(src, dst, group, igmp->igmp_code);
185 accept_group_report(src, dst, group, igmp->igmp_type);
195 switch (igmp->igmp_code) {
198 (char *)(igmp+1), igmpdatalen, group);
203 (char *)(igmp+1), igmpdatalen, group);
215 accept_neighbors(src, dst, (u_char *)(igmp+1), igmpdatalen,
220 accept_neighbors2(src, dst, (u_char *)(igmp+1), igmpdatalen,
225 accept_prune(src, dst, (char *)(igmp+1), igmpdatalen);
229 accept_graft(src, dst, (char *)(igmp+1), igmpdatalen);
233 accept_g_ack(src, dst, (char *)(igmp+1), igmpdatalen);
237 accept_info_request(src, dst, (u_char *)(igmp+1),
242 accept_info_reply(src, dst, (u_char *)(igmp+1), igmpdatalen);
248 igmp->igmp_code, inet_fmt(src),
260 accept_mtrace(src, dst, group, (char *)(igmp+1),
261 igmp->igmp_code, igmpdatalen);
266 "ignoring unknown IGMP message type %x from %s to %s",
267 igmp->igmp_type, inet_fmt(src),
274 * Some IGMP messages are more important than others. This routine
297 * Construct an IGMP message in the output packet buffer. The caller may
307 struct igmp *igmp;
316 igmp = (struct igmp *)(send_buf + MIN_IP_HEADER_LEN);
317 igmp->igmp_type = type;
318 igmp->igmp_code = code;
319 igmp->igmp_group.s_addr = group;
320 igmp->igmp_cksum = 0;
321 igmp->igmp_cksum = inet_cksum((u_int16_t *)igmp,