• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt/router/quagga/tests/

Lines Matching defs:as

7  * under the terms of the GNU General Public License as published by the
566 "basic 4-byte as-path",
891 struct aspath *as;
898 as = aspath_parse (s, len, use32bit);
903 return as;
923 validate (struct aspath *as, const struct test_spec *sp)
931 if (as == NULL && sp->shouldbe == NULL)
937 out = aspath_snmp_pathseg (as, &bytes);
943 bytes4 = aspath_put (s, as, 1);
950 printf ("got: %s\n", aspath_print(as));
956 * aspath_parse(aspath_put(as))
961 * - hash to same value as original path
962 * - have same hops and confed counts as original, and as the
969 * aspath_parse(aspath_put(as,USE32BIT))
975 if (strcmp(aspath_print (as), sp->shouldbe)
977 || (aspath_key_make (as) != aspath_key_make (asinout))
983 || (aspath_count_hops (as) != sp->hops)
984 || (aspath_count_confeds (as) != sp->confeds)
993 aspath_key_make (as), aspath_key_make (asinout));
995 aspath_count_hops (as),
998 aspath_count_confeds (as),
1028 /* loop, private and first as checks */
1029 if ((sp->does_loop && aspath_loop_check (as, sp->does_loop) == 0)
1030 || (sp->doesnt_loop && aspath_loop_check (as, sp->doesnt_loop) != 0)
1031 || (aspath_private_as_check (as) != sp->private_as)
1032 || (aspath_firstas_check (as,sp->first)
1038 aspath_firstas_check (as,sp->first));
1040 sp->does_loop, aspath_loop_check (as, sp->does_loop),
1041 sp->doesnt_loop, aspath_loop_check (as, sp->doesnt_loop));
1043 aspath_private_as_check (as));
1058 struct aspath *as = aspath_empty_get ();
1061 printf ("empty_get_test, as: %s\n",aspath_print (as));
1062 if (!validate (as, &sp))
1069 aspath_free (as);