Date: Wed, 1 Oct 2008 03:10:47 GMT From: Ryan French <rfrench@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 150737 for review Message-ID: <200810010310.m913Al3n085181@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=150737 Change 150737 by rfrench@rfrench_mpls on 2008/10/01 03:10:33 Added the AF_MPLS type to socket.h I replaced AF_VENDOR00, which I hope was the right thing to do. Changed code to use this value as well as cleaned up the domain code. Affected files ... .. //depot/projects/soc2008/rfrench_mpls/netmpls/mpls_input.c#8 edit .. //depot/projects/soc2008/rfrench_mpls/netmpls/mpls_proto.c#7 edit .. //depot/projects/soc2008/rfrench_mpls/sys/socket.h#2 edit Differences ... ==== //depot/projects/soc2008/rfrench_mpls/netmpls/mpls_input.c#8 (text+ko) ==== @@ -125,7 +125,7 @@ for (i = 0; i < mpls_inkloop; i++) { bzero(&sa_mpls, sizeof(sa_mpls)); smpls = &sa_mpls; - smpls->smpls_family = NETISR_MPLS; + smpls->smpls_family = AF_MPLS; smpls->smpls_len = sizeof(*smpls); smpls->smpls_in_ifindex = ifp->if_index; smpls->smpls_in_label = shim->shim_label & MPLS_LABEL_MASK; ==== //depot/projects/soc2008/rfrench_mpls/netmpls/mpls_proto.c#7 (text+ko) ==== @@ -75,11 +75,12 @@ }; struct domain mplsdomain = { - NETISR_MPLS, "mpls", mpls_init, 0, 0, - mplssw, - &mplssw[sizeof(mplssw)/sizeof(mplssw[0])], 0, - rn_inithead, - offsetof(struct sockaddr_mpls, smpls_in_ifindex) << 3, + .dom_family = AF_MPLS, + .dom_name = "mpls", + .dom_protosw = mplssw, + .dom_protoswNPROTOSW = &mplssw[sizeof(mplssw)/sizeof(mplssw[0])], 0, + .dom_rtattach = rn_inithead, + .dom_rtoffset = offsetof(struct sockaddr_mpls, smpls_in_ifindex) << 3, sizeof(struct sockaddr_mpls) }; ==== //depot/projects/soc2008/rfrench_mpls/sys/socket.h#2 (text+ko) ==== @@ -215,7 +215,7 @@ * even numbered constants for FreeBSD until 134 as odd numbered AF_ * constants 39-133 are now reserved for vendors. */ -#define AF_VENDOR00 39 +#define AF_MPLS 39 /* MPLS protocol family */ #define AF_VENDOR01 41 #define AF_VENDOR02 43 #define AF_VENDOR03 45
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810010310.m913Al3n085181>