aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
Diffstat (limited to 'include/net')
-rw-r--r--include/net/if_inet6.h54
-rw-r--r--include/net/ip.h17
-rw-r--r--include/net/llc_pdu.h7
3 files changed, 0 insertions, 78 deletions
diff --git a/include/net/if_inet6.h b/include/net/if_inet6.h
index 50f325fd069..93563221d29 100644
--- a/include/net/if_inet6.h
+++ b/include/net/if_inet6.h
@@ -209,60 +209,6 @@ static inline void ipv6_eth_mc_map(const struct in6_addr *addr, char *buf)
209 memcpy(buf + 2, &addr->s6_addr32[3], sizeof(__u32)); 209 memcpy(buf + 2, &addr->s6_addr32[3], sizeof(__u32));
210} 210}
211 211
212static inline void ipv6_tr_mc_map(const struct in6_addr *addr, char *buf)
213{
214 /* All nodes FF01::1, FF02::1, FF02::1:FFxx:xxxx */
215
216 if (((addr->s6_addr[0] == 0xFF) &&
217 ((addr->s6_addr[1] == 0x01) || (addr->s6_addr[1] == 0x02)) &&
218 (addr->s6_addr16[1] == 0) &&
219 (addr->s6_addr32[1] == 0) &&
220 (addr->s6_addr32[2] == 0) &&
221 (addr->s6_addr16[6] == 0) &&
222 (addr->s6_addr[15] == 1)) ||
223 ((addr->s6_addr[0] == 0xFF) &&
224 (addr->s6_addr[1] == 0x02) &&
225 (addr->s6_addr16[1] == 0) &&
226 (addr->s6_addr32[1] == 0) &&
227 (addr->s6_addr16[4] == 0) &&
228 (addr->s6_addr[10] == 0) &&
229 (addr->s6_addr[11] == 1) &&
230 (addr->s6_addr[12] == 0xff)))
231 {
232 buf[0]=0xC0;
233 buf[1]=0x00;
234 buf[2]=0x01;
235 buf[3]=0x00;
236 buf[4]=0x00;
237 buf[5]=0x00;
238 /* All routers FF0x::2 */
239 } else if ((addr->s6_addr[0] ==0xff) &&
240 ((addr->s6_addr[1] & 0xF0) == 0) &&
241 (addr->s6_addr16[1] == 0) &&
242 (addr->s6_addr32[1] == 0) &&
243 (addr->s6_addr32[2] == 0) &&
244 (addr->s6_addr16[6] == 0) &&
245 (addr->s6_addr[15] == 2))
246 {
247 buf[0]=0xC0;
248 buf[1]=0x00;
249 buf[2]=0x02;
250 buf[3]=0x00;
251 buf[4]=0x00;
252 buf[5]=0x00;
253 } else {
254 unsigned char i ;
255
256 i = addr->s6_addr[15] & 7 ;
257 buf[0]=0xC0;
258 buf[1]=0x00;
259 buf[2]=0x00;
260 buf[3]=0x01 << i ;
261 buf[4]=0x00;
262 buf[5]=0x00;
263 }
264}
265
266static inline void ipv6_arcnet_mc_map(const struct in6_addr *addr, char *buf) 212static inline void ipv6_arcnet_mc_map(const struct in6_addr *addr, char *buf)
267{ 213{
268 buf[0] = 0x00; 214 buf[0] = 0x00;
diff --git a/include/net/ip.h b/include/net/ip.h
index 94ddb69cc0f..83e0619f59d 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -141,23 +141,6 @@ static inline struct sk_buff *ip_finish_skb(struct sock *sk, struct flowi4 *fl4)
141extern int ip4_datagram_connect(struct sock *sk, 141extern int ip4_datagram_connect(struct sock *sk,
142 struct sockaddr *uaddr, int addr_len); 142 struct sockaddr *uaddr, int addr_len);
143 143
144/*
145 * Map a multicast IP onto multicast MAC for type Token Ring.
146 * This conforms to RFC1469 Option 2 Multicasting i.e.
147 * using a functional address to transmit / receive
148 * multicast packets.
149 */
150
151static inline void ip_tr_mc_map(__be32 addr, char *buf)
152{
153 buf[0]=0xC0;
154 buf[1]=0x00;
155 buf[2]=0x00;
156 buf[3]=0x04;
157 buf[4]=0x00;
158 buf[5]=0x00;
159}
160
161struct ip_reply_arg { 144struct ip_reply_arg {
162 struct kvec iov[1]; 145 struct kvec iov[1];
163 int flags; 146 int flags;
diff --git a/include/net/llc_pdu.h b/include/net/llc_pdu.h
index f57e7d46a45..5a93d13ac95 100644
--- a/include/net/llc_pdu.h
+++ b/include/net/llc_pdu.h
@@ -13,7 +13,6 @@
13 */ 13 */
14 14
15#include <linux/if_ether.h> 15#include <linux/if_ether.h>
16#include <linux/if_tr.h>
17 16
18/* Lengths of frame formats */ 17/* Lengths of frame formats */
19#define LLC_PDU_LEN_I 4 /* header and 2 control bytes */ 18#define LLC_PDU_LEN_I 4 /* header and 2 control bytes */
@@ -253,10 +252,6 @@ static inline void llc_pdu_decode_sa(struct sk_buff *skb, u8 *sa)
253{ 252{
254 if (skb->protocol == htons(ETH_P_802_2)) 253 if (skb->protocol == htons(ETH_P_802_2))
255 memcpy(sa, eth_hdr(skb)->h_source, ETH_ALEN); 254 memcpy(sa, eth_hdr(skb)->h_source, ETH_ALEN);
256 else if (skb->protocol == htons(ETH_P_TR_802_2)) {
257 memcpy(sa, tr_hdr(skb)->saddr, ETH_ALEN);
258 *sa &= 0x7F;
259 }
260} 255}
261 256
262/** 257/**
@@ -270,8 +265,6 @@ static inline void llc_pdu_decode_da(struct sk_buff *skb, u8 *da)
270{ 265{
271 if (skb->protocol == htons(ETH_P_802_2)) 266 if (skb->protocol == htons(ETH_P_802_2))
272 memcpy(da, eth_hdr(skb)->h_dest, ETH_ALEN); 267 memcpy(da, eth_hdr(skb)->h_dest, ETH_ALEN);
273 else if (skb->protocol == htons(ETH_P_TR_802_2))
274 memcpy(da, tr_hdr(skb)->daddr, ETH_ALEN);
275} 268}
276 269
277/** 270/**