• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/zebra/ripd/

Lines Matching refs:offset

1 /* RIP offset-list
74 rip_offset_list_free (struct rip_offset_list *offset)
76 XFREE (MTYPE_RIP_OFFSET_LIST, offset);
82 struct rip_offset_list *offset;
85 LIST_LOOP (rip_offset_list_master, offset, nn)
87 if (strcmp_safe (offset->ifname, ifname) == 0)
88 return offset;
96 struct rip_offset_list *offset;
98 offset = rip_offset_list_lookup (ifname);
99 if (offset)
100 return offset;
102 offset = rip_offset_list_new ();
104 offset->ifname = strdup (ifname);
105 listnode_add_sort (rip_offset_list_master, offset);
107 return offset;
116 struct rip_offset_list *offset;
137 /* Get offset-list structure with interface name. */
138 offset = rip_offset_list_get (ifname);
140 if (offset->direct[direct].alist_name)
141 free (offset->direct[direct].alist_name);
142 offset->direct[direct].alist_name = strdup (alist);
143 offset->direct[direct].metric = metric;
154 struct rip_offset_list *offset;
175 /* Get offset-list structure with interface name. */
176 offset = rip_offset_list_lookup (ifname);
178 if (offset)
180 if (offset->direct[direct].alist_name)
181 free (offset->direct[direct].alist_name);
182 offset->direct[direct].alist_name = NULL;
184 if (offset->direct[RIP_OFFSET_LIST_IN].alist_name == NULL &&
185 offset->direct[RIP_OFFSET_LIST_OUT].alist_name == NULL)
187 listnode_delete (rip_offset_list_master, offset);
188 if (offset->ifname)
189 free (offset->ifname);
190 rip_offset_list_free (offset);
195 vty_out (vty, "Can't find offset-list%s", VTY_NEWLINE);
212 struct rip_offset_list *offset;
215 /* Look up offset-list with interface name. */
216 offset = rip_offset_list_lookup (ifp->name);
217 if (offset && OFFSET_LIST_IN_NAME (offset))
219 alist = access_list_lookup (AFI_IP, OFFSET_LIST_IN_NAME (offset));
224 *metric += OFFSET_LIST_IN_METRIC (offset);
229 /* Look up offset-list without interface name. */
230 offset = rip_offset_list_lookup (NULL);
231 if (offset && OFFSET_LIST_IN_NAME (offset))
233 alist = access_list_lookup (AFI_IP, OFFSET_LIST_IN_NAME (offset));
238 *metric += OFFSET_LIST_IN_METRIC (offset);
251 struct rip_offset_list *offset;
254 /* Look up offset-list with interface name. */
255 offset = rip_offset_list_lookup (ifp->name);
256 if (offset && OFFSET_LIST_OUT_NAME (offset))
258 alist = access_list_lookup (AFI_IP, OFFSET_LIST_OUT_NAME (offset));
263 *metric += OFFSET_LIST_OUT_METRIC (offset);
269 /* Look up offset-list without interface name. */
270 offset = rip_offset_list_lookup (NULL);
271 if (offset && OFFSET_LIST_OUT_NAME (offset))
273 alist = access_list_lookup (AFI_IP, OFFSET_LIST_OUT_NAME (offset));
278 *metric += OFFSET_LIST_OUT_METRIC (offset);
288 "offset-list WORD (in|out) <0-16>",
300 "offset-list WORD (in|out) <0-16> IFNAME",
313 "no offset-list WORD (in|out) <0-16>",
326 "no offset-list WORD (in|out) <0-16> IFNAME",
345 offset_list_del (struct rip_offset_list *offset)
347 if (OFFSET_LIST_IN_NAME (offset))
348 free (OFFSET_LIST_IN_NAME (offset));
349 if (OFFSET_LIST_OUT_NAME (offset))
350 free (OFFSET_LIST_OUT_NAME (offset));
351 if (offset->ifname)
352 free (offset->ifname);
353 rip_offset_list_free (offset);
385 struct rip_offset_list *offset;
387 LIST_LOOP (rip_offset_list_master, offset, nn)
389 if (! offset->ifname)
391 if (offset->direct[RIP_OFFSET_LIST_IN].alist_name)
392 vty_out (vty, " offset-list %s in %d%s",
393 offset->direct[RIP_OFFSET_LIST_IN].alist_name,
394 offset->direct[RIP_OFFSET_LIST_IN].metric,
396 if (offset->direct[RIP_OFFSET_LIST_OUT].alist_name)
397 vty_out (vty, " offset-list %s out %d%s",
398 offset->direct[RIP_OFFSET_LIST_OUT].alist_name,
399 offset->direct[RIP_OFFSET_LIST_OUT].metric,
404 if (offset->direct[RIP_OFFSET_LIST_IN].alist_name)
405 vty_out (vty, " offset-list %s in %d %s%s",
406 offset->direct[RIP_OFFSET_LIST_IN].alist_name,
407 offset->direct[RIP_OFFSET_LIST_IN].metric,
408 offset->ifname, VTY_NEWLINE);
409 if (offset->direct[RIP_OFFSET_LIST_OUT].alist_name)
410 vty_out (vty, " offset-list %s out %d %s%s",
411 offset->direct[RIP_OFFSET_LIST_OUT].alist_name,
412 offset->direct[RIP_OFFSET_LIST_OUT].metric,
413 offset->ifname, VTY_NEWLINE);