1270710Shselasky/*-
2270710Shselasky * Copyright (c) 2010 Isilon Systems, Inc.
3270710Shselasky * Copyright (c) 2010 iX Systems, Inc.
4270710Shselasky * Copyright (c) 2010 Panasas, Inc.
5270710Shselasky * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd.
6270710Shselasky * All rights reserved.
7270710Shselasky *
8270710Shselasky * Redistribution and use in source and binary forms, with or without
9270710Shselasky * modification, are permitted provided that the following conditions
10270710Shselasky * are met:
11270710Shselasky * 1. Redistributions of source code must retain the above copyright
12270710Shselasky *    notice unmodified, this list of conditions, and the following
13270710Shselasky *    disclaimer.
14270710Shselasky * 2. Redistributions in binary form must reproduce the above copyright
15270710Shselasky *    notice, this list of conditions and the following disclaimer in the
16270710Shselasky *    documentation and/or other materials provided with the distribution.
17270710Shselasky *
18270710Shselasky * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19270710Shselasky * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20270710Shselasky * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21270710Shselasky * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22270710Shselasky * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23270710Shselasky * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24270710Shselasky * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25270710Shselasky * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26270710Shselasky * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27270710Shselasky * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28270710Shselasky */
29270710Shselasky
30270710Shselasky#ifndef _NET_IF_INET6_H_
31270710Shselasky#define	_NET_IF_INET6_H_
32270710Shselasky
33270710Shselaskystatic inline void ipv6_eth_mc_map(const struct in6_addr *addr, char *buf)
34270710Shselasky{
35270710Shselasky/*
36270710Shselasky *      +-------+-------+-------+-------+-------+-------+
37270710Shselasky *      |   33  |   33  | DST13 | DST14 | DST15 | DST16 |
38270710Shselasky *      +-------+-------+-------+-------+-------+-------+
39270710Shselasky */
40270710Shselasky
41270710Shselasky        buf[0]= 0x33;
42270710Shselasky        buf[1]= 0x33;
43270710Shselasky
44270710Shselasky        memcpy(buf + 2, &addr->s6_addr32[3], sizeof(__u32));
45270710Shselasky}
46270710Shselasky
47270710Shselasky#endif	/* _NET_IF_INET6_H_ */
48