Working (and easy to use) multicast forwarding
[nepi.git] / src / nepi / testbeds / planetlab / scripts / mrouted-3.9.5-pl.patch
1 diff -ur --exclude='*.o' --exclude=cfparse.c --exclude='*~' mrouted-3.9.5/config.c mrouted-3.9.5-pl/config.c
2 --- mrouted-3.9.5/config.c      2011-03-05 21:45:25.000000000 +0100
3 +++ mrouted-3.9.5-pl/config.c   2011-08-29 16:32:43.710565000 +0200
4 @@ -91,11 +91,41 @@
5         v->uv_subnetbcast = subnet | ~mask;
6         strncpy(v->uv_name, ifa->ifa_name, sizeof(v->uv_name));
7  
8 -       if (flags & IFF_POINTOPOINT)
9 +       if (flags & IFF_POINTOPOINT) {
10             v->uv_flags |= VIFF_REXMIT_PRUNES;
11 +           v->uv_ptp_addr = ((struct sockaddr_in *)ifa->ifa_dstaddr)->sin_addr.s_addr;
12 +       } else if (flags & IFF_BROADCAST) {
13 +           /* getifaddr doesn't give us the p2p link in this case */
14 +           /* So use ip, which uses netlink, to query it */
15 +           char buf[1024];
16 +        size_t rode;
17 +        FILE *peer;
18 +        
19 +        logit(LOG_INFO,0,"Getting ptp for %s", ifa->ifa_name);
20 +        
21 +        snprintf(buf,sizeof(buf),"ip addr show %s | grep -o 'peer [0-9.]*' | grep -o '[0-9.]*'", ifa->ifa_name);
22 +        peer = popen(buf, "r");
23 +        rode = fread(buf, 1, sizeof(buf), peer);
24 +        pclose(peer);
25 +        
26 +        if (rode > 0) {
27 +            /* It has a pointopoint address */
28 +            struct in_addr ptp_in;
29 +            
30 +            for (--rode; rode && buf[rode] <= 13;)
31 +                --rode;
32 +            buf[++rode] = 0;
33 +
34 +            logit(LOG_INFO,0,"Got %s", buf);
35 +
36 +               if (inet_aton(buf, &ptp_in))
37 +                   v->uv_ptp_addr = ptp_in.s_addr;
38 +        } 
39 +       }
40  
41 -       logit(LOG_INFO,0,"installing %s (%s on subnet %s) as vif #%u - rate=%d",
42 +       logit(LOG_INFO,0,"installing %s (%s on subnet %s%s%s) as vif #%u - rate=%d",
43             v->uv_name, inet_fmt(addr, s1, sizeof(s1)), inet_fmts(subnet, mask, s2, sizeof(s2)),
44 +           (v->uv_ptp_addr) ? "peer " : "", (v->uv_ptp_addr) ? inet_fmt(v->uv_ptp_addr, s3, sizeof(s3)) : "",
45             numvifs, v->uv_rate_limit);
46  
47         ++numvifs;
48 diff -ur --exclude='*.o' --exclude=cfparse.c --exclude='*~' mrouted-3.9.5/defs.h mrouted-3.9.5-pl/defs.h
49 --- mrouted-3.9.5/defs.h        2011-03-05 21:45:25.000000000 +0100
50 +++ mrouted-3.9.5-pl/defs.h     2011-08-30 15:30:23.691662000 +0200
51 @@ -9,6 +9,8 @@
52  #ifndef __MROUTED_DEFS_H__
53  #define __MROUTED_DEFS_H__
54  
55 +#define PLANETLAB 1
56 +
57  #include <stdio.h>
58  #include <stdlib.h>
59  #include <unistd.h>
60 @@ -28,6 +30,7 @@
61  #include <sys/time.h>
62  #include <sys/uio.h>
63  #include <net/if.h>
64 +#include <arpa/inet.h>
65  #include <netinet/in.h>
66  #include <netinet/in_systm.h>
67  #include <netinet/ip.h>
68 @@ -61,7 +64,7 @@
69  #include <libutil.h>
70  #endif
71  #endif
72 -#ifdef RSRR
73 +#if defined(RSRR) || defined(PLANETLAB)
74  #include <sys/un.h>
75  #endif /* RSRR */
76  
77 @@ -137,6 +140,11 @@
78  extern u_int32         dvmrp_group;
79  extern u_int32         dvmrp_genid;
80  
81 +#ifdef PLANETLAB
82 +extern int      plrt_socket;
83 +extern char     *plrt_socket_path;
84 +#endif
85 +
86  #define        IF_DEBUG(l)     if (debug && debug & (l))
87  
88  #define        DEBUG_PKT       0x0001
89 @@ -353,6 +361,8 @@
90  extern void            k_leave(u_int32, u_int32);
91  extern void            k_init_dvmrp(void);
92  extern void            k_stop_dvmrp(void);
93 +extern void     k_init_plrt(void);
94 +extern void     k_stop_plrt(void);
95  extern void            k_add_vif(vifi_t, struct uvif *);
96  extern void            k_del_vif(vifi_t, struct uvif *);
97  extern void            k_add_rg(u_int32, struct gtable *);
98 diff -ur --exclude='*.o' --exclude=cfparse.c --exclude='*~' mrouted-3.9.5/igmp.c mrouted-3.9.5-pl/igmp.c
99 --- mrouted-3.9.5/igmp.c        2011-03-05 21:45:25.000000000 +0100
100 +++ mrouted-3.9.5-pl/igmp.c     2011-08-29 17:03:24.187961000 +0200
101 @@ -190,8 +190,10 @@
102      if (ip->ip_p == 0) {
103         if (src == 0 || dst == 0)
104             logit(LOG_WARNING, 0, "kernel request not accurate");
105 -       else
106 +       else {
107 +           logit(LOG_DEBUG, 0, "received kernel miss");
108             add_table_entry(src, dst);
109 +    }
110         return;
111      }
112  
113 diff -ur --exclude='*.o' --exclude=cfparse.c --exclude='*~' mrouted-3.9.5/kern.c mrouted-3.9.5-pl/kern.c
114 --- mrouted-3.9.5/kern.c        2011-03-05 21:45:25.000000000 +0100
115 +++ mrouted-3.9.5-pl/kern.c     2011-08-30 15:30:10.508700000 +0200
116 @@ -7,16 +7,26 @@
117   * Leland Stanford Junior University.
118   */
119  
120 +#include <paths.h>
121  #include "defs.h"
122  
123  int curttl = 0;
124  
125 +#ifdef PLANETLAB
126 +
127 +int plrt_socket;
128 +char *plrt_socket_path = _PATH_MROUTED_PLRT;
129 +
130 +#endif
131 +
132  /*
133   * Open/init the multicast routing in the kernel and sets the
134   * MRT_PIM (aka MRT_ASSERT) flag in the kernel.
135   */
136  void k_init_dvmrp(void)
137  {
138 +#ifndef PLANETLAB
139 +
140  #ifdef OLD_KERNEL
141      if (setsockopt(igmp_socket, IPPROTO_IP, MRT_INIT, (char *)NULL, 0) < 0) {
142  #else
143 @@ -24,11 +34,34 @@
144  
145      if (setsockopt(igmp_socket, IPPROTO_IP, MRT_INIT, (char *)&v, sizeof(int)) < 0) {
146  #endif
147 +
148         if (errno == EADDRINUSE)
149             logit(LOG_ERR, 0, "Another multicast routing application is already running.");
150         else
151             logit(LOG_ERR, errno, "Cannot enable multicast routing in kernel");
152      }
153 +
154 +#endif
155 +}
156 +
157 +void k_init_plrt(void)
158 +{
159 +#ifdef PLANETLAB
160 +    /* 
161 +     * Just open a connection to the user-space forwarder
162 +     */
163 +
164 +    if ((plrt_socket = socket(AF_UNIX, SOCK_SEQPACKET, 0)) < 0) 
165 +       logit(LOG_ERR, errno, "PLRT socket");
166 +       
167 +       struct sockaddr_un sun;
168 +       memset(&sun, 0, sizeof(sun));
169 +       sun.sun_family = AF_UNIX;
170 +       strncpy(sun.sun_path, plrt_socket_path, sizeof(sun.sun_path));
171 +       
172 +    if ((connect(plrt_socket, &sun, sizeof(sun))) < 0) 
173 +       logit(LOG_ERR, errno, "PLRT socket connect");
174 +#endif
175  }
176  
177  
178 @@ -38,8 +71,17 @@
179   */
180  void k_stop_dvmrp(void)
181  {
182 +#ifndef PLANETLAB
183      if (setsockopt(igmp_socket, IPPROTO_IP, MRT_DONE, (char *)NULL, 0) < 0)
184         logit(LOG_WARNING, errno, "Cannot disable multicast routing in kernel");
185 +#endif
186 +}
187 +
188 +void k_stop_plrt(void)
189 +{
190 +#ifdef PLANETLAB
191 +    close(plrt_socket);
192 +#endif
193  }
194  
195  
196 @@ -194,11 +236,25 @@
197   */
198  void k_add_vif(vifi_t vifi, struct uvif *v)
199  {
200 -    struct vifctl vc;
201 -
202 -    vc.vifc_vifi = vifi;
203 -    uvif_to_vifctl(&vc, v);
204 -    if (setsockopt(igmp_socket, IPPROTO_IP, MRT_ADD_VIF, (char *)&vc, sizeof(vc)) < 0)
205 +    /* 
206 +     * PlanetLab does application-level forwarding
207 +     */
208 +    struct {
209 +        u_int32 op;
210 +        u_int32 len;
211 +        struct vifctl vc;
212 +    } op;
213 +
214 +    op.vc.vifc_vifi = vifi;
215 +    uvif_to_vifctl(&op.vc, v);
216 +
217 +#ifdef PLANETLAB
218 +    op.op = MRT_ADD_VIF;
219 +    op.len = sizeof(op.vc);
220 +    if (send(plrt_socket, &op, sizeof(op), 0) < 0)
221 +#else
222 +    if (setsockopt(igmp_socket, IPPROTO_IP, MRT_ADD_VIF, (char *)&op.vc, sizeof(op.vc)) < 0)
223 +#endif
224         logit(LOG_ERR, errno, "setsockopt MRT_ADD_VIF on vif %d", vifi);
225  }
226  
227 @@ -214,6 +270,20 @@
228       * we're going to delete.  *BSD systems on the other hand exepect only the index
229       * of that VIF.
230       */
231 +#ifdef PLANETLAB
232 +    struct {
233 +        u_int32 op;
234 +        u_int32 len;
235 +        struct vifctl vc;
236 +    } op;
237 +
238 +    op.vc.vifc_vifi = vifi;
239 +    uvif_to_vifctl(&op.vc, v);
240 +
241 +    op.op = MRT_DEL_VIF;
242 +    op.len = sizeof(op.vc);
243 +    if (send(plrt_socket, &op, sizeof(op), 0) < 0)
244 +#else
245  #ifdef __linux__
246      struct vifctl vc;
247  
248 @@ -224,6 +294,7 @@
249  #else /* *BSD et al. */
250      if (setsockopt(igmp_socket, IPPROTO_IP, MRT_DEL_VIF, (char *)&vifi, sizeof(vifi)) < 0)
251  #endif /* !__linux__ */
252 +#endif /* PLANETLAB */
253      {
254          if (errno == EADDRNOTAVAIL || errno == EINVAL)
255              return;
256 @@ -238,31 +309,50 @@
257   */
258  void k_add_rg(u_int32 origin, struct gtable *g)
259  {
260 -    struct mfcctl mc;
261 +    struct {
262 +        u_int32 op;
263 +        u_int32 len;
264 +        struct mfcctl mc;
265 +    } op;
266 +    
267      vifi_t i;
268  
269  #ifdef DEBUG_MFC
270      md_log(MD_ADD, origin, g->gt_mcastgrp);
271  #endif
272      /* copy table values so that setsockopt can process it */
273 -    mc.mfcc_origin.s_addr = origin;
274 +    op.mc.mfcc_origin.s_addr = origin;
275  #ifdef OLD_KERNEL
276 -    mc.mfcc_originmask.s_addr = 0xffffffff;
277 +    op.mc.mfcc_originmask.s_addr = 0xffffffff;
278  #endif
279 -    mc.mfcc_mcastgrp.s_addr = g->gt_mcastgrp;
280 -    mc.mfcc_parent = g->gt_route ? g->gt_route->rt_parent : NO_VIF;
281 +    op.mc.mfcc_mcastgrp.s_addr = g->gt_mcastgrp;
282 +    op.mc.mfcc_parent = g->gt_route ? g->gt_route->rt_parent : NO_VIF;
283      for (i = 0; i < numvifs; i++)
284 -       mc.mfcc_ttls[i] = g->gt_ttls[i];
285 +       op.mc.mfcc_ttls[i] = g->gt_ttls[i];
286 +
287 +#ifdef PLANETLAB
288 +
289 +    /* Send to PlanetLab's user-space MRT daemon */
290 +    op.op = MRT_ADD_MFC;
291 +    op.len = sizeof(op.mc);
292 +    if (send(plrt_socket, &op, sizeof(op), 0) < 0)
293 +
294 +#else /* here if not PLANETLAB */
295  
296      /* write to kernel space */
297      if (setsockopt(igmp_socket, IPPROTO_IP, MRT_ADD_MFC,
298 -                  (char *)&mc, sizeof(mc)) < 0) {
299 +                  (char *)&op.mc, sizeof(op.mc)) < 0) 
300 +   
301 +#endif /* PLANETLAB */
302 +   
303 +    {
304  #ifdef DEBUG_MFC
305         md_log(MD_ADD_FAIL, origin, g->gt_mcastgrp);
306  #endif
307         logit(LOG_WARNING, errno, "setsockopt MRT_ADD_MFC",
308                 inet_fmt(origin, s1, sizeof(s1)), inet_fmt(g->gt_mcastgrp, s2, sizeof(s2)));
309      }
310 +
311  }
312  
313  
314 @@ -271,20 +361,37 @@
315   */
316  int k_del_rg(u_int32 origin, struct gtable *g)
317  {
318 -    struct mfcctl mc;
319 +    struct {
320 +        u_int32 op;
321 +        u_int32 len;
322 +        struct mfcctl mc;
323 +    } op;
324  
325  #ifdef DEBUG_MFC
326      md_log(MD_DEL, origin, g->gt_mcastgrp);
327  #endif
328      /* copy table values so that setsockopt can process it */
329 -    mc.mfcc_origin.s_addr = origin;
330 +    op.mc.mfcc_origin.s_addr = origin;
331  #ifdef OLD_KERNEL
332 -    mc.mfcc_originmask.s_addr = 0xffffffff;
333 +    op.mc.mfcc_originmask.s_addr = 0xffffffff;
334  #endif
335 -    mc.mfcc_mcastgrp.s_addr = g->gt_mcastgrp;
336 +    op.mc.mfcc_mcastgrp.s_addr = g->gt_mcastgrp;
337 +
338 +#ifdef PLANETLAB
339 +
340 +    /* Send to PlanetLab's user-space MRT daemon */
341 +    op.op = MRT_DEL_MFC;
342 +    op.len = sizeof(op.mc);
343 +    if (send(plrt_socket, &op, sizeof(op), 0) < 0)
344 +
345 +#else /* here if not PLANETLAB */
346  
347      /* write to kernel space */
348 -    if (setsockopt(igmp_socket, IPPROTO_IP, MRT_DEL_MFC, (char *)&mc, sizeof(mc)) < 0) {
349 +    if (setsockopt(igmp_socket, IPPROTO_IP, MRT_DEL_MFC, (char *)&op.mc, sizeof(op.mc)) < 0) 
350 +
351 +#endif /* PLANETLAB */
352 +    
353 +    {
354  #ifdef DEBUG_MFC
355         md_log(MD_DEL_FAIL, origin, g->gt_mcastgrp);
356  #endif
357 diff -ur --exclude='*.o' --exclude=cfparse.c --exclude='*~' mrouted-3.9.5/main.c mrouted-3.9.5-pl/main.c
358 --- mrouted-3.9.5/main.c        2011-03-05 21:45:25.000000000 +0100
359 +++ mrouted-3.9.5-pl/main.c     2011-08-30 15:31:01.281814000 +0200
360 @@ -52,9 +52,9 @@
361  time_t mrouted_init_time;
362  
363  #ifdef SNMP
364 -#define NHANDLERS      34
365 +#define NHANDLERS      35
366  #else
367 -#define NHANDLERS      2
368 +#define NHANDLERS      3
369  #endif
370  
371  static struct ihandler {
372 @@ -206,6 +206,9 @@
373      fputs("  -h, --help           Show this help text\n", stderr);
374      fputs("  -p                   Disable pruning.  Deprecated, compatibility option\n", stderr);
375      fputs("  -r, --show-routes    Show state of VIFs and multicast routing tables\n", stderr);
376 +#ifdef PLANETLAB
377 +    fputs("  -F                   Path to the PlanetLab userland forwarder, default /var/run/mcastfwd\n", stderr);
378 +#endif
379      fprintf(stderr, "  -v, --version        Show %s version\n", __progname);
380      fputs("\n", stderr);
381  
382 @@ -258,11 +261,23 @@
383  
384      snprintf(versionstring, sizeof(versionstring), "mrouted version %s", todaysversion);
385  
386 -    while ((ch = getopt_long(argc, argv, "c:d::fhpP::rv", long_options, NULL)) != EOF) {
387 +#ifdef PLANETLAB
388 +#define PLOPTIONS ":F"
389 +#else
390 +#define PLOPTIONS ""
391 +#endif
392 +
393 +    while ((ch = getopt_long(argc, argv, "c:d::fhpP::rv" PLOPTIONS, long_options, NULL)) != EOF) {
394         switch (ch) {
395             case 'c':
396                 configfilename = optarg;
397                 break;
398 +               
399 +#ifdef PLANETLAB
400 +               case 'F':
401 +               plrt_socket_path = optarg;
402 +               break;
403 +#endif
404  
405             case 'd':
406                 if (!optarg)
407 @@ -410,6 +425,8 @@
408      init_ipip();
409      init_routes();
410      init_ktable();
411 +    k_init_plrt();
412 +
413  #ifndef OLD_KERNEL
414      /*
415       * Unfortunately, you can't k_get_version() unless you've
416 @@ -422,6 +439,7 @@
417      k_init_dvmrp();
418      vers = k_get_version();
419      k_stop_dvmrp();
420 +    
421      /*XXX
422       * This function must change whenever the kernel version changes
423       */
424 @@ -466,6 +484,15 @@
425         logit(LOG_ERR, 0, "Descriptor too big");
426      FD_SET(igmp_socket, &readers);
427      nfds = igmp_socket + 1;
428 +    
429 +#ifdef PLANETLAB
430 +    if (plrt_socket >= (int)FD_SETSIZE)
431 +       logit(LOG_ERR, 0, "Descriptor too big");
432 +    FD_SET(plrt_socket, &readers);
433 +    if (plrt_socket >= nfds)
434 +        nfds = plrt_socket + 1;
435 +#endif
436 +
437      for (i = 0; i < nhandlers; i++) {
438         if (ihandlers[i].fd >= (int)FD_SETSIZE)
439             logit(LOG_ERR, 0, "Descriptor too big");
440 @@ -602,6 +629,17 @@
441                 accept_igmp(recvlen);
442             }
443  
444 +#ifdef PLANETLAB
445 +           if (FD_ISSET(plrt_socket, &rfds)) {
446 +               recvlen = recvfrom(plrt_socket, recv_buf, RECV_BUF_SIZE, 0, NULL, &dummy);
447 +               if (recvlen < 0) {
448 +                   if (errno != EINTR) logit(LOG_ERR, errno, "recvfrom");
449 +                   continue;
450 +               }
451 +               accept_igmp(recvlen);
452 +           }
453 +#endif
454 +
455             for (i = 0; i < nhandlers; i++) {
456                 if (FD_ISSET(ihandlers[i].fd, &rfds)) {
457                     (*ihandlers[i].func)(ihandlers[i].fd, &rfds);
458 @@ -808,6 +846,7 @@
459         if (did_final_init)
460             k_stop_dvmrp();
461      }
462 +    k_stop_plrt();
463  }
464  
465  /*
466 diff -ur --exclude='*.o' --exclude=cfparse.c --exclude='*~' mrouted-3.9.5/Makefile mrouted-3.9.5-pl/Makefile
467 --- mrouted-3.9.5/Makefile      2011-03-05 21:45:25.000000000 +0100
468 +++ mrouted-3.9.5-pl/Makefile   2011-08-10 17:18:22.233596000 +0200
469 @@ -43,7 +43,7 @@
470  
471  ## Common
472  CFLAGS        = $(MCAST_INCLUDE) $(SNMPDEF) $(RSRRDEF) $(INCLUDES) $(DEFS) $(USERCOMPILE)
473 -CFLAGS       += -O2 -W -Wall -Werror
474 +CFLAGS       += -O2 -W -Wall
475  #CFLAGS       += -O -g
476  LDLIBS        = $(SNMPLIBDIR) $(SNMPLIBS) $(EXTRA_LIBS)
477  LDFLAGS      += -Wl,-Map,$@.map
478 Only in mrouted-3.9.5-pl: Makefile.bk
479 Only in mrouted-3.9.5-pl: map-mbone
480 Only in mrouted-3.9.5-pl: map-mbone.map
481 Only in mrouted-3.9.5-pl: mrinfo
482 Only in mrouted-3.9.5-pl: mrinfo.map
483 Only in mrouted-3.9.5-pl: mrouted
484 Only in mrouted-3.9.5-pl: mrouted.map
485 Only in mrouted-3.9.5-pl: mtrace
486 Only in mrouted-3.9.5-pl: mtrace.map
487 diff -ur --exclude='*.o' --exclude=cfparse.c --exclude='*~' mrouted-3.9.5/pathnames.h mrouted-3.9.5-pl/pathnames.h
488 --- mrouted-3.9.5/pathnames.h   2011-03-05 21:45:25.000000000 +0100
489 +++ mrouted-3.9.5-pl/pathnames.h        2011-08-29 13:10:27.043684000 +0200
490 @@ -14,5 +14,6 @@
491  #define _PATH_MROUTED_GENID    _PATH_MROUTED_RUNDIR "/mrouted.genid"
492  #define _PATH_MROUTED_DUMP     _PATH_MROUTED_RUNDIR "/mrouted.dump"
493  #define _PATH_MROUTED_CACHE    _PATH_MROUTED_RUNDIR "/mrouted.cache"
494 +#define _PATH_MROUTED_PLRT     _PATH_VARRUN "mcastrt"
495  
496  #endif /* __MROUTED_PATHNAMES_H__ */
497 Only in mrouted-3.9.5-pl: vers.c
498 diff -ur --exclude='*.o' --exclude=cfparse.c --exclude='*~' mrouted-3.9.5/vif.c mrouted-3.9.5-pl/vif.c
499 --- mrouted-3.9.5/vif.c 2011-03-05 21:45:25.000000000 +0100
500 +++ mrouted-3.9.5-pl/vif.c      2011-08-30 10:18:29.223147000 +0200
501 @@ -139,6 +139,7 @@
502      v->uv_lcl_addr     = 0;
503      v->uv_rmt_addr     = 0;
504      v->uv_dst_addr     = t ? 0 : dvmrp_group;
505 +    v->uv_ptp_addr  = 0;
506      v->uv_subnet       = 0;
507      v->uv_subnetmask   = 0;
508      v->uv_subnetbcast  = 0;
509 @@ -526,6 +527,8 @@
510                     return(vifi);
511             }
512             else {
513 +               if (src == v->uv_ptp_addr)
514 +                   return(vifi);
515                 if ((src & v->uv_subnetmask) == v->uv_subnet &&
516                     ((v->uv_subnetmask == 0xffffffff) ||
517                      (src != v->uv_subnetbcast)))
518 @@ -1666,6 +1669,10 @@
519                         scaletime(now - v->uv_querier->al_ctime),
520                         scaletime(v->uv_querier->al_timer));
521         }
522 +       if (0 != v->uv_ptp_addr) {
523 +           fprintf(fp, "                     PtP remote: %-18s\n",
524 +                                   inet_fmt(v->uv_ptp_addr, s1, sizeof(s1)));
525 +       }
526         if (v->uv_flags & VIFF_BLASTER)
527             fprintf(fp, "                  blasterbuf size: %dk\n",
528                         v->uv_blasterlen / 1024);
529 diff -ur --exclude='*.o' --exclude=cfparse.c --exclude='*~' mrouted-3.9.5/vif.h mrouted-3.9.5-pl/vif.h
530 --- mrouted-3.9.5/vif.h 2011-03-05 21:45:25.000000000 +0100
531 +++ mrouted-3.9.5-pl/vif.h      2011-08-29 14:35:35.695829000 +0200
532 @@ -109,6 +109,7 @@
533      u_int32         uv_lcl_addr;   /* local address of this vif            */
534      u_int32         uv_rmt_addr;   /* remote end-point addr (tunnels only) */
535      u_int32         uv_dst_addr;   /* destination for DVMRP/PIM messages   */
536 +    u_int32         uv_ptp_addr;   /* remote peer address   (pointopoint only) */
537      u_int32         uv_subnet;     /* subnet number         (phyints only) */
538      u_int32         uv_subnetmask; /* subnet mask           (phyints only) */
539      u_int32         uv_subnetbcast;/* subnet broadcast addr (phyints only) */