1# BIER unit tests 2# 3# Type the following command to launch start the tests: 4# $ test/run_tests -P "load_contrib('bier')" -P "load_contrib('mpls')" -t test/contrib/bier.uts 5 6+ BIER tests 7 8= BIER - build/dissection 9 10from scapy.contrib.mpls import MPLS 11 12p1 = MPLS()/BIER(length=BIERLength.BIER_LEN_256)/IP()/UDP() 13assert p1[MPLS].s == 1 14p2 = BIFT()/BIER(length=BIERLength.BIER_LEN_64)/IP()/UDP() 15assert p2[BIFT].s == 1 16 17p1[MPLS] 18p1[BIER] 19p1[IP] 20p2[BIFT] 21p2[BIER] 22p2[IP] 23