Lines Matching refs:pi

46 	struct tc_rsvp_gpi *pi = dir ? &pinfo->dpi : &pinfo->spi;  in get_addr_and_pi()  local
56 pi->key = htonl(((__u32)tmp)<<16); in get_addr_and_pi()
57 pi->mask = htonl(0xFFFF0000); in get_addr_and_pi()
60 pi->key = htonl(((__u32)tmp)); in get_addr_and_pi()
61 pi->mask = htonl(0x0000FFFF); in get_addr_and_pi()
63 pi->offset = 0; in get_addr_and_pi()
73 if (pi->mask || argc <= 0) in get_addr_and_pi()
82 pi->mask = htonl(0xFFFFFFFF); in get_addr_and_pi()
83 pi->key = htonl(gpi); in get_addr_and_pi()
84 pi->offset = 4; in get_addr_and_pi()
94 pi->mask = htonl(0xFFFFFFFF); in get_addr_and_pi()
95 pi->key = htonl(gpi); in get_addr_and_pi()
96 pi->offset = 0; in get_addr_and_pi()
107 pi->mask = htonl(0x000FFFFF); in get_addr_and_pi()
108 pi->key = htonl(flabel) & pi->mask; in get_addr_and_pi()
109 pi->offset = -40; in get_addr_and_pi()
136 if (get_integer(&pi->offset, *argv, 0)) in get_addr_and_pi()
141 if ((pi->offset & 3) == 0) { in get_addr_and_pi()
144 } else if ((pi->offset & 3) == 1) { in get_addr_and_pi()
147 } else if ((pi->offset & 3) == 3) { in get_addr_and_pi()
152 if ((pi->offset & 3) == 0) { in get_addr_and_pi()
157 pi->offset &= ~3; in get_addr_and_pi()
158 pi->mask = htonl(mask); in get_addr_and_pi()
159 pi->key = htonl(tmp) & pi->mask; in get_addr_and_pi()
288 static char * sprint_spi(struct tc_rsvp_gpi *pi, int dir, char *buf) in sprint_spi() argument
290 if (pi->offset == 0) { in sprint_spi()
291 if (dir && pi->mask == htonl(0xFFFF)) { in sprint_spi()
292 snprintf(buf, SPRINT_BSIZE-1, "/%d", htonl(pi->key)); in sprint_spi()
295 if (!dir && pi->mask == htonl(0xFFFF0000)) { in sprint_spi()
296 snprintf(buf, SPRINT_BSIZE-1, "/%d", htonl(pi->key)>>16); in sprint_spi()
299 if (pi->mask == htonl(0xFFFFFFFF)) { in sprint_spi()
300 snprintf(buf, SPRINT_BSIZE-1, " spi/esp 0x%08x", htonl(pi->key)); in sprint_spi()
303 } else if (pi->offset == 4 && pi->mask == htonl(0xFFFFFFFF)) { in sprint_spi()
304 snprintf(buf, SPRINT_BSIZE-1, " spi/ah 0x%08x", htonl(pi->key)); in sprint_spi()
306 } else if (pi->offset == -40 && pi->mask == htonl(0x000FFFFF)) { in sprint_spi()
307 snprintf(buf, SPRINT_BSIZE-1, " flowlabel 0x%05x", htonl(pi->key)); in sprint_spi()
311 htonl(pi->key), htonl(pi->mask), pi->offset); in sprint_spi()