[PATCH] host: new applet. nslookup: changed output to be more standard

gotrunks at gmail.com gotrunks at gmail.com
Thu Aug 18 10:19:54 UTC 2011


Hi,

I've added the host applet in nslookup.c and changed the output of
nslookup to be more standard, plus minor changes.

$ ./busybox_old nslookup www.google.com
Server:    80.58.61.250
Address 1: 80.58.61.250 250.Red-80-58-61.staticIP.rima-tde.net

Name:      www.google.com
Address 1: 74.125.39.103 fx-in-f103.1e100.net
Address 2: 74.125.39.106 fx-in-f106.1e100.net
Address 3: 74.125.39.147 fx-in-f147.1e100.net
Address 4: 74.125.39.99 fx-in-f99.1e100.net
Address 5: 74.125.39.105 fx-in-f105.1e100.net
Address 6: 74.125.39.104 fx-in-f104.1e100.net


$ ./busybox nslookup www.google.com
Server:  80.58.61.250
Address: 80.58.61.250 250.Red-80-58-61.staticIP.rima-tde.net

Name:    www.google.com
Address: 74.125.39.103 fx-in-f103.1e100.net
Name:    www.google.com
Address: 74.125.39.106 fx-in-f106.1e100.net
Name:    www.google.com
Address: 74.125.39.147 fx-in-f147.1e100.net
Name:    www.google.com
Address: 74.125.39.99 fx-in-f99.1e100.net
Name:    www.google.com
Address: 74.125.39.105 fx-in-f105.1e100.net
Name:    www.google.com
Address: 74.125.39.104 fx-in-f104.1e100.net


$ ./busybox host www.google.com
www.google.com has address 74.125.39.103
www.google.com has address 74.125.39.106
www.google.com has address 74.125.39.147
www.google.com has address 74.125.39.99
www.google.com has address 74.125.39.105
www.google.com has address 74.125.39.104


!ENABLE_HOST && ENABLE_NSLOOKUP
$ make bloatcheck
function                                             old     new   delta
packed_usage                                       28561   28550     -11
.rodata                                           148940  148927     -13
print_host                                           214     189     -25
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-49)             Total: -49 bytes
   text	   data	    bss	    dec	    hex	filename
 936792	   4146	   9552	 950490	  e80da	busybox_old
 936754	   4146	   9552	 950452	  e80b4	busybox_unstripped


ENABLE_HOST && ENABLE_NSLOOKUP
$ make bloatcheck
function                                             old     new   delta
.rodata                                           148940  148962     +22
nslookup_main                                        195     207     +12
print_host                                           214     223      +9
applet_main                                         2808    2816      +8
applet_names                                        2411    2416      +5
applet_nameofs                                       702     704      +2
packed_usage                                       28561   28559      -2
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 6/1 up/down: 58/-2)              Total: 56 bytes
   text	   data	    bss	    dec	    hex	filename
 936792	   4146	   9552	 950490	  e80da	busybox_old
 936835	   4146	   9552	 950533	  e8105	busybox_unstripped


Patch attached.

Regards,
-- 
Pere
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-host-new-applet.-nslookup-changed-output-to-be-more-.patch
Type: text/x-patch
Size: 4804 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20110818/969edacb/attachment.bin>


More information about the busybox mailing list