3 * ===================================
4 * HARP | Host ATM Research Platform
5 * ===================================
8 * This Host ATM Research Platform ("HARP") file (the "Software") is
9 * made available by Network Computing Services, Inc. ("NetworkCS")
10 * "AS IS". NetworkCS does not provide maintenance, improvements or
11 * support of any kind.
13 * NETWORKCS MAKES NO WARRANTIES OR REPRESENTATIONS, EXPRESS OR IMPLIED,
14 * INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY
15 * AND FITNESS FOR A PARTICULAR PURPOSE, AS TO ANY ELEMENT OF THE
16 * SOFTWARE OR ANY SUPPORT PROVIDED IN CONNECTION WITH THIS SOFTWARE.
17 * In no event shall NetworkCS be responsible for any damages, including
18 * but not limited to consequential damages, arising from or relating to
19 * any use of the Software or related support.
21 * Copyright 1994-1998 Network Computing Services, Inc.
23 * Copies of this Software may be made, however, the above copyright
24 * notice must be reproduced on all copies.
26 * @(#) $FreeBSD: src/sys/netatm/spans/spans_arp.c,v 1.7 2000/01/15 20:34:55 mks Exp $
27 * @(#) $DragonFly: src/sys/netproto/atm/spans/spans_arp.c,v 1.2 2003/06/17 04:28:49 dillon Exp $
31 * SPANS Signalling Manager
32 * ---------------------------
34 * SPANS CLS - ARP support
38 #include <netatm/kern_include.h>
40 #include <netatm/ipatm/ipatm_var.h>
41 #include <netatm/ipatm/ipatm_serv.h>
42 #include "spans_xdr.h"
43 #include <netatm/spans/spans_var.h>
44 #include <netatm/spans/spans_cls.h>
49 struct spansarp *spansarp_arptab[SPANSARP_HASHSIZ] = {NULL};
55 static int spansarp_request __P((struct spansarp *));
56 static void spansarp_aging __P((struct atm_time *));
57 static void spansarp_retry __P((struct atm_time *));
62 static struct atm_time spansarp_timer = {0, 0}; /* Aging timer */
63 static struct atm_time spansarp_rtimer = {0, 0}; /* Retry timer */
65 static struct spansarp *spansarp_retry_head = NULL; /* Retry chain */
67 static struct sp_info spansarp_pool = {
68 "spans arp pool", /* si_name */
69 sizeof(struct spansarp), /* si_blksiz */
76 * Process a new outgoing SVC requiring SPANS ARP support
78 * This function is called by an endpoint wishing to resolve a destination
79 * IP address to an ATM address in order to open an SVC to that destination.
80 * If a valid mapping is already in our cache, then we just tell the caller
81 * about it and that's that. Otherwise, we have to allocate a new arp entry
82 * and issue a query for the mapping.
85 * ivp pointer to SVC's IPVCC control block
86 * dst pointer to destination IP address
89 * MAP_VALID - Got the answer, returned via iv_arpent field.
90 * MAP_PROCEEDING - OK so far, querying for peer's mapping
91 * MAP_FAILED - error, unable to allocate resources
95 spansarp_svcout(ivp, dst)
100 struct spansarp *sap;
103 ivp->iv_arpent = NULL;
106 * Lookup destination address
109 SPANSARP_LOOKUP(dst->s_addr, sap);
113 * Link this vcc to entry queue
115 LINK2TAIL(ivp, struct ipvcc, sap->sa_ivp, iv_arpnext);
118 * If entry is valid, we're done
120 if (sap->sa_flags & SAF_VALID) {
121 ivp->iv_arpent = (struct arpmap *)sap;
127 * We're already looking for this address
130 return (MAP_PROCEEDING);
134 * Need a new arp entry - first, find the cls instance
135 * corresponding to the requestor's IP interface.
137 for (clp = spanscls_head; clp; clp = clp->cls_next) {
138 if (clp->cls_ipnif == ivp->iv_ipnif)
147 * Now get the new arp entry
149 sap = (struct spansarp *)atm_allocate(&spansarp_pool);
158 sap->sa_dstip.s_addr = dst->s_addr;
159 sap->sa_dstatm.address_format = T_ATM_ABSENT;
160 sap->sa_dstatm.address_length = 0;
161 sap->sa_dstatmsub.address_format = T_ATM_ABSENT;
162 sap->sa_dstatmsub.address_length = 0;
164 sap->sa_origin = SAO_LOOKUP;
167 * Link ipvcc to arp entry for later notification
169 LINK2TAIL(ivp, struct ipvcc, sap->sa_ivp, iv_arpnext);
172 * Add arp entry to table
177 * Add arp entry to retry list and start retry timer if needed
179 LINK2TAIL(sap, struct spansarp, spansarp_retry_head, sa_rnext);
180 if ((spansarp_rtimer.ti_flag & TIF_QUEUED) == 0)
181 atm_timeout(&spansarp_rtimer, SPANSARP_RETRY, spansarp_retry);
184 * Issue arp request for this address
186 (void) spansarp_request(sap);
189 return (MAP_PROCEEDING);
194 * Process a new incoming SVC requiring SPANS ARP support
196 * This function is called by an endpoint wishing to resolve a destination
197 * ATM address to its IP address for an incoming call in order to allow a
198 * bi-directional flow of IP packets on the SVC.
200 * SPANS ARP does not provide reverse mapping facilities and only supports
201 * uni-directional SVCs. Thus, we lie a little to IP and always return a
202 * MAP_PROCEEDING indication, but we will never later notify IP of a
203 * MAP_VALID condition.
206 * ivp pointer to SVC's IPVCC control block
207 * dst pointer to destination ATM address
208 * dstsub pointer to destination ATM subaddress
211 * MAP_VALID - Got the answer, returned via iv_arpent field.
212 * MAP_PROCEEDING - OK so far, querying for peer's mapping
213 * MAP_FAILED - error, unable to allocate resources
217 spansarp_svcin(ivp, dst, dstsub)
223 * Clear ARP entry field
225 ivp->iv_arpent = NULL;
227 return (MAP_PROCEEDING);
232 * SPANS ARP SVC activation notification
234 * This function is called when a previously opened SVC has successfully
238 * ivp pointer to SVC's IPVCC control block
241 * 0 activation processing successful
242 * errno activation failed - reason indicated
246 spansarp_svcactive(ivp)
249 struct spansarp *sap;
253 * Find an entry for the destination address
255 SPANSARP_LOOKUP(ivp->iv_dst.s_addr, sap);
258 * IP is finished with entry, so remove IP VCC from chain
260 UNLINK(ivp, struct ipvcc, sap->sa_ivp, iv_arpnext);
261 ivp->iv_arpent = NULL;
264 * This seems like a reasonable reason to refresh the entry
275 * SPANS ARP supported VCC is closing
277 * This function is called just prior to a user closing a VCC which
278 * supports SPANS ARP. We'll sever our links to the VCC and then
279 * figure out how much more cleanup we need to do for now.
282 * ivp pointer to VCC's IPVCC control block
289 spansarp_vcclose(ivp)
292 struct spansarp *sap;
298 SPANSARP_LOOKUP(ivp->iv_dst.s_addr, sap);
305 * Remove IP VCC from chain
307 UNLINK(ivp, struct ipvcc, sap->sa_ivp, iv_arpnext);
308 ivp->iv_arpent = NULL;
311 * If entry is currently valid or in use, not much else for us to do
313 if ((sap->sa_flags & (SAF_VALID | SAF_LOCKED)) ||
314 (sap->sa_origin >= SAO_PERM)) {
320 * If there are still other VCCs waiting, exit
328 * Noone else waiting, so remove entry from the retry chain
330 UNLINK(sap, struct spansarp, spansarp_retry_head, sa_rnext);
335 SPANSARP_DELETE(sap);
336 atm_free((caddr_t)sap);
342 * Process module unloading notification
344 * Called whenever the spans module is about to be unloaded. All signalling
345 * instances will have been previously detached. All spansarp resources
361 * Make sure the arp table is empty
363 for (i = 0; i < SPANSARP_HASHSIZ; i++) {
364 if (spansarp_arptab[i] != NULL)
365 panic("spansarp_stop: arp table not empty");
371 (void) atm_untimeout(&spansarp_timer);
372 (void) atm_untimeout(&spansarp_rtimer);
375 * Free our storage pools
377 atm_release_pool(&spansarp_pool);
382 * Process IP Network Interface Activation
384 * Called whenever an IP network interface becomes active.
389 * clp pointer to CLS interface
397 struct spanscls *clp;
400 * Make sure aging timer is running
402 if ((spansarp_timer.ti_flag & TIF_QUEUED) == 0)
403 atm_timeout(&spansarp_timer, SPANSARP_AGING, spansarp_aging);
408 * Process IP Network Interface Deactivation
410 * Called whenever an IP network interface becomes inactive.
415 * clp pointer to CLS interface
423 struct spanscls *clp;
425 struct spanscls *clp2;
426 struct spansarp *sap, *snext;
430 * Delete all interface entries
432 for (i = 0; i < SPANSARP_HASHSIZ; i++) {
433 for (sap = spansarp_arptab[i]; sap; sap = snext) {
434 snext = sap->sa_next;
437 * Clean up entries for this interface
439 if (sap->sa_cls != clp)
443 * All VCCs better be gone by now
446 panic("spansarp_ipdact: entry not empty");
449 * Remove entry from the retry chain
451 UNLINK(sap, struct spansarp,
452 spansarp_retry_head, sa_rnext);
455 * Delete entry from arp table
457 SPANSARP_DELETE(sap);
458 atm_free((caddr_t)sap);
463 * Stop aging timer if this is the last active interface
465 for (clp2 = spanscls_head; clp2; clp2 = clp2->cls_next) {
466 if ((clp != clp2) && (clp2->cls_ipnif))
470 (void) atm_untimeout(&spansarp_timer);
475 * Issue a SPANS ARP request packet
478 * sap pointer to arp table entry
481 * 0 packet was successfully sent
482 * else unable to send packet
486 spansarp_request(sap)
487 struct spansarp *sap;
489 struct spanscls *clp;
491 struct spanscls_hdr *chp;
492 struct spansarp_hdr *ahp;
498 spp = clp->cls_spans;
499 inp = clp->cls_ipnif;
502 * Make sure CLS VCC is open and that we know our addresses
504 if (clp->cls_state != CLS_OPEN)
506 if (spp->sp_addr.address_format != T_ATM_SPANS_ADDR)
512 * Get a buffer for pdu
514 KB_ALLOCPKT(m, ARP_PACKET_LEN, KB_F_NOWAIT, KB_T_DATA);
519 * Place pdu at end of buffer
521 KB_PLENSET(m, ARP_PACKET_LEN);
522 KB_TAILALIGN(m, ARP_PACKET_LEN);
523 KB_DATASTART(m, chp, struct spanscls_hdr *);
524 ahp = (struct spansarp_hdr *)(chp + 1);
529 spans_addr_copy(&spans_bcastaddr, &chp->ch_dst);
530 spans_addr_copy(spp->sp_addr.address, &chp->ch_src);
531 *(u_int *)&chp->ch_proto = *(u_int *)&spanscls_hdr.ch_proto;
532 *(u_int *)&chp->ch_dsap = *(u_int *)&spanscls_hdr.ch_dsap;
533 *(u_short *)&chp->ch_oui[1] = *(u_short *)&spanscls_hdr.ch_oui[1];
534 chp->ch_pid = htons(ETHERTYPE_ARP);
540 ahp->ah_hrd = htons(ARP_SPANS);
541 ahp->ah_pro = htons(ETHERTYPE_IP);
542 ahp->ah_hln = sizeof(spans_addr);
543 ahp->ah_pln = sizeof(struct in_addr);
544 ahp->ah_op = htons(ARP_REQUEST);
545 spans_addr_copy(spp->sp_addr.address, &ahp->ah_sha);
546 KM_COPY(&(IA_SIN(inp->inf_addr)->sin_addr), ahp->ah_spa,
547 sizeof(struct in_addr));
548 KM_COPY(&sap->sa_dstip, ahp->ah_tpa, sizeof(struct in_addr));
551 * Now, send the pdu via the CLS service
553 err = atm_cm_cpcs_data(clp->cls_conn, m);
564 * Process a SPANS ARP input packet
567 * clp pointer to interface CLS control block
568 * m pointer to input packet buffer chain
575 spansarp_input(clp, m)
576 struct spanscls *clp;
579 struct spans *spp = clp->cls_spans;
580 struct spanscls_hdr *chp;
581 struct spansarp_hdr *ahp;
582 struct spansarp *sap;
583 struct ip_nif *inp = clp->cls_ipnif;
584 struct in_addr in_me, in_src, in_targ;
588 * Make sure IP interface has been activated
594 * Get the packet together
596 if (KB_LEN(m) < ARP_PACKET_LEN) {
597 KB_PULLUP(m, ARP_PACKET_LEN, m);
601 KB_DATASTART(m, chp, struct spanscls_hdr *);
602 ahp = (struct spansarp_hdr *)(chp + 1);
604 KM_COPY(ahp->ah_spa, &in_src, sizeof(struct in_addr));
605 KM_COPY(ahp->ah_tpa, &in_targ, sizeof(struct in_addr));
606 KM_COPY(&(IA_SIN(inp->inf_addr)->sin_addr), &in_me,
607 sizeof(struct in_addr));
610 * Initial packet verification
612 if ((ahp->ah_hrd != htons(ARP_SPANS)) ||
613 (ahp->ah_pro != htons(ETHERTYPE_IP)))
617 * Validate source addresses
618 * can't be from hardware broadcast
621 if (!spans_addr_cmp(&ahp->ah_sha, &spans_bcastaddr))
623 if (!spans_addr_cmp(&ahp->ah_sha, spp->sp_addr.address))
625 if (in_src.s_addr == in_me.s_addr) {
627 "duplicate IP address sent from spans address %s\n",
628 spans_addr_print(&ahp->ah_sha));
634 * If source IP address is from unspecified or broadcast addresses,
635 * don't bother updating arp table, but answer possible requests
637 #if (defined(BSD) && (BSD >= 199306))
638 if (in_broadcast(in_src, &inp->inf_nif->nif_if))
640 if (in_broadcast(in_src))
645 * Update arp table with source address info
648 SPANSARP_LOOKUP(in_src.s_addr, sap);
651 * Found an entry for the source, but don't
652 * update permanent entries
654 if (sap->sa_origin != SAO_PERM) {
659 sap->sa_dstatm.address_format = T_ATM_SPANS_ADDR;
660 sap->sa_dstatm.address_length = sizeof(spans_addr);
661 spans_addr_copy(&ahp->ah_sha, sap->sa_dstatm.address);
664 if ((sap->sa_flags & SAF_VALID) == 0) {
666 * Newly valid entry, notify waiting users
668 struct ipvcc *ivp, *inext;
670 sap->sa_flags |= SAF_VALID;
671 for (ivp = sap->sa_ivp; ivp; ivp = inext) {
672 inext = ivp->iv_arpnext;
674 ivp->iv_arpent = (struct arpmap *)sap;
675 (*inp->inf_arpnotify)(ivp, MAP_VALID);
679 * Remove ourselves from the retry chain
681 UNLINK(sap, struct spansarp,
682 spansarp_retry_head, sa_rnext);
686 } else if (in_targ.s_addr == in_me.s_addr) {
688 * Source unknown and we're the target - add new entry
690 sap = (struct spansarp *)atm_allocate(&spansarp_pool);
692 sap->sa_dstip.s_addr = in_src.s_addr;
693 sap->sa_dstatm.address_format = T_ATM_SPANS_ADDR;
694 sap->sa_dstatm.address_length = sizeof(spans_addr);
695 spans_addr_copy(&ahp->ah_sha, sap->sa_dstatm.address);
696 sap->sa_dstatmsub.address_format = T_ATM_ABSENT;
697 sap->sa_dstatmsub.address_length = 0;
699 sap->sa_flags = SAF_VALID;
700 sap->sa_origin = SAO_LOOKUP;
708 * If this is a request for our address, send a reply
710 if (ntohs(ahp->ah_op) != ARP_REQUEST)
712 if (in_targ.s_addr != in_me.s_addr)
715 spans_addr_copy(&chp->ch_src, &chp->ch_dst);
716 spans_addr_copy(spp->sp_addr.address, &chp->ch_src);
717 ahp->ah_op = htons(ARP_REPLY);
718 spans_addr_copy(&ahp->ah_sha, &ahp->ah_tha);
719 spans_addr_copy(spp->sp_addr.address, &ahp->ah_sha);
720 KM_COPY(ahp->ah_spa, ahp->ah_tpa, sizeof(struct in_addr));
721 KM_COPY(&in_me, ahp->ah_spa, sizeof(struct in_addr));
723 err = atm_cm_cpcs_data(clp->cls_conn, m);
734 * Process a SPANS ARP aging timer tick
736 * This function is called every SPANSARP_AGING seconds, in order to age
737 * all the arp table entries.
742 * tip pointer to spansarp aging timer control block
750 struct atm_time *tip;
752 struct spansarp *sap, *snext;
753 struct ipvcc *ivp, *inext;
758 * Schedule next timeout
760 atm_timeout(&spansarp_timer, SPANSARP_AGING, spansarp_aging);
763 * Run through arp table bumping each entry's aging timer.
765 for (i = 0; i < SPANSARP_HASHSIZ; i++) {
766 for (sap = spansarp_arptab[i]; sap; sap = snext) {
767 snext = sap->sa_next;
770 * Permanent (manually installed) entries aren't aged
772 if (sap->sa_origin == SAO_PERM)
776 * See if entry is valid and over-aged
778 if ((sap->sa_flags & SAF_VALID) == 0)
780 if (++sap->sa_reftime < SPANSARP_MAXAGE)
784 * Entry is now invalid, tell IP/ATM about it
786 sap->sa_flags |= SAF_LOCKED;
787 for (ivp = sap->sa_ivp; ivp; ivp = inext) {
788 inext = ivp->iv_arpnext;
789 (*ivp->iv_ipnif->inf_arpnotify)
792 sap->sa_flags &= ~(SAF_LOCKED | SAF_VALID);
794 if (sap->sa_ivp != NULL) {
796 * Somebody still cares, so add the arp
797 * entry to the retry list.
799 LINK2TAIL(sap, struct spansarp,
800 spansarp_retry_head, sa_rnext);
801 if ((spansarp_rtimer.ti_flag & TIF_QUEUED) == 0)
802 atm_timeout(&spansarp_rtimer,
803 SPANSARP_RETRY, spansarp_retry);
806 * Issue arp request for this address
808 (void) spansarp_request(sap);
812 * Delete unused entry
814 SPANSARP_DELETE(sap);
815 atm_free((caddr_t)sap);
823 * Process a SPANS ARP retry timer tick
825 * This function is called every SPANSARP_RETRY seconds, in order to retry
826 * awaiting arp resolution requests. We will retry requests indefinitely,
827 * assuming that IP will set a timeout to close the VCC(s) requesting the
828 * failing address resolution.
833 * tip pointer to spansarp retry timer control block
841 struct atm_time *tip;
843 struct spansarp *sap;
847 * See if there's work to do
849 if (spansarp_retry_head == NULL) {
854 * Schedule next timeout
856 atm_timeout(&spansarp_rtimer, SPANSARP_RETRY, spansarp_retry);
859 * Run through retry chain, (re)issuing arp requests.
861 for (sap = spansarp_retry_head; sap; sap = sap->sa_next) {
864 * Send another arp request
866 (void) spansarp_request(sap);
872 * SPANS ARP IOCTL support
874 * Function will be called at splnet.
877 * code PF_ATM sub-operation code
878 * data pointer to code specific parameter data area
879 * arg1 pointer to code specific argument
883 * errno error processing request - reason indicated
887 spansarp_ioctl(code, data, arg1)
892 struct atmaddreq *aap;
893 struct atmdelreq *adp;
894 struct atminfreq *aip;
896 struct spanscls *clp;
897 struct spansarp *sap;
898 struct air_arp_rsp aar;
900 struct ipvcc *ivp, *inext;
903 int err = 0, i, buf_len;
911 * Add a permanent ARP mapping
913 aap = (struct atmaddreq *)data;
914 clp = (struct spanscls *)arg1;
915 inp = clp->cls_ipnif;
916 if ((aap->aar_arp_addr.address_format != T_ATM_SPANS_ADDR) ||
917 (aap->aar_arp_origin != ARP_ORIG_PERM)) {
921 ip = SATOSIN(&aap->aar_arp_dst)->sin_addr;
924 * See if we already have an entry for this IP address
926 SPANSARP_LOOKUP(ip.s_addr, sap);
929 * No, get a new arp entry
931 sap = (struct spansarp *)atm_allocate(&spansarp_pool);
941 ATM_ADDR_COPY(&aap->aar_arp_addr, &sap->sa_dstatm);
942 sap->sa_dstatmsub.address_format = T_ATM_ABSENT;
943 sap->sa_dstatmsub.address_length = 0;
945 sap->sa_flags |= SAF_VALID;
946 sap->sa_origin = SAO_PERM;
957 * See if we're attempting to change the ATM address for
960 if ((sap->sa_dstatm.address_format != T_ATM_ABSENT) &&
961 (!ATM_ADDR_EQUAL(&aap->aar_arp_addr, &sap->sa_dstatm) ||
962 (clp != sap->sa_cls))) {
965 * Yes, notify IP/ATM that a mapping change has
966 * occurred. IP/ATM will close any VCC's which
967 * aren't waiting for this map.
969 sap->sa_flags |= SAF_LOCKED;
970 for (ivp = sap->sa_ivp; ivp; ivp = inext) {
971 inext = ivp->iv_arpnext;
972 (*inp->inf_arpnotify)(ivp, MAP_CHANGED);
974 sap->sa_flags &= ~SAF_LOCKED;
978 * Update the cached entry with the new data
980 ATM_ADDR_COPY(&aap->aar_arp_addr, &sap->sa_dstatm);
984 * If this entry isn't valid, notify anyone who might
987 if ((sap->sa_flags & SAF_VALID) == 0) {
989 sap->sa_flags |= SAF_LOCKED;
990 for (ivp = sap->sa_ivp; ivp; ivp = inext) {
991 inext = ivp->iv_arpnext;
992 (*inp->inf_arpnotify)(ivp, MAP_VALID);
994 sap->sa_flags &= ~SAF_LOCKED;
998 * Remove this entry from the retry chain
1000 UNLINK(sap, struct spansarp, spansarp_retry_head, sa_rnext);
1003 * Mark the entry as permanent
1005 sap->sa_flags |= SAF_VALID;
1006 sap->sa_origin = SAO_PERM;
1011 * Delete an ARP mapping
1013 adp = (struct atmdelreq *)data;
1014 clp = (struct spanscls *)arg1;
1015 ip = SATOSIN(&adp->adr_arp_dst)->sin_addr;
1018 * Now find the entry to be deleted
1020 SPANSARP_LOOKUP(ip.s_addr, sap);
1027 * Notify all VCCs using this entry that they must finish
1030 sap->sa_flags |= SAF_LOCKED;
1031 for (ivp = sap->sa_ivp; ivp; ivp = inext) {
1032 inext = ivp->iv_arpnext;
1033 (*ivp->iv_ipnif->inf_arpnotify)(ivp, MAP_FAILED);
1037 * Now free up the entry
1039 UNLINK(sap, struct spansarp, spansarp_retry_head, sa_rnext);
1040 SPANSARP_DELETE(sap);
1041 atm_free((caddr_t)sap);
1046 * Get ARP table information
1048 aip = (struct atminfreq *)data;
1049 spp = (struct spans *)arg1;
1051 if (aip->air_arp_addr.sa_family != AF_INET)
1053 dst = SATOSIN(&aip->air_arp_addr)->sin_addr.s_addr;
1055 buf_addr = aip->air_buf_addr;
1056 buf_len = aip->air_buf_len;
1058 if ((clp = spp->sp_cls) == NULL)
1062 * Run through entire arp table
1064 for (i = 0; i < SPANSARP_HASHSIZ; i++) {
1065 for (sap = spansarp_arptab[i]; sap;
1066 sap = sap->sa_next) {
1068 * We only want entries learned
1069 * from the supplied interface.
1071 if (sap->sa_cls != clp)
1073 if ((dst != INADDR_ANY) &&
1074 (dst != sap->sa_dstip.s_addr))
1078 * Make sure there's room in the user's buffer
1080 if (buf_len < sizeof(aar)) {
1086 * Fill in info to be returned
1088 SATOSIN(&aar.aap_arp_addr)->sin_family =
1090 SATOSIN(&aar.aap_arp_addr)->sin_addr.s_addr =
1091 sap->sa_dstip.s_addr;
1092 (void) snprintf(aar.aap_intf,
1093 sizeof(aar.aap_intf), "%s%d",
1094 clp->cls_ipnif->inf_nif->nif_if.if_name,
1095 clp->cls_ipnif->inf_nif->nif_if.if_unit
1097 aar.aap_flags = sap->sa_flags;
1098 aar.aap_origin = sap->sa_origin;
1099 if (sap->sa_flags & SAF_VALID)
1100 aar.aap_age = SPANSARP_MAXAGE -
1104 ATM_ADDR_COPY(&sap->sa_dstatm, &aar.aap_addr);
1105 ATM_ADDR_COPY(&sap->sa_dstatmsub,
1109 * Copy the response into the user's buffer
1111 if ((err = copyout((caddr_t)&aar, buf_addr,
1114 buf_addr += sizeof(aar);
1115 buf_len -= sizeof(aar);
1122 * Update the buffer pointer and length
1124 aip->air_buf_addr = buf_addr;
1125 aip->air_buf_len = buf_len;
1130 * Get ARP server information
1132 /* SPANS doesn't have an ARP server */