Lines Matching refs:toys
35 #include "toys.h"
127 resolve_host(toys.optargs[0], &sa);
143 if (!toys.optargs[1]) error_exit("bad syntax");
145 if (!(toys.optflags & FLAG_D)) {
146 char *ptr = toys.optargs[1];
163 xstrncpy(ifre.ifr_name, toys.optargs[1], IFNAMSIZ);
165 if ((toys.optflags & FLAG_H) && (ifre.ifr_hwaddr.sa_family != ARPHRD_ETHER))
171 if (toys.optargs[2]) check_flags(&flags, (toys.optargs+2));
176 if (toys.optflags & FLAG_v) xprintf("Entry set for %s\n", toys.optargs[0]);
200 if (toys.optargs[1]) check_flags(&flags, (toys.optargs+1));
205 if (toys.optflags & FLAG_v) xprintf("Delete entry for %s\n", toys.optargs[0]);
220 if ((toys.optflags & FLAG_A) || (toys.optflags & FLAG_p)) {
227 if (toys.optflags & FLAG_H) {
233 if (((toys.optflags & FLAG_s) || toys.optflags & FLAG_d)) {
234 if (!toys.optargs[0]) error_exit("host name req");
235 resolve_host(toys.optargs[0], &sa);
239 if ((toys.optflags & FLAG_s) && !set_entry()) return;
240 if ((toys.optflags & FLAG_d) && !delete_entry()) return;
247 if (toys.optargs[0]) {
248 resolve_host(toys.optargs[0], &sa);
259 if (((toys.optflags & FLAG_H) && (get_index(hwtype, TT.hw_type) != h_type))
260 || ((toys.optflags & FLAG_i) && strcmp(TT.interface, dev))
261 || (toys.optargs[0] && strcmp(host_ip, ip))) {
267 if (!(toys.optflags & FLAG_n)) {
292 if (toys.optflags & FLAG_v)