Skip to Main Content
IPv6 Advanced Protocols Implementation
book

IPv6 Advanced Protocols Implementation

by Qing Li, Jinmei Tatuya, Keiichi Shima
July 2010
Intermediate to advanced content levelIntermediate to advanced
1008 pages
35h 43m
English
Morgan Kaufmann
Content preview from IPv6 Advanced Protocols Implementation
194 Chapter 2—IPv6 Multicasting
Listing 2-70
ip6_mroute.c
1834 if ((mm->m_next = m_copy(m, 0, M_COPYALL)) == NULL) {
1835 m_freem(mm);
1836 return ENOBUFS;
1837 }
1838 i = MHLEN - M_LEADINGSPACE(mm);
1839 if (i > len)
1840 i = len;
1841 mm = m_pullup(mm, i);
1842 if (mm == NULL)
1843 return ENOBUFS;
1844 /* TODO: check it! */
1845 mm->m_pkthdr.len = len + sizeof(struct ip6_hdr);
ip6_mroute.c
1834–1845 m_copy() makes a complete copy of the original multicast packet. Unlike the
other upcall cases, a full copy is necessary because the packet will then be encapsulated
and forwarded by the routing daemon.
Listing 2-71
ip6_mroute.c
1847 /*
1848 * Send message to routing ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

IPv6 Core Protocols Implementation

IPv6 Core Protocols Implementation

Qing Li, Tatuya Jinmei, Keiichi Shima
IPv6 Security

IPv6 Security

Scott Hogg, Eric Vyncke
IPv6 for Enterprise Networks

IPv6 for Enterprise Networks

Shannon McFarland, Muninder Sambi, Nikhil Sharma, Sanjay Hooda
IPv6 Network Programming

IPv6 Network Programming

Jun-ichiro itojun Hagino

Publisher Resources

ISBN: 9780080489308