VirtualBox

source: vbox/trunk/src/VBox/Devices/Network/slirp/ip_icmp.c@ 15219

Last change on this file since 15219 was 15219, checked in by vboxsync, 16 years ago

slirp:ICMP: local host ping works now

  • Property svn:eol-style set to native
File size: 19.9 KB
Line 
1/*
2 * Copyright (c) 1982, 1986, 1988, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. All advertising materials mentioning features or use of this software
14 * must display the following acknowledgement:
15 * This product includes software developed by the University of
16 * California, Berkeley and its contributors.
17 * 4. Neither the name of the University nor the names of its contributors
18 * may be used to endorse or promote products derived from this software
19 * without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)ip_icmp.c 8.2 (Berkeley) 1/4/94
34 * ip_icmp.c,v 1.7 1995/05/30 08:09:42 rgrimes Exp
35 */
36
37#include "slirp.h"
38#include "ip_icmp.h"
39#ifdef RT_OS_WINDOWS
40#include <Icmpapi.h>
41#include <Iphlpapi.h>
42#endif
43
44
45/* The message sent when emulating PING */
46/* Be nice and tell them it's just a psuedo-ping packet */
47static const char icmp_ping_msg[] = "This is a psuedo-PING packet used by Slirp to emulate ICMP ECHO-REQUEST packets.\n";
48
49/* list of actions for icmp_error() on RX of an icmp message */
50static const int icmp_flush[19] =
51{
52/* ECHO REPLY (0) */ 0,
53 1,
54 1,
55/* DEST UNREACH (3) */ 1,
56/* SOURCE QUENCH (4)*/ 1,
57/* REDIRECT (5) */ 1,
58 1,
59 1,
60/* ECHO (8) */ 0,
61/* ROUTERADVERT (9) */ 1,
62/* ROUTERSOLICIT (10) */ 1,
63/* TIME EXCEEDED (11) */ 1,
64/* PARAMETER PROBLEM (12) */ 1,
65/* TIMESTAMP (13) */ 0,
66/* TIMESTAMP REPLY (14) */ 0,
67/* INFO (15) */ 0,
68/* INFO REPLY (16) */ 0,
69/* ADDR MASK (17) */ 0,
70/* ADDR MASK REPLY (18) */ 0
71};
72
73#ifdef VBOX_WITH_SLIRP_ICMP
74int
75icmp_init(PNATState pData)
76{
77 pData->icmp_socket.so_type = IPPROTO_ICMP;
78 pData->icmp_socket.so_state = SS_ISFCONNECTED;
79#ifndef RT_OS_WINDOWS
80 pData->icmp_socket.s = socket(PF_INET, SOCK_RAW, IPPROTO_ICMP);
81 if (pData->icmp_socket.s == -1)
82 {
83 int rc = RTErrConvertFromErrno(errno);
84 LogRel(("NAT: ICMP/ping not available (could open ICMP socket, error %Rrc)\n", rc));
85 return 1;
86 }
87#else /* RT_OS_WINDOWS */
88 pData->hmIcmpLibrary = LoadLibrary("Iphlpapi.dll");
89 if (pData->hmIcmpLibrary != NULL)
90 {
91 pData->pfIcmpParseReplies = (long (WINAPI *)(void *, long))
92 GetProcAddress(pData->hmIcmpLibrary, "IcmpParseReplies");
93 pData->pfIcmpCloseHandle = (BOOL (WINAPI *)(HANDLE))
94 GetProcAddress(pData->hmIcmpLibrary, "IcmpCloseHandle");
95 }
96 if (pData->pfIcmpParseReplies == NULL)
97 {
98 FreeLibrary(pData->hmIcmpLibrary);
99 pData->hmIcmpLibrary = LoadLibrary("Icmp.dll");
100 if (pData->hmIcmpLibrary == NULL)
101 {
102 LogRel(("NAT: Icmp.dll could not be loaded\n"));
103 return 1;
104 }
105 pData->pfIcmpParseReplies = (long (WINAPI *)(void *, long))
106 GetProcAddress(pData->hmIcmpLibrary, "IcmpParseReplies");
107 pData->pfIcmpCloseHandle = (BOOL (WINAPI *)(HANDLE))
108 GetProcAddress(pData->hmIcmpLibrary, "IcmpCloseHandle");
109 }
110 if (pData->pfIcmpParseReplies == NULL)
111 {
112 LogRel(("NAT: Can't find IcmpParseReplies symbol\n"));
113 FreeLibrary(pData->hmIcmpLibrary);
114 return 1;
115 }
116 if (pData->pfIcmpCloseHandle == NULL)
117 {
118 LogRel(("NAT: Can't find IcmpCloseHandle symbol\n"));
119 FreeLibrary(pData->hmIcmpLibrary);
120 return 1;
121 }
122 pData->icmp_socket.sh = IcmpCreateFile();
123 pData->phEvents[VBOX_ICMP_EVENT_INDEX] = CreateEvent(NULL, FALSE, FALSE, NULL);
124 pData->szIcmpBuffer = sizeof(ICMP_ECHO_REPLY) * 10;
125 pData->pvIcmpBuffer = malloc(pData->szIcmpBuffer);
126#endif /* RT_OS_WINDOWS */
127 LIST_INIT(&pData->icmp_msg_head);
128 return 0;
129}
130
131/*
132 * ip here is ip header + 64bytes readed from ICMP packet
133 */
134struct icmp_msg *
135icmp_find_original_mbuf(PNATState pData, struct ip *ip)
136{
137 struct mbuf *m0;
138 struct ip *ip0;
139 struct icmp *icp, *icp0;
140 struct icmp_msg *icm = NULL;
141 int found = 0;
142 struct socket *head_socket;
143 struct in_addr laddr, faddr;
144 u_int lport, fport;
145
146 switch (ip->ip_p)
147 {
148 case IPPROTO_ICMP:
149 icp = (struct icmp *)((char *)ip + (ip->ip_hl << 2));
150 LIST_FOREACH(icm, &pData->icmp_msg_head, im_list)
151 {
152 m0 = icm->im_m;
153 ip0 = mtod(m0, struct ip *);
154 AssertRelease(ip0->ip_p == IPPROTO_ICMP);
155 icp0 = (struct icmp *)((char *)ip0 + (ip0->ip_hl << 2));
156 if ( ( (icp->icmp_type != ICMP_ECHO && ip->ip_src.s_addr == ip0->ip_dst.s_addr)
157 || (icp->icmp_type == ICMP_ECHO && ip->ip_dst.s_addr == ip0->ip_dst.s_addr))
158 && icp->icmp_id == icp0->icmp_id
159 && icp->icmp_seq == icp->icmp_seq)
160 {
161 found = 1;
162 break;
163 }
164 }
165 case IPPROTO_UDP:
166 head_socket = &udb;
167 case IPPROTO_TCP:
168 head_socket = (head_socket != NULL ? head_socket : &tcb); /* head_socket could be initialized with udb*/
169 }
170 if (found == 1)
171 return icm;
172
173 return NULL;
174}
175
176static int
177icmp_attach(PNATState pData, struct mbuf *m)
178{
179 struct icmp_msg *icm;
180 struct ip *ip;
181 ip = mtod(m, struct ip *);
182 Assert(ip->ip_p == IPPROTO_ICMP);
183 icm = malloc(sizeof(struct icmp_msg));
184 icm->im_m = m;
185 LIST_INSERT_HEAD(&pData->icmp_msg_head, icm, im_list);
186 return (0);
187}
188#endif /* VBOX_WITH_SLIRP_ICMP */
189
190/*
191 * Process a received ICMP message.
192 */
193void
194icmp_input(PNATState pData, struct mbuf *m, int hlen)
195{
196 register struct icmp *icp;
197 register struct ip *ip=mtod(m, struct ip *);
198 int icmplen=ip->ip_len;
199 int status;
200#ifdef VBOX_WITH_SLIRP_ICMP
201 uint32_t dst;
202#endif
203
204 /* int code; */
205
206 DEBUG_CALL("icmp_input");
207 DEBUG_ARG("m = %lx", (long )m);
208 DEBUG_ARG("m_len = %d", m->m_len);
209
210 icmpstat.icps_received++;
211
212 /*
213 * Locate icmp structure in mbuf, and check
214 * that its not corrupted and of at least minimum length.
215 */
216 if (icmplen < ICMP_MINLEN)
217 {
218 /* min 8 bytes payload */
219 icmpstat.icps_tooshort++;
220freeit:
221 m_freem(pData, m);
222 goto end_error;
223 }
224
225 m->m_len -= hlen;
226 m->m_data += hlen;
227 icp = mtod(m, struct icmp *);
228 if (cksum(m, icmplen))
229 {
230 icmpstat.icps_checksum++;
231 goto freeit;
232 }
233 m->m_len += hlen;
234 m->m_data -= hlen;
235
236 /* icmpstat.icps_inhist[icp->icmp_type]++; */
237 /* code = icp->icmp_code; */
238
239 DEBUG_ARG("icmp_type = %d", icp->icmp_type);
240 switch (icp->icmp_type)
241 {
242 case ICMP_ECHO:
243#ifndef VBOX_WITH_SLIRP_ICMP
244 icp->icmp_type = ICMP_ECHOREPLY;
245#endif /* !VBOX_WITH_SLIRP_ICMP */
246
247 ip->ip_len += hlen; /* since ip_input subtracts this */
248 dst = ip->ip_dst.s_addr;
249 if (dst == alias_addr.s_addr)
250 {
251#ifdef VBOX_WITH_SLIRP_ICMP
252 icp->icmp_type = ICMP_ECHOREPLY;
253 ip->ip_dst.s_addr = ip->ip_src.s_addr;
254 ip->ip_src.s_addr = dst;
255#endif /* VBOX_WITH_SLIRP_ICMP */
256 icmp_reflect(pData, m);
257 }
258 else
259 {
260 struct socket *so;
261 struct sockaddr_in addr;
262#ifndef VBOX_WITH_SLIRP_ICMP
263 if ((so = socreate()) == NULL)
264 goto freeit;
265 if (udp_attach(pData, so) == -1)
266 {
267 DEBUG_MISC((dfd,"icmp_input udp_attach errno = %d-%s\n",
268 errno,strerror(errno)));
269 sofree(pData, so);
270 m_free(pData, m);
271 goto end_error;
272 }
273 so->so_m = m;
274 so->so_faddr = ip->ip_dst;
275 so->so_fport = htons(7);
276 so->so_laddr = ip->ip_src;
277 so->so_lport = htons(9);
278 so->so_iptos = ip->ip_tos;
279 so->so_type = IPPROTO_ICMP;
280 so->so_state = SS_ISFCONNECTED;
281
282 addr.sin_family = AF_INET;
283 if ((so->so_faddr.s_addr & htonl(pData->netmask)) == special_addr.s_addr)
284 {
285 /* It's an alias */
286 switch (ntohl(so->so_faddr.s_addr) & ~pData->netmask)
287 {
288 case CTL_DNS:
289 addr.sin_addr = dns_addr;
290 break;
291 case CTL_ALIAS:
292 default:
293 addr.sin_addr = loopback_addr;
294 break;
295 }
296 }
297 else
298 addr.sin_addr = so->so_faddr;
299 addr.sin_port = so->so_fport;
300 if (sendto(so->s, icmp_ping_msg, strlen(icmp_ping_msg), 0,
301 (struct sockaddr *)&addr, sizeof(addr)) == -1)
302 {
303 DEBUG_MISC((dfd,"icmp_input udp sendto tx errno = %d-%s\n",
304 errno,strerror(errno)));
305 icmp_error(pData, m, ICMP_UNREACH,ICMP_UNREACH_NET, 0,strerror(errno));
306 udp_detach(pData, so);
307 }
308#else /* VBOX_WITH_SLIRP_ICMP */
309# ifdef RT_OS_WINDOWS
310 IP_OPTION_INFORMATION ipopt;
311 int error;
312# endif
313 addr.sin_family = AF_INET;
314 if ((ip->ip_dst.s_addr & htonl(pData->netmask)) == special_addr.s_addr)
315 {
316 /* It's an alias */
317 switch(ntohl(ip->ip_dst.s_addr) & ~pData->netmask)
318 {
319 case CTL_DNS:
320 addr.sin_addr = dns_addr;
321 break;
322 case CTL_ALIAS:
323 default:
324 addr.sin_addr = loopback_addr;
325 break;
326 }
327 }
328 else
329 addr.sin_addr.s_addr = ip->ip_dst.s_addr;
330 icmp_attach(pData, m);
331 /* Send the packet */
332# ifndef RT_OS_WINDOWS
333 status = setsockopt(pData->icmp_socket.s, IPPROTO_IP, IP_TTL, (void *)&ip->ip_ttl, sizeof(ip->ip_ttl));
334 if (status < 0)
335 {
336 LogRel(("NAT: Error (%s) occurred while setting TTL attribute of IP packet\n", strerror(errno)));
337 }
338 if (sendto(pData->icmp_socket.s, icp, icmplen, 0,
339 (struct sockaddr *)&addr, sizeof(addr)) == -1)
340 {
341 DEBUG_MISC((dfd,"icmp_input udp sendto tx errno = %d-%s\n",
342 errno,strerror(errno)));
343 icmp_error(pData, m, ICMP_UNREACH,ICMP_UNREACH_NET, 0,strerror(errno));
344 m_free(pData, m);
345 }
346# else /* RT_OS_WINDOWS */
347 pData->icmp_socket.so_laddr.s_addr = ip->ip_src.s_addr; /* XXX: hack*/
348 pData->icmp_socket.so_icmp_id = icp->icmp_id;
349 pData->icmp_socket.so_icmp_seq = icp->icmp_seq;
350 memset(&ipopt, 0, sizeof(IP_OPTION_INFORMATION));
351 ipopt.Ttl = ip->ip_ttl;
352 status = IcmpSendEcho2(pData->icmp_socket.sh, pData->phEvents[VBOX_ICMP_EVENT_INDEX],
353 NULL, NULL, addr.sin_addr.s_addr, icp->icmp_data,
354 icmplen - offsetof(struct icmp, icmp_data) , &ipopt,
355 pData->pvIcmpBuffer, pData->szIcmpBuffer, 0);
356 if (status == 0 && (error = GetLastError()) != ERROR_IO_PENDING)
357 {
358 error = GetLastError();
359 LogRel(("NAT: Error (%d) occurred while sending ICMP (", error));
360 switch (error)
361 {
362 case ERROR_INVALID_PARAMETER:
363 LogRel(("icmp_socket:%lx is invalid)\n", pData->icmp_socket.s));
364 break;
365 case ERROR_NOT_SUPPORTED:
366 LogRel(("operation is unsupported)\n"));
367 break;
368 case ERROR_NOT_ENOUGH_MEMORY:
369 LogRel(("OOM!!!)\n"));
370 break;
371 case IP_BUF_TOO_SMALL:
372 LogRel(("Buffer too small)\n"));
373 break;
374 default:
375 LogRel(("Other error!!!)\n"));
376 break;
377 }
378 }
379# endif /* RT_OS_WINDOWS */
380#endif /* VBOX_WITH_SLIRP_ICMP */
381 } /* if ip->ip_dst.s_addr == alias_addr.s_addr */
382 break;
383 case ICMP_UNREACH:
384 /* XXX? report error? close socket? */
385 case ICMP_TIMXCEED:
386 case ICMP_PARAMPROB:
387 case ICMP_SOURCEQUENCH:
388 case ICMP_TSTAMP:
389 case ICMP_MASKREQ:
390 case ICMP_REDIRECT:
391 icmpstat.icps_notsupp++;
392 m_freem(pData, m);
393 break;
394
395 default:
396 icmpstat.icps_badtype++;
397 m_freem(pData, m);
398 } /* switch */
399
400end_error:
401 /* m is m_free()'d xor put in a socket xor or given to ip_send */
402 ;
403}
404
405
406/*
407 * Send an ICMP message in response to a situation
408 *
409 * RFC 1122: 3.2.2 MUST send at least the IP header and 8 bytes of header. MAY send more (we do).
410 * MUST NOT change this header information.
411 * MUST NOT reply to a multicast/broadcast IP address.
412 * MUST NOT reply to a multicast/broadcast MAC address.
413 * MUST reply to only the first fragment.
414 */
415/*
416 * Send ICMP_UNREACH back to the source regarding msrc.
417 * mbuf *msrc is used as a template, but is NOT m_free()'d.
418 * It is reported as the bad ip packet. The header should
419 * be fully correct and in host byte order.
420 * ICMP fragmentation is illegal. All machines must accept 576 bytes in one
421 * packet. The maximum payload is 576-20(ip hdr)-8(icmp hdr)=548
422 */
423
424#define ICMP_MAXDATALEN (IP_MSS-28)
425void icmp_error(PNATState pData, struct mbuf *msrc, u_char type, u_char code, int minsize, char *message)
426{
427 unsigned hlen, shlen, s_ip_len;
428 register struct ip *ip;
429 register struct icmp *icp;
430 register struct mbuf *m;
431
432 DEBUG_CALL("icmp_error");
433 DEBUG_ARG("msrc = %lx", (long )msrc);
434 DEBUG_ARG("msrc_len = %d", msrc->m_len);
435
436 if (type!=ICMP_UNREACH && type!=ICMP_TIMXCEED)
437 goto end_error;
438
439 /* check msrc */
440 if (!msrc)
441 goto end_error;
442
443 ip = mtod(msrc, struct ip *);
444#if DEBUG
445 {
446 char bufa[20], bufb[20];
447 strcpy(bufa, inet_ntoa(ip->ip_src));
448 strcpy(bufb, inet_ntoa(ip->ip_dst));
449 DEBUG_MISC((dfd, " %.16s to %.16s\n", bufa, bufb));
450 }
451#endif
452 if (ip->ip_off & IP_OFFMASK)
453 goto end_error; /* Only reply to fragment 0 */
454
455 shlen=ip->ip_hl << 2;
456 s_ip_len=ip->ip_len;
457 if (ip->ip_p == IPPROTO_ICMP)
458 {
459 icp = (struct icmp *)((char *)ip + shlen);
460 /*
461 * Assume any unknown ICMP type is an error. This isn't
462 * specified by the RFC, but think about it..
463 */
464 if (icp->icmp_type>18 || icmp_flush[icp->icmp_type])
465 goto end_error;
466 }
467
468 /* make a copy */
469 if (!(m=m_get(pData)))
470 goto end_error; /* get mbuf */
471 {
472 int new_m_size;
473 new_m_size = sizeof(struct ip) + ICMP_MINLEN + msrc->m_len + ICMP_MAXDATALEN;
474 if (new_m_size>m->m_size)
475 m_inc(m, new_m_size);
476 }
477 memcpy(m->m_data, msrc->m_data, msrc->m_len);
478 m->m_len = msrc->m_len; /* copy msrc to m */
479
480 /* make the header of the reply packet */
481 ip = mtod(m, struct ip *);
482 hlen = sizeof(struct ip ); /* no options in reply */
483
484 /* fill in icmp */
485 m->m_data += hlen;
486 m->m_len -= hlen;
487
488 icp = mtod(m, struct icmp *);
489
490 if (minsize)
491 s_ip_len=shlen+ICMP_MINLEN; /* return header+8b only */
492 else if (s_ip_len>ICMP_MAXDATALEN) /* maximum size */
493 s_ip_len=ICMP_MAXDATALEN;
494
495 m->m_len=ICMP_MINLEN+s_ip_len; /* 8 bytes ICMP header */
496
497 /* min. size = 8+sizeof(struct ip)+8 */
498
499 icp->icmp_type = type;
500 icp->icmp_code = code;
501 icp->icmp_id = 0;
502 icp->icmp_seq = 0;
503
504 memcpy(&icp->icmp_ip, msrc->m_data, s_ip_len); /* report the ip packet */
505 HTONS(icp->icmp_ip.ip_len);
506 HTONS(icp->icmp_ip.ip_id);
507 HTONS(icp->icmp_ip.ip_off);
508
509#if DEBUG
510 if (message)
511 {
512 /* DEBUG : append message to ICMP packet */
513 int message_len;
514 char *cpnt;
515 message_len=strlen(message);
516 if (message_len>ICMP_MAXDATALEN) message_len=ICMP_MAXDATALEN;
517 cpnt=(char *)m->m_data+m->m_len;
518 memcpy(cpnt, message, message_len);
519 m->m_len+=message_len;
520 }
521#endif
522
523 icp->icmp_cksum = 0;
524 icp->icmp_cksum = cksum(m, m->m_len);
525
526 m->m_data -= hlen;
527 m->m_len += hlen;
528
529 /* fill in ip */
530 ip->ip_hl = hlen >> 2;
531 ip->ip_len = m->m_len;
532
533 ip->ip_tos=((ip->ip_tos & 0x1E) | 0xC0); /* high priority for errors */
534
535 ip->ip_ttl = MAXTTL;
536 ip->ip_p = IPPROTO_ICMP;
537 ip->ip_dst = ip->ip_src; /* ip adresses */
538 ip->ip_src = alias_addr;
539
540 (void ) ip_output(pData, (struct socket *)NULL, m);
541
542 icmpstat.icps_reflect++;
543
544end_error:
545 ;
546}
547#undef ICMP_MAXDATALEN
548
549/*
550 * Reflect the ip packet back to the source
551 */
552void
553icmp_reflect(PNATState pData, struct mbuf *m)
554{
555 register struct ip *ip = mtod(m, struct ip *);
556 int hlen = ip->ip_hl << 2;
557 int optlen = hlen - sizeof(struct ip );
558 register struct icmp *icp;
559
560 /*
561 * Send an icmp packet back to the ip level,
562 * after supplying a checksum.
563 */
564 m->m_data += hlen;
565 m->m_len -= hlen;
566 icp = mtod(m, struct icmp *);
567
568 icp->icmp_cksum = 0;
569 icp->icmp_cksum = cksum(m, ip->ip_len - hlen);
570
571 m->m_data -= hlen;
572 m->m_len += hlen;
573
574#ifndef VBOX_WITH_SLIRP_ICMP
575 /* fill in ip */
576 if (optlen > 0)
577 {
578 /*
579 * Strip out original options by copying rest of first
580 * mbuf's data back, and adjust the IP length.
581 */
582 memmove((caddr_t)(ip + 1), (caddr_t)ip + hlen,
583 (unsigned )(m->m_len - hlen));
584 hlen -= optlen;
585 ip->ip_hl = hlen >> 2;
586 ip->ip_len -= optlen;
587 m->m_len -= optlen;
588 }
589 ip->ip_ttl = MAXTTL;
590 {
591 /* swap */
592 struct in_addr icmp_dst;
593 icmp_dst = ip->ip_dst;
594 ip->ip_dst = ip->ip_src;
595 ip->ip_src = icmp_dst;
596 }
597#endif /* !VBOX_WITH_SLIRP_ICMP */
598
599 (void ) ip_output(pData, (struct socket *)NULL, m);
600
601 icmpstat.icps_reflect++;
602}
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette