Message ID | 1400159422-11797-2-git-send-email-jiri@resnulli.us |
---|---|
State | Accepted, archived |
Delegated to: | stephen hemminger |
Headers | show |
On Thu, 15 May 2014 15:10:20 +0200 Jiri Pirko <jiri@resnulli.us> wrote: > Signed-off-by: Jiri Pirko <jiri@resnulli.us> > --- > misc/arpd.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > Why not use more standard ether_ntoa ? -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Thu, May 15, 2014 at 05:43:42PM CEST, stephen@networkplumber.org wrote: >On Thu, 15 May 2014 15:10:20 +0200 >Jiri Pirko <jiri@resnulli.us> wrote: > >> Signed-off-by: Jiri Pirko <jiri@resnulli.us> >> --- >> misc/arpd.c | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) >> > >Why not use more standard ether_ntoa ? Because the rest of the code uses ll_addr_n2a. There is no user of ether_ntoa in iproute2. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, 15 May 2014 18:50:51 +0200 Jiri Pirko <jiri@resnulli.us> wrote: > Thu, May 15, 2014 at 05:43:42PM CEST, stephen@networkplumber.org wrote: > >On Thu, 15 May 2014 15:10:20 +0200 > >Jiri Pirko <jiri@resnulli.us> wrote: > > > >> Signed-off-by: Jiri Pirko <jiri@resnulli.us> > >> --- > >> misc/arpd.c | 6 +++--- > >> 1 file changed, 3 insertions(+), 3 deletions(-) > >> > > > >Why not use more standard ether_ntoa ? > > Because the rest of the code uses ll_addr_n2a. There is no user of > ether_ntoa in iproute2. arpd is more of a standalone program. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Sat, May 17, 2014 at 05:58:16AM CEST, stephen@networkplumber.org wrote: >On Thu, 15 May 2014 18:50:51 +0200 >Jiri Pirko <jiri@resnulli.us> wrote: > >> Thu, May 15, 2014 at 05:43:42PM CEST, stephen@networkplumber.org wrote: >> >On Thu, 15 May 2014 15:10:20 +0200 >> >Jiri Pirko <jiri@resnulli.us> wrote: >> > >> >> Signed-off-by: Jiri Pirko <jiri@resnulli.us> >> >> --- >> >> misc/arpd.c | 6 +++--- >> >> 1 file changed, 3 insertions(+), 3 deletions(-) >> >> >> > >> >Why not use more standard ether_ntoa ? >> >> Because the rest of the code uses ll_addr_n2a. There is no user of >> ether_ntoa in iproute2. > >arpd is more of a standalone program. I know but it is a part of the package (git tree). The other instances use ll_addr_n2a. I'm ok with using ether_ntoa, I just wanted to follow what is already there. I can change it and post v2 it you want. I can also change other instances of usage ll_addr_n2a to ether_ntoa. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Sat, 17 May 2014 10:50:31 +0200 Jiri Pirko <jiri@resnulli.us> wrote: > Sat, May 17, 2014 at 05:58:16AM CEST, stephen@networkplumber.org wrote: > >On Thu, 15 May 2014 18:50:51 +0200 > >Jiri Pirko <jiri@resnulli.us> wrote: > > > >> Thu, May 15, 2014 at 05:43:42PM CEST, stephen@networkplumber.org wrote: > >> >On Thu, 15 May 2014 15:10:20 +0200 > >> >Jiri Pirko <jiri@resnulli.us> wrote: > >> > > >> >> Signed-off-by: Jiri Pirko <jiri@resnulli.us> > >> >> --- > >> >> misc/arpd.c | 6 +++--- > >> >> 1 file changed, 3 insertions(+), 3 deletions(-) > >> >> > >> > > >> >Why not use more standard ether_ntoa ? > >> > >> Because the rest of the code uses ll_addr_n2a. There is no user of > >> ether_ntoa in iproute2. > > > >arpd is more of a standalone program. > > I know but it is a part of the package (git tree). The other instances > use ll_addr_n2a. I'm ok with using ether_ntoa, I just wanted to follow > what is already there. > > I can change it and post v2 it you want. I can also change other instances > of usage ll_addr_n2a to ether_ntoa. > > This is fine, just went ahead and merged this version. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Mon, Jun 09, 2014 at 09:47:22PM CEST, stephen@networkplumber.org wrote: >On Sat, 17 May 2014 10:50:31 +0200 >Jiri Pirko <jiri@resnulli.us> wrote: > >> Sat, May 17, 2014 at 05:58:16AM CEST, stephen@networkplumber.org wrote: >> >On Thu, 15 May 2014 18:50:51 +0200 >> >Jiri Pirko <jiri@resnulli.us> wrote: >> > >> >> Thu, May 15, 2014 at 05:43:42PM CEST, stephen@networkplumber.org wrote: >> >> >On Thu, 15 May 2014 15:10:20 +0200 >> >> >Jiri Pirko <jiri@resnulli.us> wrote: >> >> > >> >> >> Signed-off-by: Jiri Pirko <jiri@resnulli.us> >> >> >> --- >> >> >> misc/arpd.c | 6 +++--- >> >> >> 1 file changed, 3 insertions(+), 3 deletions(-) >> >> >> >> >> > >> >> >Why not use more standard ether_ntoa ? >> >> >> >> Because the rest of the code uses ll_addr_n2a. There is no user of >> >> ether_ntoa in iproute2. >> > >> >arpd is more of a standalone program. >> >> I know but it is a part of the package (git tree). The other instances >> use ll_addr_n2a. I'm ok with using ether_ntoa, I just wanted to follow >> what is already there. >> >> I can change it and post v2 it you want. I can also change other instances >> of usage ll_addr_n2a to ether_ntoa. >> >> > >This is fine, just went ahead and merged this version. Stephen, looks like you missed the last (3/3) patch from this set. I can't see it in the iproute2 git. Thanks Jiri -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Tue, Jun 10, 2014 at 05:50:25PM CEST, jiri@resnulli.us wrote: >Mon, Jun 09, 2014 at 09:47:22PM CEST, stephen@networkplumber.org wrote: >>On Sat, 17 May 2014 10:50:31 +0200 >>Jiri Pirko <jiri@resnulli.us> wrote: >> >>> Sat, May 17, 2014 at 05:58:16AM CEST, stephen@networkplumber.org wrote: >>> >On Thu, 15 May 2014 18:50:51 +0200 >>> >Jiri Pirko <jiri@resnulli.us> wrote: >>> > >>> >> Thu, May 15, 2014 at 05:43:42PM CEST, stephen@networkplumber.org wrote: >>> >> >On Thu, 15 May 2014 15:10:20 +0200 >>> >> >Jiri Pirko <jiri@resnulli.us> wrote: >>> >> > >>> >> >> Signed-off-by: Jiri Pirko <jiri@resnulli.us> >>> >> >> --- >>> >> >> misc/arpd.c | 6 +++--- >>> >> >> 1 file changed, 3 insertions(+), 3 deletions(-) >>> >> >> >>> >> > >>> >> >Why not use more standard ether_ntoa ? >>> >> >>> >> Because the rest of the code uses ll_addr_n2a. There is no user of >>> >> ether_ntoa in iproute2. >>> > >>> >arpd is more of a standalone program. >>> >>> I know but it is a part of the package (git tree). The other instances >>> use ll_addr_n2a. I'm ok with using ether_ntoa, I just wanted to follow >>> what is already there. >>> >>> I can change it and post v2 it you want. I can also change other instances >>> of usage ll_addr_n2a to ether_ntoa. >>> >>> >> >>This is fine, just went ahead and merged this version. > > >Stephen, looks like you missed the last (3/3) patch from this set. I >can't see it in the iproute2 git. Oh, you already applied that before. That confused me because "iproute2: ipa: show port id" actuall adds code which calls hexstring_n2a :) Anyway, all good now. Sorry for the fuzz. > >Thanks > >Jiri -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/misc/arpd.c b/misc/arpd.c index bfe7de9..0839e3f 100644 --- a/misc/arpd.c +++ b/misc/arpd.c @@ -36,6 +36,7 @@ #include "libnetlink.h" #include "utils.h" +#include "rt_names.h" int resolve_hosts; @@ -721,8 +722,7 @@ int main(int argc, char **argv) goto do_abort; } - dbdat.data = hexstring_a2n(macbuf, b1, 6); - if (dbdat.data == NULL) + if (ll_addr_a2n((char *) b1, 6, macbuf) != 6) goto do_abort; dbdat.size = 6; @@ -747,7 +747,7 @@ int main(int argc, char **argv) printf("%-8d %-15s %s\n", key->iface, inet_ntoa(*(struct in_addr*)&key->addr), - hexstring_n2a(dbdat.data, 6, b1, 18)); + ll_addr_n2a(dbdat.data, 6, ARPHRD_ETHER, b1, 18)); } else { printf("%-8d %-15s FAILED: %dsec ago\n", key->iface,
Signed-off-by: Jiri Pirko <jiri@resnulli.us> --- misc/arpd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)