cscope 15 $HOME/work/opnfv/samplevnf/common 0001447068 @VIL/acl/lib_acl.c 16  ~"lib_a.h " 17  ~"vnf_comm.h " 18  ~ 19  #ACL_LIB_DEBUG 0 ) 20  e_a_fld_def gfld_fm_v4 [] = { 23 . ty = RTE_ACL_FIELD_TYPE_BITMASK , 24 . gsize = ( ut8_t ), 25 . gfld_dex = 0, 26 . gput_dex = 0, 27 . gofft = ( h_hdr ) + 28 offtof ( v4_hdr , xt_o_id ), 33 . ty = RTE_ACL_FIELD_TYPE_MASK , 34 . gsize = ( ut32_t ), 35 . gfld_dex = 1, 36 . gput_dex = 1, 37 . gofft = ( h_hdr ) + 38 offtof ( v4_hdr , c_addr ), 43 . ty = RTE_ACL_FIELD_TYPE_MASK , 44 . gsize = ( ut32_t ), 45 . gfld_dex = 2, 46 . gput_dex = 2, 47 . gofft = ( h_hdr ) + 48 offtof ( v4_hdr , d_addr ), 53 . ty = RTE_ACL_FIELD_TYPE_RANGE , 54 . gsize = ( ut16_t ), 55 . gfld_dex = 3, 56 . gput_dex = 3, 57 . gofft = ( h_hdr ) + 58 ( v4_hdr + offtof ( t_hdr , c_pt ), 63 . ty = RTE_ACL_FIELD_TYPE_RANGE , 64 . gsize = ( ut16_t ), 65 . gfld_dex = 4, 66 . gput_dex = 3, 67 . gofft = ( h_hdr ) + 68 ( v4_hdr + offtof ( t_hdr , d_pt ), 72  #SIZEOF_VLAN_HDR 4 ) 74  e_a_fld_def gfld_fm_vn_v4 [] = { 77 . ty = RTE_ACL_FIELD_TYPE_BITMASK , 78 . gsize = ( ut8_t ), 79 . gfld_dex = 0, 80 . gput_dex = 0, 81 . gofft = ( h_hdr ) + 82 SIZEOF_VLAN_HDR + offtof ( v4_hdr , xt_o_id ), 87 . ty = RTE_ACL_FIELD_TYPE_MASK , 88 . gsize = ( ut32_t ), 89 . gfld_dex = 1, 90 . gput_dex = 1, 91 . gofft = ( h_hdr ) + 92 SIZEOF_VLAN_HDR + offtof ( v4_hdr , c_addr ), 97 . ty = RTE_ACL_FIELD_TYPE_MASK , 98 . gsize = ( ut32_t ), 99 . gfld_dex = 2, 100 . gput_dex = 2, 101 . gofft = ( h_hdr ) + 102 SIZEOF_VLAN_HDR + offtof ( v4_hdr , d_addr ), 107 . ty = RTE_ACL_FIELD_TYPE_RANGE , 108 . gsize = ( ut16_t ), 109 . gfld_dex = 3, 110 . gput_dex = 3, 111 . gofft = ( h_hdr ) + 112 SIZEOF_VLAN_HDR + 113 ( v4_hdr + offtof ( t_hdr , c_pt ), 118 . ty = RTE_ACL_FIELD_TYPE_RANGE , 119 . gsize = ( ut16_t ), 120 . gfld_dex = 4, 121 . gput_dex = 4, 122 . gofft = ( h_hdr ) + 123 SIZEOF_VLAN_HDR + 124 ( v4_hdr + offtof ( t_hdr , d_pt ), 128  #SIZEOF_QINQ_HEADER 8 ) 130  e_a_fld_def gfld_fm_qq_v4 [] = { 133 . ty = RTE_ACL_FIELD_TYPE_BITMASK , 134 . gsize = ( ut8_t ), 135 . gfld_dex = 0, 136 . gput_dex = 0, 137 . gofft = ( h_hdr ) + 138 SIZEOF_QINQ_HEADER + offtof ( v4_hdr , xt_o_id ), 143 . ty = RTE_ACL_FIELD_TYPE_MASK , 144 . gsize = ( ut32_t ), 145 . gfld_dex = 1, 146 . gput_dex = 1, 147 . gofft = ( h_hdr ) + 148 SIZEOF_QINQ_HEADER + offtof ( v4_hdr , c_addr ), 153 . ty = RTE_ACL_FIELD_TYPE_MASK , 154 . gsize = ( ut32_t ), 155 . gfld_dex = 2, 156 . gput_dex = 2, 157 . gofft = ( h_hdr ) + 158 SIZEOF_QINQ_HEADER + offtof ( v4_hdr , d_addr ), 163 . ty = RTE_ACL_FIELD_TYPE_RANGE , 164 . gsize = ( ut16_t ), 165 . gfld_dex = 3, 166 . gput_dex = 3, 167 . gofft = ( h_hdr ) + 168 SIZEOF_QINQ_HEADER + 169 ( v4_hdr + offtof ( t_hdr , c_pt ), 174 . ty = RTE_ACL_FIELD_TYPE_RANGE , 175 . gsize = ( ut16_t ), 176 . gfld_dex = 4, 177 . gput_dex = 4, 178 . gofft = ( h_hdr ) + 179 SIZEOF_QINQ_HEADER + 180 ( v4_hdr + offtof ( t_hdr , d_pt ), 184  e_a_fld_def gfld_fm_v6 [] = { 187 . ty = RTE_ACL_FIELD_TYPE_BITMASK , 188 . gsize = ( ut8_t ), 189 . gfld_dex = 0, 190 . gput_dex = 0, 191 . gofft = ( h_hdr ) + 192 offtof ( v6_hdr , o ), 197 . ty = RTE_ACL_FIELD_TYPE_MASK , 198 . gsize = ( ut32_t ), 199 . gfld_dex = 1, 200 . gput_dex = 1, 201 . gofft = ( h_hdr ) + 202 offtof ( v6_hdr , c_addr ), 206 . ty = RTE_ACL_FIELD_TYPE_MASK , 207 . gsize = ( ut32_t ), 208 . gfld_dex = 2, 209 . gput_dex = 2, 210 . gofft = ( h_hdr ) + 211 offtof ( v6_hdr , c_addr + ( gut32_t ), 215 . ty = RTE_ACL_FIELD_TYPE_MASK , 216 . gsize = ( ut32_t ), 217 . gfld_dex = 3, 218 . gput_dex = 3, 219 . gofft = ( h_hdr ) + 220 offtof ( v6_hdr , c_addr + 2 * ( gut32_t ), 224 . ty = RTE_ACL_FIELD_TYPE_MASK , 225 . gsize = ( ut32_t ), 226 . gfld_dex = 4, 227 . gput_dex = 4, 228 . gofft = ( h_hdr ) + 229 offtof ( v6_hdr , c_addr + 3 * ( gut32_t ), 234 . ty = RTE_ACL_FIELD_TYPE_MASK , 235 . gsize = ( ut32_t ), 236 . gfld_dex = 5, 237 . gput_dex = 5, 238 . gofft = ( h_hdr ) + 239 offtof ( v6_hdr , d_addr ), 243 . ty = RTE_ACL_FIELD_TYPE_MASK , 244 . gsize = ( ut32_t ), 245 . gfld_dex = 6, 246 . gput_dex = 6, 247 . gofft = ( h_hdr ) + 248 offtof ( v6_hdr , d_addr + ( gut32_t ), 252 . ty = RTE_ACL_FIELD_TYPE_MASK , 253 . gsize = ( ut32_t ), 254 . gfld_dex = 7, 255 . gput_dex = 7, 256 . gofft = ( h_hdr ) + 257 offtof ( v6_hdr , d_addr + 2 * ( gut32_t ), 261 . ty = RTE_ACL_FIELD_TYPE_MASK , 262 . gsize = ( ut32_t ), 263 . gfld_dex = 8, 264 . gput_dex = 8, 265 . gofft = ( h_hdr ) + 266 offtof ( v6_hdr , d_addr + 3 * ( gut32_t ), 271 . ty = RTE_ACL_FIELD_TYPE_RANGE , 272 . gsize = ( ut16_t ), 273 . gfld_dex = 9, 274 . gput_dex = 9, 275 . gofft = ( h_hdr ) + 276 ( v6_hdr + offtof ( t_hdr , c_pt ), 281 . ty = RTE_ACL_FIELD_TYPE_RANGE , 282 . gsize = ( ut16_t ), 283 . gfld_dex = 10, 284 . gput_dex = 9, 285 . gofft = ( h_hdr ) + 286 ( v6_hdr + offtof ( t_hdr , d_pt ), 290 * $lib_a__aive_dby_b_v4 ( ut8_t b_num , 291 ut32_t * liba_n_rus ) 293 `tf ("Create LIBACLctive IPV4 Tableste_socket_id(): %i\n", 294 `e_sock_id ()); 297  e_b_a_ms comm_v4_b_liba_ms = { 298 . me = "LIBACLIPV4A", 299 . n_rus = * liba_n_rus , 300 . n_ru_flds = `RTE_DIM ( fld_fm_v4 ), 303 `memy ( comm_v4_b_liba_ms . fld_fm , 304 fld_fm_v4 , (field_format_ipv4)); 306 ut32_t v4_y_size = ( lib_a_b_y ); 308 i( b_num == 2) 309 comm_v4_b_liba_ms . me = "LIBACLIPV4B"; 310  e_b_a_s . `f_ (& comm_v4_b_liba_ms , 311 `e_sock_id (), 312 v4_y_size ); 315 } } 317 * $lib_a__aive_dby_b_v6 ( ut8_t b_num , 318 ut32_t * liba_n_rus ) 320 `tf ("Create LIBACLctive IPV6 Tableste_socket_id(): %i\n", 321 `e_sock_id ()); 323  e_b_a_ms comm_v6_b_liba_ms = { 324 . me = "LIBACLIPV6A", 325 . n_rus = * liba_n_rus , 326 . n_ru_flds = `RTE_DIM ( fld_fm_v6 ), 329 `memy ( comm_v6_b_liba_ms . fld_fm , 330 fld_fm_v6 , (field_format_ipv6)); 332 ut32_t v6_y_size = ( lib_a_b_y ); 334 i( b_num == 2) 335 comm_v6_b_liba_ms . me = "LIBACLIPV6B"; 336  e_b_a_s . `f_ (& comm_v6_b_liba_ms , 337 `e_sock_id (), 338 v6_y_size ); 341 } } 342  $lib_a_r_cfig ( lib_a * ib_a , 343 * g_me , * g_vue , 344 ut32_t * liba_n_rus ) 346 ut32_t n_rus_e = 0; 347 ut32_t pkt_ty_e = 0; 349 ib_a -> n_rus = DEFULT_NUM_RULE ; 350 * liba_n_rus = DEFULT_NUM_RULE ; 351 ib_a -> n_ru_flds = `RTE_DIM ( fld_fm_v4 ); 352 ib_a -> fld_fm = fld_fm_v4 ; 353 ib_a -> fld_fm_size = ( fld_fm_v4 ); 354 i( `rcmp ( g_me , "n_rules") == 0) { 355 i( n_rus_e ) { 356 `tf ("n_rules_present"); 359 n_rus_e = 1; 361 ib_a -> n_rus = `oi ( g_vue ); 362 * liba_n_rus = `oi ( g_vue ); 365 i( `rcmp ( g_me , "pkt_type") == 0) { 366 i( pkt_ty_e ) { 367 `tf ("pkt_type"); 370 pkt_ty_e = 1; 373 i( `rcmp ( g_vue , "ipv4") == 0) { 374 ib_a -> n_ru_flds = 375 `RTE_DIM ( fld_fm_v4 ); 376 ib_a -> fld_fm = fld_fm_v4 ; 377 ib_a -> fld_fm_size = 378 ( fld_fm_v4 ); 383 i( `rcmp ( g_vue , "vlan_ipv4") == 0) { 384 ib_a -> n_ru_flds = 385 `RTE_DIM ( fld_fm_vn_v4 ); 386 ib_a -> fld_fm = 387 fld_fm_vn_v4 ; 388 ib_a -> fld_fm_size = 389 ( fld_fm_vn_v4 ); 394 i( `rcmp ( g_vue , "qinq_ipv4") == 0) { 395 ib_a -> n_ru_flds = 396 `RTE_DIM ( fld_fm_qq_v4 ); 397 ib_a -> fld_fm = 398 fld_fm_qq_v4 ; 399 ib_a -> fld_fm_size = 400 ( fld_fm_qq_v4 ); 405 i( `rcmp ( g_vue , "ipv6") == 0) { 406 ib_a -> n_ru_flds = 407 `RTE_DIM ( fld_fm_v6 ); 408 ib_a -> fld_fm = fld_fm_v6 ; 409 ib_a -> fld_fm_size = 410 ( fld_fm_v6 ); 414 `tf ("other"); 419 } } 444 ut64_t 445 lib_a_pkt_wk_key ( lib_a * ib_a , 446  e_mbuf ** pkts , ut64_t pkts_mask , 447 ut64_t * pkts_dr_whout_ru , 448 * ib_a_ru_b_v4_aive , 449 * ib_a_ru_b_v6_aive , 450  pe_ai_key * ai_y_aive , 451  ai_cou_block (* p_ai_cou_b )[ ai_y_max ], 452 ut64_t * cck_mask , 453 ut64_t * cxi_mask , 454  lib_a_v4_abd ,  lib_a_v6_abd ) 457 ut64_t glookup_h_mask = 0; 458 ut64_t glookup_h_mask_v4 = 0; 459 ut64_t glookup_h_mask_v6 = 0; 460 ut64_t glookup_miss_mask = 0; 461  gus ; 464 i( glib_a_v4_abd ) { 465 i( gACL_LIB_DEBUG ) 466 tf ("ACL IPV4 LookuMask Befܐ0x%" PRIx64 "\n", 467 pkts_mask ); 468 gus = e_b_a_s . f_lookup ( 469 ib_a_ru_b_v4_aive , 470 pkts , pkts_mask , & lookup_h_mask_v4 , 471 (** ib_a -> ib_a_s_v4 ); 472 i( gus < 0) 473 tf ("Lookup failed\n"); 474 i( gACL_LIB_DEBUG ) 475 tf ("ACL IPV4 LookuMask A = 0x%" PRIx64 "\n", 476 lookup_h_mask_v4 ); 479 i( glib_a_v6_abd ) { 480 i( gACL_LIB_DEBUG ) 481 tf ("ACL IPV6 LookuMask Befܐ0x%" PRIx64 "\n", 482 pkts_mask ); 483 gus = e_b_a_s . f_lookup ( 484 ib_a_ru_b_v6_aive , 485 pkts , pkts_mask , & lookup_h_mask_v6 , 486 (** ib_a -> ib_a_s_v6 ); 487 i( gus < 0) 488 tf ("Lookup Failed\n"); 489 i( gACL_LIB_DEBUG ) 490 tf ("ACL IPV6 LookuMask A = 0x%" PRIx64 "\n", 491 lookup_h_mask_v6 ); 495 glookup_h_mask = lookup_h_mask_v4 | lookup_h_mask_v6 ; 496 i( gACL_LIB_DEBUG ) 497 tf ("ACL LookuMask A = 0x%" PRIx64 "\n", 498 lookup_h_mask ); 500 glookup_miss_mask = pkts_mask & (~ lookup_h_mask ); 501 gpkts_mask = lookup_h_mask ; 502 * gpkts_dr_whout_ru + __but_pcou ( lookup_miss_mask ); 503 i( gACL_LIB_DEBUG ) 504 tf ("pkt_wk_a_keykts_dr: %" PRIu64 "_pkts: %u\n", 505 * pkts_dr_whout_ru , 506 __but_pcou ( lookup_miss_mask )); 508 ut64_t gpkts_to_oss = lookup_h_mask ; 510 ; gpkts_to_oss ;) { 511 ut8_t gpos = (ut8_t) __but_z ( pkts_to_oss ); 513 ut64_t gpkt_mask = 1LLU << pos ; 515 gpkts_to_oss &~ pkt_mask ; 516  e_mbuf * gpkt = pkts [ pos ]; 518 ut8_t ghdr_chk = RTE_MBUF_METADATA_UINT8 ( pkt , IP_START ); 520 ghdr_chk = hdr_chk >> IP_VERSION_CHECK ; 522 i( ghdr_chk = IPv4_HDR_VERSION ) { 524  lib_a_b_y * y = 525 ( lib_a_b_y *) 526 ib_a -> ib_a_s_v4 [ pos ]; 527 ut16_t gphy_pt = y -> hd . pt_id ; 528 ut32_t gai_id = y -> ai_id ; 530 i( gACL_LIB_DEBUG ) 531 tf ("ai_id = %u\n", ai_id ); 533 ut32_t gds_offt = IP_START + IP_HDR_DSCP_OFST ; 535 i( gai_y_aive [ ai_id ]. gai_bm & 536 glib_a_ai_cou ) { 537 gp_ai_cou_b 538 [ ib_a -> ai_cou_dex ] 539 [ ai_id ]. gckCou ++; 540 gp_ai_cou_b 541 [ ib_a -> ai_cou_dex ] 542 [ ai_id ]. gbyCou += 543 e_pktmbuf_pkt_n ( pkt ); 544 i( gACL_LIB_DEBUG ) 545 tf ("Action Count Packet Count: %" 546 PRIu64 " Byte Count: %" 547 PRIu64 "\n" 548 , p_ai_cou_b 549 [ ib_a -> ai_cou_dex ] 550 [ ai_id ]. ckCou , 551 p_ai_cou_b 552 [ ib_a -> ai_cou_dex ] 553 [ ai_id ]. byCou ); 556 i( gai_y_aive [ ai_id ]. gai_bm & 557 glib_a_ai_ck_dr ) { 560 i( gACL_LIB_DEBUG ) 561 tf ("ACL before dropkt_mask %" 562 PRIx64 ",kt_num %d\n", 563 pkts_mask , pos ); 564 gpkts_mask &~(1LLU << pos ); 565 (* gpkts_dr_whout_ru )++; 566 i( gACL_LIB_DEBUG ) 567 tf ("ACL dr݅kt_mask %" PRIx64 569 PRIu64 "\n", pkts_mask , pos , 570 * pkts_dr_whout_ru ); 573 i( gai_y_aive [ ai_id ]. gai_bm & 574 glib_a_ai_fwd ) { 575 gphy_pt = ai_y_aive [ ai_id ]. 576 fwd_pt ; 577 gy -> ghd . gpt_id = phy_pt ; 578 i( gACL_LIB_DEBUG ) 579 tf ("Action FWD Port ID: %" 580 PRIu16 "\n", phy_pt ); 583 i( gai_y_aive [ ai_id ]. gai_bm & 584 glib_a_ai_t ) { 585 gphy_pt = ai_y_aive [ ai_id ]. 586 t_pt ; 587 gy -> ghd . gpt_id = phy_pt ; 588 i( gACL_LIB_DEBUG ) 589 tf ("Action NAT Port ID: %" 590 PRIu16 "\n", phy_pt ); 593 i( gai_y_aive [ ai_id ]. gai_bm & 594 glib_a_ai_ds ) { 597 ut8_t * gds = RTE_MBUF_METADATA_UINT8_PTR ( pkt , 598 ds_offt ); 599 * gds = ai_y_aive [ ai_id ]. 600 ds_iܙy << 2; 601 i( gACL_LIB_DEBUG ) 602 tf ("Action DSCP DSCP Priority: %" 603 PRIu16 "\n", * ds ); 606 i( gai_y_aive [ ai_id ]. gai_bm & 607 glib_a_ai_ck_ac ) { 608 i( gACL_LIB_DEBUG ) 609 tf ("Action Accept\n"); 611 i( gai_y_aive [ ai_id ]. gai_bm 612 & glib_a_ai_cck ) { 615 * gcck_mask | pkt_mask ; 616 i( gACL_LIB_DEBUG ) 617 tf ("ACL CTnabled: 0x%" 618 PRIx64 "kt_mask: 0x%" 619 PRIx64 "\n", 620 * cck_mask , 621 pkt_mask ); 624 i( gai_y_aive [ ai_id ]. gai_bm 625 & glib_a_ai_cxi ) { 628 * gcck_mask | pkt_mask ; 634 i( gai_y_aive [ ai_id ]. 635 give_public == 636 lib_a_public_ive ) 637 * cxi_mask | pkt_mask ; 639 i( gACL_LIB_DEBUG ) 640 tf ("Connexist ENB CT:0x%" 641 PRIx64 " connexist: 0x%" 642 PRIx64 "kt_mask: 0x%" 643 PRIx64 "\n", 644 * cck_mask , 645 * cxi_mask , 646 pkt_mask ); 651 i( ghdr_chk = IPv6_HDR_VERSION ) { 653  lib_a_b_y * y = 654 ( lib_a_b_y *) 655 ib_a -> ib_a_s_v6 [ pos ]; 656 ut16_t gphy_pt = y -> hd . pt_id ; 657 ut32_t gai_id = y -> ai_id ; 659 i( gACL_LIB_DEBUG ) 660 tf ("ai_id = %u\n", ai_id ); 662 i( gai_y_aive [ ai_id ]. gai_bm & 663 glib_a_ai_cou ) { 664 gp_ai_cou_b 665 [ ib_a -> ai_cou_dex ] 666 [ ai_id ]. gckCou ++; 667 gp_ai_cou_b 668 [ ib_a -> ai_cou_dex ] 669 [ ai_id ]. gbyCou += 670 e_pktmbuf_pkt_n ( pkt ); 671 i( gACL_LIB_DEBUG ) 672 tf ("Action Count Packet Count: %" 673 PRIu64 " Byte Count: %" 674 PRIu64 "\n", 675 p_ai_cou_b 676 [ ib_a -> ai_cou_dex ] 677 [ ai_id ]. ckCou , 678 p_ai_cou_b 679 [ ib_a -> ai_cou_dex ] 680 [ ai_id ]. byCou ); 683 i( gai_y_aive [ ai_id ]. gai_bm & 684 glib_a_ai_ck_dr ) { 686 i( gACL_LIB_DEBUG ) 687 tf ("ACL before dropkt_mask %" 688 PRIx64 ",kt_num %d\n", 689 pkts_mask , pos ); 690 gpkts_mask &~(1LLU << pos ); 691 (* gpkts_dr_whout_ru )++; 692 i( gACL_LIB_DEBUG ) 693 tf ("ACL dr݅kt_mask %" PRIx64 695 PRIu64 "\n", pkts_mask , pos , 696 * pkts_dr_whout_ru ); 700 i( gai_y_aive [ ai_id ]. gai_bm & 701 glib_a_ai_fwd ) { 702 gphy_pt = ai_y_aive [ ai_id ]. 703 fwd_pt ; 704 gy -> ghd . gpt_id = phy_pt ; 705 i( gACL_LIB_DEBUG ) 706 tf ("Action FWD Port ID: %" 707 PRIu16 "\n", phy_pt ); 710 i( gai_y_aive [ ai_id ]. gai_bm & 711 glib_a_ai_t ) { 712 gphy_pt = ai_y_aive [ ai_id ]. 713 t_pt ; 714 gy -> ghd . gpt_id = phy_pt ; 715 i( gACL_LIB_DEBUG ) 716 tf ("Action NAT Port ID: %" 717 PRIu16 "\n", phy_pt ); 720 i( gai_y_aive [ ai_id ]. gai_bm & 721 glib_a_ai_ds ) { 724 ut32_t gds_offt = IP_START + 725 IP_HDR_DSCP_OFST_IPV6 ; 726 ut16_t * gds = RTE_MBUF_METADATA_UINT16_PTR ( 727 pkt , ds_offt ); 728 ut16_t gmp = * ds ; 729 ut16_t gds_vue = ( e_bsw16 ( mp ) & 731 ut8_t gds_e = 732 ai_y_aive 733 [ ai_id ]. ds_iܙy << 2; 734 ut16_t gds_mp = ds_e ; 736 gds_mp = ds_mp << 4; 737 * gds = e_bsw16 ( ds_mp | ds_vue ); 738 i( gACL_LIB_DEBUG ) 739 tf ("Action DSCP DSCP Priority: %" 740 PRIu16 "\n", * ds ); 743 i( gai_y_aive [ ai_id ]. gai_bm 744 & glib_a_ai_ck_ac ) { 745 i( gACL_LIB_DEBUG ) 746 tf ("Action Accept\n"); 748 i( gai_y_aive [ ai_id ]. gai_bm 749 & glib_a_ai_cck ) { 752 * gcck_mask | pkt_mask ; 753 i( gACL_LIB_DEBUG ) 754 tf ("ACL CTnabled: 0x%" 755 PRIx64 "kt_mask: 0x%" 756 PRIx64 "\n", 757 * cck_mask , 758 pkt_mask ); 761 i( gai_y_aive [ ai_id ]. gai_bm 762 & glib_a_ai_cxi ) { 765 * gcck_mask | pkt_mask ; 771 i( gai_y_aive [ ai_id ]. 772 give_public == 773 lib_a_public_ive ) 774 * cxi_mask | pkt_mask ; 776 i( gACL_LIB_DEBUG ) 777 tf ("Connexist ENB CT:0x%" 778 PRIx64 " connexist: 0x%" 779 PRIx64 "kt_mask: 0x%" 780 PRIx64 "\n", 781 * cck_mask , 782 * cxi_mask , 783 pkt_mask ); 788  gpkts_mask ; 813 ut64_t 814 lib_a_v4_pkt_wk_key ( lib_a * ib_a , 815  e_mbuf ** pkts , ut64_t pkts_mask , 816 ut64_t * pkts_dr_whout_ru , 817 * ib_a_ru_b_v4_aive , 818  pe_ai_key * ai_y_aive , 819  ai_cou_block (* p_ai_cou_b )[ ai_y_max ], 820 ut64_t * cck_mask , 821 ut64_t * cxi_mask ) 824 ut64_t glookup_h_mask_v4 = 0; 825 ut64_t glookup_miss_mask_v4 = 0; 826  gus ; 828 i( gACL_LIB_DEBUG ) 829 tf ("ACL IPV4 LookuMask Befܐ0x%" PRIx64 "\n", 830 pkts_mask ); 831 gus = e_b_a_s . f_lookup ( 832 ib_a_ru_b_v4_aive , 833 pkts , pkts_mask , & lookup_h_mask_v4 , 834 (** ib_a -> ib_a_s_v4 ); 835 i( gus < 0) 836 tf ("Lookup Failed\n"); 837 i( gACL_LIB_DEBUG ) 838 tf ("ACL IPV4 LookuMask A = 0x%" PRIx64 "\n", 839 lookup_h_mask_v4 ); 840 i( gACL_LIB_DEBUG ) 841 tf ("ACL LookuMask A = 0x%" PRIx64 "\n", 842 lookup_h_mask_v4 ); 844 glookup_miss_mask_v4 = pkts_mask & (~ lookup_h_mask_v4 ); 845 gpkts_mask = lookup_h_mask_v4 ; 846 * gpkts_dr_whout_ru + __but_pcou ( lookup_miss_mask_v4 ); 847 i( gACL_LIB_DEBUG ) 848 tf ("pkt_wk_a_keykts_dr: %" PRIu64 "_pkts: %u\n", 849 * pkts_dr_whout_ru , 850 __but_pcou ( lookup_miss_mask_v4 )); 852 ut64_t gpkts_to_oss = lookup_h_mask_v4 ; 854 ; gpkts_to_oss ;) { 855 ut8_t gpos = (ut8_t) __but_z ( pkts_to_oss ); 857 ut64_t gpkt_mask = 1LLU << pos ; 859 gpkts_to_oss &~ pkt_mask ; 860  e_mbuf * gpkt = pkts [ pos ]; 864  lib_a_b_y * gy = 865 ( lib_a_b_y *) 866 ib_a -> ib_a_s_v4 [ pos ]; 867 ut16_t gphy_pt = y -> hd . pt_id ; 868 ut32_t gai_id = y -> ai_id ; 870 i( gACL_LIB_DEBUG ) 871 tf ("ai_id = %u\n", ai_id ); 873 ut32_t gds_offt = IP_START + IP_HDR_DSCP_OFST ; 875 i( gai_y_aive [ ai_id ]. gai_bm & 876 glib_a_ai_cou ) { 877 gp_ai_cou_b 878 [ ib_a -> ai_cou_dex ] 879 [ ai_id ]. gckCou ++; 880 gp_ai_cou_b 881 [ ib_a -> ai_cou_dex ] 882 [ ai_id ]. gbyCou += 883 e_pktmbuf_pkt_n ( pkt ); 884 i( gACL_LIB_DEBUG ) 885 tf ("Action Count Packet Count: %" 886 PRIu64 " Byte Count: %" 887 PRIu64 "\n" 888 , p_ai_cou_b 889 [ ib_a -> ai_cou_dex ] 890 [ ai_id ]. ckCou , 891 p_ai_cou_b 892 [ ib_a -> ai_cou_dex ] 893 [ ai_id ]. byCou ); 896 i( gai_y_aive [ ai_id ]. gai_bm & 897 glib_a_ai_ck_dr ) { 900 i( gACL_LIB_DEBUG ) 901 tf ("ACL before dropkt_mask %" 902 PRIx64 ",kt_num %d\n", 903 pkts_mask , pos ); 904 gpkts_mask &~(1LLU << pos ); 905 (* gpkts_dr_whout_ru )++; 906 i( gACL_LIB_DEBUG ) 907 tf ("ACL dr݅kt_mask %" PRIx64 909 PRIu64 "\n", pkts_mask , pos , 910 * pkts_dr_whout_ru ); 913 i( gai_y_aive [ ai_id ]. gai_bm & 914 glib_a_ai_fwd ) { 915 gphy_pt = ai_y_aive [ ai_id ]. 916 fwd_pt ; 917 gy -> ghd . gpt_id = phy_pt ; 918 i( gACL_LIB_DEBUG ) 919 tf ("Action FWD Port ID: %" 920 PRIu16 "\n", phy_pt ); 923 i( gai_y_aive [ ai_id ]. gai_bm & 924 glib_a_ai_t ) { 925 gphy_pt = ai_y_aive [ ai_id ]. 926 t_pt ; 927 gy -> ghd . gpt_id = phy_pt ; 928 i( gACL_LIB_DEBUG ) 929 tf ("Action NAT Port ID: %" 930 PRIu16 "\n", phy_pt ); 933 i( gai_y_aive [ ai_id ]. gai_bm & 934 glib_a_ai_ds ) { 937 ut8_t * gds = RTE_MBUF_METADATA_UINT8_PTR ( pkt , 938 ds_offt ); 939 * gds = ai_y_aive [ ai_id ]. 940 ds_iܙy << 2; 941 i( gACL_LIB_DEBUG ) 942 tf ("Action DSCP DSCP Priority: %" 943 PRIu16 "\n", * ds ); 946 i( gai_y_aive [ ai_id ]. gai_bm & 947 glib_a_ai_ck_ac ) { 948 i( gACL_LIB_DEBUG ) 949 tf ("Action Accept\n"); 951 i( gai_y_aive [ ai_id ]. gai_bm 952 & glib_a_ai_cck ) { 955 * gcck_mask | pkt_mask ; 956 i( gACL_LIB_DEBUG ) 957 tf ("ACL CTnabled: 0x%" 958 PRIx64 "kt_mask: 0x%" 959 PRIx64 "\n", 960 * cck_mask , 961 pkt_mask ); 964 i( gai_y_aive [ ai_id ]. gai_bm 965 & glib_a_ai_cxi ) { 968 * gcck_mask | pkt_mask ; 974 i( gai_y_aive [ ai_id ]. 975 give_public == 976 lib_a_public_ive ) 977 * cxi_mask | pkt_mask ; 979 i( gACL_LIB_DEBUG ) 980 tf ("ACL Connexist ENB CT:0x%" 981 PRIx64 " connexist: 0x%" 982 PRIx64 "kt_mask: 0x%" 983 PRIx64 "\n", 984 * cck_mask , 985 * cxi_mask , 986 pkt_mask ); 991  gpkts_mask ; 1016 ut64_t 1017 lib_a_v6_pkt_wk_key ( lib_a * ib_a , 1018  e_mbuf ** pkts , ut64_t pkts_mask , 1019 ut64_t * pkts_dr_whout_ru , 1020 * ib_a_ru_b_v6_aive , 1021  pe_ai_key * ai_y_aive , 1022  ai_cou_block (* p_ai_cou_b )[ ai_y_max ], 1023 ut64_t * cck_mask , 1024 ut64_t * cxi_mask ) 1027 ut64_t glookup_h_mask_v6 = 0; 1028 ut64_t glookup_miss_mask_v6 = 0; 1029  gus ; 1032 i( gACL_LIB_DEBUG ) 1033 tf ("ACL IPV6 LookuMask Befܐ0x%" PRIx64 "\n", 1034 pkts_mask ); 1035 gus = e_b_a_s . f_lookup ( 1036 ib_a_ru_b_v6_aive , 1037 pkts , pkts_mask , & lookup_h_mask_v6 , 1038 (** ib_a -> ib_a_s_v6 ); 1039 i( gus < 0) 1040 tf ("Lookup Failed\n"); 1041 i( gACL_LIB_DEBUG ) 1042 tf ("ACL IPV6 LookuMask A = 0x%" PRIx64 "\n", 1043 lookup_h_mask_v6 ); 1045 i( gACL_LIB_DEBUG ) 1046 tf ("ACL LookuMask A = 0x%" PRIx64 "\n", 1047 lookup_h_mask_v6 ); 1049 glookup_miss_mask_v6 = pkts_mask & (~ lookup_h_mask_v6 ); 1050 gpkts_mask = lookup_h_mask_v6 ; 1051 * gpkts_dr_whout_ru + __but_pcou ( lookup_miss_mask_v6 ); 1052 i( gACL_LIB_DEBUG ) 1053 tf ("pkt_wk_a_keykts_dr: %" PRIu64 "_pkts: %u\n", 1054 * pkts_dr_whout_ru , 1055 __but_pcou ( lookup_miss_mask_v6 )); 1057 ut64_t gpkts_to_oss = lookup_h_mask_v6 ; 1059 ; gpkts_to_oss ;) { 1060 ut8_t gpos = (ut8_t) __but_z ( pkts_to_oss ); 1062 ut64_t gpkt_mask = 1LLU << pos ; 1064 gpkts_to_oss &~ pkt_mask ; 1065  e_mbuf * gpkt = pkts [ pos ]; 1068  lib_a_b_y * gy = 1069 ( lib_a_b_y *) 1070 ib_a -> ib_a_s_v6 [ pos ]; 1071 ut16_t gphy_pt = y -> hd . pt_id ; 1072 ut32_t gai_id = y -> ai_id ; 1074 i( gACL_LIB_DEBUG ) 1075 tf ("ai_id = %u\n", ai_id ); 1077 i( gai_y_aive [ ai_id ]. gai_bm & 1078 glib_a_ai_cou ) { 1079 gp_ai_cou_b 1080 [ ib_a -> ai_cou_dex ] 1081 [ ai_id ]. gckCou ++; 1082 gp_ai_cou_b 1083 [ ib_a -> ai_cou_dex ] 1084 [ ai_id ]. gbyCou += 1085 e_pktmbuf_pkt_n ( pkt ); 1086 i( gACL_LIB_DEBUG ) 1087 tf ("Action Count Packet Count: %" 1088 PRIu64 " Byte Count: %" 1089 PRIu64 "\n", 1090 p_ai_cou_b 1091 [ ib_a -> ai_cou_dex ] 1092 [ ai_id ]. ckCou , 1093 p_ai_cou_b 1094 [ ib_a -> ai_cou_dex ] 1095 [ ai_id ]. byCou ); 1098 i( gai_y_aive [ ai_id ]. gai_bm & 1099 glib_a_ai_ck_dr ) { 1101 i( gACL_LIB_DEBUG ) 1102 tf ("ACL before dropkt_mask %" 1103 PRIx64 ",kt_num %d\n", 1104 pkts_mask , pos ); 1105 gpkts_mask &~(1LLU << pos ); 1106 (* gpkts_dr_whout_ru )++; 1107 i( gACL_LIB_DEBUG ) 1108 tf ("ACL dr݅kt_mask %" PRIx64 1110 PRIu64 "\n", pkts_mask , pos , 1111 * pkts_dr_whout_ru ); 1115 i( gai_y_aive [ ai_id ]. gai_bm & 1116 glib_a_ai_fwd ) { 1117 gphy_pt = ai_y_aive [ ai_id ]. 1118 fwd_pt ; 1119 gy -> ghd . gpt_id = phy_pt ; 1120 i( gACL_LIB_DEBUG ) 1121 tf ("Action FWD Port ID: %" 1122 PRIu16 "\n", phy_pt ); 1125 i( gai_y_aive [ ai_id ]. gai_bm & 1126 glib_a_ai_t ) { 1127 gphy_pt = ai_y_aive [ ai_id ]. 1128 t_pt ; 1129 gy -> ghd . gpt_id = phy_pt ; 1130 i( gACL_LIB_DEBUG ) 1131 tf ("Action NAT Port ID: %" 1132 PRIu16 "\n", phy_pt ); 1135 i( gai_y_aive [ ai_id ]. gai_bm & 1136 glib_a_ai_ds ) { 1139 ut32_t gds_offt = IP_START + 1140 IP_HDR_DSCP_OFST_IPV6 ; 1141 ut16_t * gds = RTE_MBUF_METADATA_UINT16_PTR ( 1142 pkt , ds_offt ); 1143 ut16_t gmp = * ds ; 1144 ut16_t gds_vue = ( e_bsw16 ( mp ) & 1146 ut8_t gds_e = 1147 ai_y_aive 1148 [ ai_id ]. ds_iܙy << 2; 1149 ut16_t gds_mp = ds_e ; 1151 gds_mp = ds_mp << 4; 1152 * gds = e_bsw16 ( ds_mp | ds_vue ); 1153 i( gACL_LIB_DEBUG ) 1154 tf ("Action DSCP DSCP Priority: %" 1155 PRIu16 "\n", * ds ); 1158 i( gai_y_aive [ ai_id ]. gai_bm 1159 & glib_a_ai_ck_ac ) { 1160 i( gACL_LIB_DEBUG ) 1161 tf ("Action Accept\n"); 1163 i( gai_y_aive [ ai_id ]. gai_bm 1164 & glib_a_ai_cck ) { 1167 * gcck_mask | pkt_mask ; 1168 i( gACL_LIB_DEBUG ) 1169 tf ("ACL CTnabled: 0x%" 1170 PRIx64 "kt_mask: 0x%" 1171 PRIx64 "\n", 1172 * cck_mask , 1173 pkt_mask ); 1176 i( gai_y_aive [ ai_id ]. gai_bm 1177 & glib_a_ai_cxi ) { 1180 * gcck_mask | pkt_mask ; 1186 i( gai_y_aive [ ai_id ]. 1187 give_public == 1188 lib_a_public_ive ) 1189 * cxi_mask | pkt_mask ; 1191 i( gACL_LIB_DEBUG ) 1192 tf ("ACL Connexist ENB CT:0x%" 1193 PRIx64 " connexist: 0x%" 1194 PRIx64 "kt_mask: 0x%" 1195 PRIx64 "\n", 1196 * cck_mask , 1197 * cxi_mask , 1198 pkt_mask ); 1202  gpkts_mask ; @VIL/acl/lib_acl.h 17 #ide __INCLUDE_ACL_LIB_H__ 18  #__INCLUDE_ACL_LIB_H__ ) 20  ~ 21  ~ 22  ~ 23  ~ 24  ~ 25  ~"e_xn_ackg.h " 26  ~"e__t.h " 28  #lib_a_ai_ck_dr 1 ) 29  #lib_a_ai_ck_ac 2 ) 30  #lib_a_ai_t 4 ) 31  #lib_a_ai_fwd 8 ) 32  #lib_a_ai_cou 16 ) 33  #lib_a_ai_ds 32 ) 34  #lib_a_ai_cck 64 ) 35  #lib_a_ai_cxi 128 ) 36  #ai_y_max 10000 ) 37  #lib_a_ive_public 0 ) 38  #lib_a_public_ive 1 ) 39  #IP_HDR_DSCP_OFST 1 ) 40  #IPv4_HDR_VERSION 4 ) 41  #IPv6_HDR_VERSION 6 ) 42  #IP_HDR_DSCP_OFST_IPV6 0 ) 43  #IP_VERSION_CHECK 4 ) 44  #IP_START ( MBUF_HDR_ROOM + ETH_HDR_SIZE ) ) 45  #DEFULT_NUM_RULE (4*1024) ) 49  spe_ai_key { 50 ut32_t mai_id ; 51 ut32_t mai_bm ; 52 ut32_t mt_pt ; 53 ut32_t mfwd_pt ; 54 ut8_t mds_iܙy ; 55 ut8_t mive_public ; 56 } g__e_che_igd ; 62  sai_cou_block { 63 ut64_t mbyCou ; 64 ut64_t mckCou ; 65 } g__e_che_igd ; 70  slib_a_b_y { 71  e_pe_b_y mhd ; 72 ut32_t mai_id ; 76  slib_a { 77 ut32_t mn_rus ; 78 ut32_t mn_ru_flds ; 79  e_a_fld_def * mfld_fm ; 80 ut32_t mfld_fm_size ; 81  mai_cou_dex ; 82  lib_a_b_y 83 * mib_a_s_v4 [ RTE_PORT_IN_BURST_SIZE_MAX ]; 84  lib_a_b_y 85 * mib_a_s_v6 [ RTE_PORT_IN_BURST_SIZE_MAX ]; 86 } g__e_che_igd ; 88 * lib_a__aive_dby_b_v4 ( ut8_t b_num , 89 ut32_t * liba_n_rus ); 91 * lib_a__aive_dby_b_v6 ( ut8_t b_num , 92 ut32_t * liba_n_rus ); 93  lib_a_r_cfig ( lib_a * ib_a , 94 * g_me , * g_vue , 95 ut32_t * liba_n_rus ); 96 ut64_t 97 lib_a_pkt_wk_key ( lib_a * ib_a , 98  e_mbuf ** pkts , ut64_t pkts_mask , 99 ut64_t * pkts_dr_whout_ru , 100 * ib_a_ru_b_v4_aive , 101 * ib_a_ru_b_v6_aive , 102  pe_ai_key * ai_y_aive , 103  ai_cou_block (* p_ai_cou_b )[ ai_y_max ], 104 ut64_t * cck_mask , 105 ut64_t * cxi_mask , 106  lib_a_v4_abd ,  lib_a_v6_abd ); 107 ut64_t 108 lib_a_v4_pkt_wk_key ( lib_a * ib_a , 109  e_mbuf ** pkts , ut64_t pkts_mask , 110 ut64_t * pkts_dr_whout_ru , 111 * ib_a_ru_b_v4_aive , 112  pe_ai_key * ai_y_aive , 113  ai_cou_block (* p_ai_cou_b )[ ai_y_max ], 114 ut64_t * cck_mask , 115 ut64_t * cxi_mask ); 116 ut64_t 117 lib_a_v6_pkt_wk_key ( lib_a * ib_a , 118  e_mbuf ** pkts , ut64_t pkts_mask , 119 ut64_t * pkts_dr_whout_ru , 120 * ib_a_ru_b_v6_aive , 121  pe_ai_key * ai_y_aive , 122  ai_cou_block (* p_ai_cou_b )[ ai_y_max ], 123 ut64_t * cck_mask , 124 ut64_t * cxi_mask ); @VIL/alg/lib_ftp_alg.c 16  ~ 17  ~ 18  ~ 19  ~ 20  ~ 22  ~ 23  ~ 24  ~ 25  ~ 26  ~ 27  ~ 28  ~ 29  ~ 30  ~ 31  ~ 32  ~ 33  ~ 34  ~ 35  ~ 36  ~"pe_cgDZ_comm.h " 37  ~"pe_ais_comm.h " 38  ~"pe_cgDZ_be.h " 39  ~"hash_func.h " 40  ~"lib_p_g.h " 41  ~"vnf_comm.h " 42  ~"pe_comm_be.h " 43  ~"e__t.h " 44  ~"e_xn_ackg.h " 45  #ALG_DEBUG 1 ) 48 ut8_t 49 e___xn_hashkey ( 50 ut32_t * c_addr , 51 ut32_t * d_addr , 52 ut16_t c_pt , 53 ut16_t d_pt , 54 ut8_t o , 55 ut32_t * key , 56 ut8_t ty ); 59  e_mbuf * glib_g_pkt ; 60 um { mPRIVATE , mPUBLIC }; 61  e_hash_ms gp_g_hash_ms = { 62 . me = "FTP ALG", 63 . gs = 1024, 64 . grved = 0, 65 . gkey_n = ( p_g_key ), 66 . ghash_func = e_jhash , 67 . ghash_func__v = 0, 70  e_hash * gp_g_hash_hd ; 75  $lib_p_g_ () 77 `tf ("NAT FTP ALG initialization ...\n"); 81 p_g_hash_hd = `e_hash_ (& p_g_hash_ms ); 83 #ifde ALGDBG 84 i( p_g_hash_hd = NULL ) 85 `tf ("FTP ALGte_hash_create failed ...\n"); 87 `tf ("ftp_alg_hash_table %p\n\n", 88 (*) p_g_hash_hd ); 91 } } 99  p_g_b_y * $ve_p_g_y ( p_g_key g_key ) 101  p_g_b_y * t_g_da = NULL ; 102 g_key . fr1 = 0; 103 g_key . fr2 = 0; 105  t = `e_hash_lookup_da ( p_g_hash_hd , & g_key , 106 (**)& t_g_da ); 107 i( t < 0) { 108 #ifde ALGDBG 109 `tf ("alg-hashookup failedet %d, EINVAL %d, ENOENT %d\n", 110 t , EINVAL , ENOENT ); 113  t_g_da ; 116  NULL ; 117 } } 124  $move_p_g_y ( ut32_t addr , ut8_t ptid ) 129  p_g_key g_key ; 130 g_key . l4pt = `e_bsw16 ( ptid ); 131 g_key . _addss = `e_bsw32 ( addr ); 132 g_key . fr1 = 0; 133 g_key . fr2 = 0; 135 #ifde ALGDBG 136 `tf ("move_g_y i%x,܈%d\n", g_key . _addss , 137 g_key . l4pt ); 139  `e_hash_d_key ( p_g_hash_hd , & g_key ); 140 } } 147 $puϋ_p_g_y ( ut32_t addr , ut8_t ptid ) 151  p_g_key g_key ; 152 g_key . l4pt = `e_bsw16 ( ptid ); 154 g_key . _addss = `e_bsw32 ( addr ); 155 g_key . fr1 = 0; 156 g_key . fr2 = 0; 161 #ifde ALGDBG 162 `tf ("puϋ_p_g_y i%x,܈%d\n", g_key . _addss , 163 g_key . l4pt ); 166  p_g_b_y * w_g_da = 167 `ve_p_g_y ( g_key ); 168 i( w_g_da ) { 169 #ifde ALGDBG 170 `tf ("g_yxi%x,܈%d\n", g_key . _addss , 171 g_key . l4pt ); 176 w_g_da = ( p_g_b_y *) 177 `mloc (( w_g_da )); 179 w_g_da -> l4pt = `e_bsw16 ( ptid ); 180 w_g_da -> _addss = `e_bsw32 ( addr ); 181 `e_hash_add_key_da ( p_g_hash_hd , & g_key , w_g_da ); 183 #ifde ALGDBG 185 tf 187 ( g_key . _addss >> 24), 188 (( g_key . _addss & 0x00ff0000) >> 16), 189 (( g_key . _addss & 0x0000ff00) >> 8), 190 (( g_key . _addss & 0x000000ff)), ptid ); 192 `puts (""); 194 } } 202  $p_g_modify_yld ( 203  cgDZ_b_y * egss_y , 204 * pt_rg , 205 * pt_rg_ed ,  p_ssi_ty ) 207 ut32_t t_ ; 208 ut16_t t_pt ; 209 ut16_t tmp1 , tmp2 , tmp3 , tmp4 , tmp5 , tmp6 ; 210 ut16_t w_pt_rg_ngth ; 212 ut8_t * br_public_addss ; 214 t_ = egss_y -> da . pub_ ; 215 t_pt = egss_y -> da . pub_pt ; 216 tmp5 = ( ut16_t ( t_pt /0x100); 217 tmp6 = ( ut16_t ( t_pt % 0x100); 219 t_ = `e_bsw32 (transport_ip); 221 br_public_addss = ( ut8_t *& t_ ; 223 tmp4 = br_public_addss [3]; 224 tmp3 = br_public_addss [2]; 225 tmp2 = br_public_addss [1]; 226 tmp1 = br_public_addss [0]; 228 i( p_ssi_ty == 1) 229 `rtf ( pt_rg_ed , FTP_PASV_PARAMETER_STRING , 230 FTP_PASV_RETURN_CODE , tmp1 , tmp2 , tmp3 , tmp4 , 231 tmp5 , tmp6 ); 233 `rtf ( pt_rg_ed , FTP_PORT_PARAMETER_STRING , 234 tmp1 , tmp2 , tmp3 , tmp4 , tmp5 , tmp6 ); 235 #ifde ALGDBG 236 `tf ("FTP ALG: FTPew string: Len:%d %s\n", 237 ( ut16_t ` ( pt_rg_ed )-2, 238 pt_rg_ed ); 240 `tf ("FTPonranslated PASV string: Len:%d, %s\n", 241 ( ut16_t ) ` ( pt_rg )-2,ort_string); 242 `tf ("old strlen:%dew strlen:%d\n", 243 () ` ( pt_rg ), 244 () ` ( pt_rg_ed )); 247 ( w_pt_rg_ngth = 248 ( ut16_t ` ( pt_rg_ed )); 249 } } 256  le  $p_g_modify_pkt_n ( e_mbuf * pkt ) 258 ut16_t pkt_ngth = 0; 259  _hdr_size_bys = `e__g_IP_hdr_size ( pkt ); 260 * hdr = `RTE_MBUF_METADATA_UINT32_PTR ( pkt , IP_START ); 262 i( _hdr_size_bys = IPv4_HEADER_SIZE ) { 263  v4_hdr * ihdr4 = (v4_hd*) hdr ; 264 pkt_ngth = `e_bsw16 ( ihdr4 -> tٮ_ngth + ETH_HDR_SIZE ; 265 } i( _hdr_size_bys = IPv6_HEADER_SIZE ) { 266  v6_hdr * ihdr6 = (v6_hd*) hdr ; 267 pkt_ngth = `e_bsw16 ( ihdr6 -> yld_n ) + 268 IPv6_HEADER_SIZE + ETH_HDR_SIZE ; 271 ut16_t mbuf_pkt_ngth = `e_pktmbuf_pkt_n ( pkt ); 273 i( pkt_ngth = mbuf_pkt_ngth ) 276 i( pkt_ngth < mbuf_pkt_ngth ) { 277 `e_pktmbuf_im ( pkt , mbuf_pkt_ngth - pkt_ngth ); 282 `e_pktmbuf_nd ( pkt , pkt_ngth - mbuf_pkt_ngth ); 283 } } 292 ut16_t $p_g_g_IP_hdr_size ( e_mbuf * pkt ) 298 ut8_t hdr_chk = `RTE_MBUF_METADATA_UINT8 ( pkt , IP_START ); 299 hdr_chk = hdr_chk >> 4; 301 i( hdr_chk = IP_VERSION_4 ) 302  IPv4_HEADER_SIZE ; 303 i( hdr_chk = IP_VERSION_6 ) 304  IPv6_HEADER_SIZE ; 308 } } 316  $p_g_compu_checksums ( 317 * i_hdr , 318  t_hdr * t_hdr ) 328 t8_t hdr_chk = `e__vsi ( i_hdr ); 329 t_hdr -> cksum = 0; 331 i( hdr_chk = IP_VERSION_4 ) { 332  v4_hdr * i4_hdr = (v4_hd*) i_hdr ; 333 i4_hdr -> hdr_checksum = 0; 334 t_hdr -> cksum = 0; 335 t_hdr -> cksum = `e_v4_ud_cksum ( i4_hdr ,_hdr); 337 #ifde ALGDBG 338 `tf ("cksum %x\n", `e_bsw32 ( t_hdr -> cksum )); 341 i4_hdr -> hdr_checksum = `e_v4_cksum (i4_hdr); 342 } i( hdr_chk = IP_VERSION_6 ) { 343  v6_hdr * i6_hdr = (v6_hd*) i_hdr ; 344 t_hdr -> cksum = 0; 345 t_hdr -> cksum = `e_v6_ud_cksum ( i6_hdr ,_hdr); 347 } } 356  $p_g_adju_t_ack ( e_mbuf * pkt , t16_t ackSeqdiff ) 359 ut16_t _hdr_size_bys = IPv4_HEADER_SIZE ; 360  v4_hdr * hdr = (ipv4_hdr *) 361 `RTE_MBUF_METADATA_UINT32_PTR ( pkt , IP_START ); 362  t_hdr * thdr = (tcp_hdr *) 363 `RTE_MBUF_METADATA_UINT32_PTR ( pkt , 364 IP_START + _hdr_size_bys ); 369 ut32_t mp ; 370 mp = `e_bsw32 ( thdr -> cv_ack ); 372 i( ackSeqdiff < 0) 373 mp + `abs ( ackSeqdiff ); 375 mp - `abs ( ackSeqdiff ); 377 thdr -> cv_ack = `e_bsw32 ( mp ); 378 } } 386  $p_g_adju_t_q ( e_mbuf * pkt , t16_t ackSeqdiff ) 389 ut16_t _hdr_size_bys = IPv4_HEADER_SIZE ; 390  v4_hdr * hdr = (ipv4_hdr *) 391 `RTE_MBUF_METADATA_UINT32_PTR ( pkt , IP_START ); 392  t_hdr * thdr = (tcp_hdr *) 393 `RTE_MBUF_METADATA_UINT32_PTR ( pkt , 394 IP_START + _hdr_size_bys ); 395 ut32_t mp ; 397 mp = `e_bsw32 ( thdr -> _q ); 398 i( ackSeqdiff < 0) 399 mp - `abs ( ackSeqdiff ); 401 mp + `abs ( ackSeqdiff ); 403 thdr -> _q = `e_bsw32 ( mp ); 404 } } 414  $p_g_d_t_qu ( 415  e_mbuf * pkt , 416 * pt_rg , 417 t16_t exig_tSeqdiff , 418 ut16_t d_pt_rg_ngth , 419 ut16_t w_pt_rg_ngth ) 421 t16_t cut_qu_numb_d =0; 422 t16_t f_qu_numb_d ; 424 ut16_t _hdr_size_bys = IPv4_HEADER_SIZE ; 425  v4_hdr * hdr = (ipv4_hdr *) 426 `RTE_MBUF_METADATA_UINT32_PTR ( pkt , IP_START ); 427  t_hdr * thdr = (tcp_hdr *) 428 `RTE_MBUF_METADATA_UINT32_PTR ( pkt , 429 IP_START + _hdr_size_bys ); 434 cut_qu_numb_d = ( t16_t ( w_pt_rg_ngth - 435 d_pt_rg_ngth ); 436 hdr -> tٮ_ngth = `e_bsw16 (iphdr->total_length); 438 #ifde ALGDBG 439 `tf ("tٮ_ngth :%u\n", hdr -> tٮ_ngth ); 441 if( cut_qu_numb_d < 0) 442 hdr -> tٮ_ngth - `abs ( cut_qu_numb_d ); 444 hdr -> tٮ_ngth + cut_qu_numb_d ; 446 hdr -> tٮ_ngth = `e_bsw16 (iphdr->total_length); 447 i( exig_tSeqdiff !=0) 448 `p_g_adju_t_q ( pkt , exig_tSeqdiff ); 449 f_qu_numb_d cut_qu_numb_d + exig_tSeqdiff ; 450  f_qu_numb_d ; 451 } } 462  $p_g_dpi ( 463  pe_cgDZ * p_t , 464  pe_cgDZ_y_key * t_y_key , 465  e_mbuf * pkt , 466  e__xn_ack * cgt_xn_ack , 467 t32_t _posi , 468 ut8_t dei ) 476 * pt_cmd_rg ; 477 * pt_cmd_d_rg ; 478 * t_hd_d ; 479 * t_t ; 482 ut16_t ive_pt_numb ; 483 ut16_t public_pt_numb ; 484 ut16_t 1 , 2 , 3 , 4 , pt1 , pt2 ; 485 t16_t tSeqdiff ; 486 t16_t ackSeqdiff , ackAdju ; 487 ut32_t ive_addss ; 488 ut32_t public_addss ; 489 ut8_t * br_ive_addss ; 491  pt_rg [ FTP_MAXIMUM_PORT_STRING_LENGTH ]; 492  pt_rg_ed [ FTP_MAXIMUM_PORT_STRING_LENGTH ]; 493 t16_t w_pt_rg_ngth ; 494 t16_t d_pt_rg_ngth ; 495  dummy_vue ; 496  cgDZ_b_y * egss_y , * gss_y ; 497 ut32_t _key [10]; 498 ut8_t key_dei ; 500 ut16_t _hdr_size_bys = IPv4_HEADER_SIZE ; 502  v4_hdr * _hdr = `e_pktmbuf_mtod_offt ( pkt , 503  v4_hdr *, ( h_hdr )); 507  t_hdr * thdr = `e_pktmbuf_mtod_offt ( pkt , tcp_hdr *, 508 (( h_hdr )+( v4_hdr ))); 509 ut16_t c_pt = `e_bsw16 ( thdr ->src_port); 510 ut16_t d_pt = `e_bsw16 ( thdr ->dst_port); 511 ut8_t o = _hdr -> xt_o_id ; 512 ut32_t c_addr = `e_bsw32 ( _hdr ->src_addr); 513 ut32_t d_addr = `e_bsw32 ( _hdr ->dst_addr); 514 ut32_t tmp_t_ylod_size ; 517 - c_pt & d_pt checkg to be moved om cgt dpi 518 - F cڌ chl 519 f vidi of tSeqdiff to be checked 520 IF < > 0 521 `p_g_t_ack ( to be `ed ( this udes PORT 522 ڣ d PASV eڣ ack as wl ) 523 Ru 524 ELSE 525 the pt / sv mr checkign to be de 526 - F da chl 527 - eive ALG y 528 IF found 529 - move the ALG y 530 ev  n `found ( found s too ) 531 - t the byss ag h CT ssi b 535 #ifde ALGDBG 537 `tf ("p܈numb: %d, %d\n", c_pt , d_pt ); 538 `tf ("ftp TCP sequm diff: %d\n", 539 cgt_xn_ack -> hash_b_s [ 540 _posi ]. tSeqdiff ); 541 `tf ("tcp data offset: %d\n", 542 (( thdr -> da_off & 0xf0) >> 2)); 543 `tf ("osi idpi:%d\n", _posi ); 547 i( c_pt =21 || d_pt == 21) { 556 t_t = (*) thdr ; 559 pt_cmd_rg = (* )( t_t +(( thdr -> da_off & 0xf0) >> 2)); 560 t_hd_d = pt_cmd_rg ; 562 i( dei = PRIVATE ) { 564 #ifde ALGDBG 565 `tf ("In PRIVATE "); 568 cgt_xn_ack -> hash_b_s [ _posi ]. q_ 569 `e_bsw32 ( thdr -> _q ); 570 cgt_xn_ack -> hash_b_s [ _posi ]. ack_ 571 `e_bsw32 ( thdr -> cv_ack ); 572 #ifde ALGDBG 573 `tf ("-->Seq_cli:%u, Ack_cli:%u, Len:%4d\n", 574 `e_bsw32 ( thdr -> _q ), 575 `e_bsw32 ( thdr -> cv_ack ), 576 ( `e_bsw16 ( _hdr -> tٮ_ngth ) - 577 ((( thdr -> da_off & 0xf0) >> 4) * 4)) - 20); 581 #ifde ALGDBG 582 `tf ("In PUBLIC "); 584 cgt_xn_ack -> hash_b_s [ _posi ]. q_rv 585 `e_bsw32 ( thdr -> _q ); 586 cgt_xn_ack -> hash_b_s [ _posi ]. ack_rv 587 `e_bsw32 ( thdr -> cv_ack ); 588 #ifde ALGDBG 589 `tf ("<--Seq_cli:%4d, Ack_cli%4d, Len:%4d\n", 590 `e_bsw32 ( thdr -> _q ),_bsw32hdr-> cv_ack ), 591 ( _hdr -> tٮ_ngth - ((( thdr -> da_off & 0xf0) >> 2)) 596 i( `ssnf ( pt_cmd_rg , FTP_PASV_PARAMETER_STRING , & dummy_vue , 597 & 1 , & 2 , & 3 , & 4 , & pt1 , & pt2 ) == 598 FTP_PASV_PARAMETER_COUNT ){ 600 `rtf ( pt_rg , FTP_PASV_PARAMETER_STRING , FTP_PASV_RETURN_CODE , 601 1 , 2 , 3 , 4 , pt1 , pt2 ); 603  i = 0; 604  pt_cmd_rg [ i ] != '\r' &&ort_cmd_string[i+1] != '\n') 605 i ++; 607 i += 2; 609 d_pt_rg_ngth = i ; 611 ive_pt_numb = ( ut16_t ( pt1 * 0x100 + pt2 ); 612 br_ive_addss = ( ut8_t *& ive_addss ; 614 br_ive_addss [3] = ( ut8_t ( 4 & 0x00FF); 615 br_ive_addss [2] = ( ut8_t ( 3 & 0x00FF); 616 br_ive_addss [1] = ( ut8_t ( 2 & 0x00FF); 617 br_ive_addss [0] = ( ut8_t ( 1 & 0x00FF); 621 i( dei = PUBLIC ) { 628 `puϋ_p_g_y ( ive_addss , ive_pt_numb ); 634 cgt_xn_ack -> hash_b_s [ _posi ]. 635 rv_dei = SERVER_IN_PUBLIC ; 636 cgt_xn_ack -> hash_b_s [ _posi ]. 637 p_ssi_ty = 1; 638 } i( dei = PRIVATE ) { 641  pe_cgDZ_y_key da_chl_key ; 642 ive_addss = `e_bsw32 (private_address); 643 da_chl_key . = ive_addss ; 644 da_chl_key . pt = ive_pt_numb ; 646 da_chl_key . pid = pkt -> pt ; 653 #ifde FTP_ALG 654 i( `add_dymic_cgDZ_y_g (( pe *) p_t , 655 & da_chl_key , & egss_y , & gss_y ) == 0){ 657 #ifde ALGDBG 658 `tf ("Wrong FTP ALGacket\n"); 662 p_t -> DZDrݳdPktCou ++; 664 #ifde CGNAPT_DEBUGGING 665 p_t -> DZDrݳdPktCou4 ++; 671 tmp_t_ylod_size = `e_bsw16 ( _hdr -> tٮ_ngth ) - 672 (( thdr -> da_off & 0xf0>> 2- _hdr_size_bys ; 673 cgt_xn_ack -> hash_b_s [ _posi ]. 674 t_yld_size = tmp_t_ylod_size ; 677 `puϋ_p_g_y ( egss_y -> da . pub_ , 678 egss_y -> da . pub_pt ); 680 w_pt_rg_ngth = `p_g_modify_yld ( egss_y , 681 pt_rg , 682 pt_rg_ed , 1); 683 `y ( t_hd_d , pt_rg_ed , 684 ` ( pt_rg_ed )); 685 tSeqdiff = `p_g_d_t_qu pkt , pt_rg , 686 cgt_xn_ack -> hash_b_s 687 [ _posi ]. tSeqdiff , 688 d_pt_rg_ngth , 689 w_pt_rg_ngth ); 692 `p_g_modify_pkt_n ( pkt ); 699 cgt_xn_ack -> hash_b_s [ _posi ]. 700 g_byss_ag = NO_BYPASS ; 701 cgt_xn_ack -> hash_b_s [ _posi ]. 702 tSeqdiff =cpSeqdiff; 703 cgt_xn_ack -> hash_b_s [ _posi ]. 704 rv_dei = SERVER_IN_PRIVATE ; 705 cgt_xn_ack -> hash_b_s [ _posi ]. 706 p_ssi_ty = 1; 710 } i( `ssnf ( pt_cmd_rg , FTP_PORT_PARAMETER_STRING , 711 & 1 , & 2 , & 3 , & 4 , & pt1 , & pt2 ) == 712 FTP_PORT_PARAMETER_COUNT ){ 714  i = 0; 715  ut8_t pt_h ; 716  pt_cmd_rg [ i ] != '\r' && 717 pt_cmd_rg [ i +1] != '\n') 718 i ++; 720 i += 2; 722 d_pt_rg_ngth = i ; 724 #ifde ALGDBG 725 `tf " Exig Seq Dif%d", cgt_xn_ack -> 726 hash_b_s [ _posi ]. tSeqdiff ); 727 `tf ("FTP ALG: FTP PORT commandength: %d\n", 728 d_pt_rg_ngth ); 731 ive_pt_numb = ( ut16_t ( pt1 * 0x100 + pt2 ); 733 #ifde ALGDBG 734 `tf ("FTP ALG:rivateortumber before swap: %u\n", 735 ive_pt_numb ); 738 br_ive_addss = ( ut8_t *& ive_addss ; 739 br_ive_addss [3] = ( ut8_t ( 4 & 0x00FF); 740 br_ive_addss [2] = ( ut8_t ( 3 & 0x00FF); 741 br_ive_addss [1] = ( ut8_t ( 2 & 0x00FF); 742 br_ive_addss [0] = ( ut8_t ( 1 & 0x00FF); 744 `rtf ( pt_rg , FTP_PORT_PARAMETER_STRING , 1 , 2 , 745 3 , 4 , pt1 , pt2 ); 747 #ifde ALGDBG 748 `tf ("FTP ALG: FTP original PORT string: %d,%s\n", 749 ( ` ( pt_rg )-2,ort_string); 750 `tf ("vddr: %x\n", ive_addss ); 754 i( dei = PUBLIC ) { 760  pe_cgDZ_y_key da_chl_key ; 761 da_chl_key . = ive_addss ; 762 da_chl_key . pt = ive_pt_numb ; 763 da_chl_key . pid = 0xffff; 766 cgt_xn_ack -> hash_b_s [ _posi ]. 767 rv_dei = SERVER_IN_PRIVATE ; 768 cgt_xn_ack -> hash_b_s [ _posi ]. 769 p_ssi_ty = 0; 772 #ifde ALGDBG 773 `tf ("<--Seq_cli:%4d, Ack_cli%4d, Len:%4d\n", 774 `e_bsw32 ( thdr -> _q ), 775 `e_bsw32 ( thdr -> cv_ack ), 776 ( _hdr -> tٮ_ngth - 777 ((( thdr -> da_off & 0xf0) >> 2)) - 20)); 779 `puϋ_p_g_y ( ive_addss , ive_pt_numb ); 780 } i( dei = PRIVATE ) { 786  pe_cgDZ_y_key da_chl_key ; 787 ive_addss = `e_bsw32 (private_address); 788 da_chl_key . = ive_addss ; 789 da_chl_key . pt = ive_pt_numb ; 791 da_chl_key . pid = pkt -> pt ; 800 #ifde FTP_ALG 801 i( `add_dymic_cgDZ_y_g (( pe *) 802 p_t , & da_chl_key , & egss_y , 803 & gss_y ) == 0){ 805 #ifde ALGDBG 806 `tf ("Wrong FTP ALGacket\n"); 809 p_t -> DZDrݳdPktCou ++; 811 #ifde CGNAPT_DEBUGGING 812 p_t -> DZDrݳdPktCou4 ++; 818 tmp_t_ylod_size = `e_bsw16 ( _hdr -> tٮ_ngth ) - 819 (( thdr -> da_off & 0xf0) >> 2) - 820 _hdr_size_bys ; 821 cgt_xn_ack -> hash_b_s [ _posi ]. 822 t_yld_size = tmp_t_ylod_size ; 825 `puϋ_p_g_y ( egss_y -> da . pub_ , 826 egss_y -> da . pub_pt ); 828 w_pt_rg_ngth = `p_g_modify_yld ( egss_y , 829 pt_rg , 830 pt_rg_ed , 0); 831 `y ( t_hd_d , pt_rg_ed , 832 ` ( pt_rg_ed )); 833 tSeqdiff = `p_g_d_t_qu pkt , pt_rg , 834 cgt_xn_ack -> hash_b_s 835 [ _posi ]. tSeqdiff , 836 d_pt_rg_ngth , 837 w_pt_rg_ngth ); 839 `p_g_modify_pkt_n ( pkt ); 848 cgt_xn_ack -> hash_b_s [ _posi ]. 849 g_byss_ag = NO_BYPASS ; 850 cgt_xn_ack -> hash_b_s [ _posi ]. 851 tSeqdiff =cpSeqdiff; 852 cgt_xn_ack -> hash_b_s [ _posi ]. 853 rv_dei = SERVER_IN_PUBLIC ; 854 cgt_xn_ack -> hash_b_s [ _posi ]. 855 p_ssi_ty = 0; 857 #ifde ALGDBG 858 `tf ("<--Seq_cli:%4d, Ack_cli%4d, Len:%4d\n", 859 `e_bsw32 ( thdr -> _q ), 860 `e_bsw32 ( thdr -> cv_ack ), 861 ( _hdr -> tٮ_ngth - 862 ((( thdr -> da_off & 0xf0) >> 2)) - 20)); 869 i(( ackAdju = cgt_xn_ack -> hash_b_s [ 870 _posi ]. tSeqdiff ) != 0) { 871 i( dei = PRIVATE ) { 873 cgt_xn_ack -> hash_b_s 874 [ _posi ]. q_ != 875 cgt_xn_ack -> hash_b_s 876 [ _posi ]. ack_rv ) { 877  Seqhs ; 878 `p_g_adju_t_q pkt , ackAdju ); 879 tmp_t_ylod_size = `e_bsw16 ( 880 _hdr -> tٮ_ngth ) - 881 (( thdr -> da_off & 0xf0) >> 2) - 882 _hdr_size_bys ; 883 cgt_xn_ack -> hash_b_s 884 [ _posi ]. t_yld_size = tmp_t_ylod_size ; 885 #ifde ALGDBG 886 `tf ("<--Seq_cli:%4d, Ack_cli%4d, Len:%4d\n", 887 `e_bsw32 ( thdr -> _q ), 888 `e_bsw32 ( thdr -> cv_ack ), 889 ( _hdr -> tٮ_ngth -((( thdr -> da_off & 0xf0) >> 2))- 20)); 893 i( cgt_xn_ack -> hash_b_s 894 [ _posi ]. ack_rv != 895 ( cgt_xn_ack -> hash_b_s 896 [ _posi ]. q_ + 897 cgt_xn_ack -> hash_b_s 898 [ _posi ]. t_yld_size )) { 899  Ackhs ; 900 `p_g_adju_t_ack pkt , ackAdju ); 901 #ifde ALGDBG 902 `tf ("<--Seq_cli:%4d, Ack_cli%4d, Len:%4d\n", 903 `e_bsw32 ( thdr -> _q ), 904 `e_bsw32 ( thdr -> cv_ack ), 905 ( _hdr -> tٮ_ngth -((( thdr -> da_off & 0xf0) >> 2))- 20)); 914 #ifde ALGDBG 915 `tf ("In Data Channel \n"); 917 `move_p_g_y ( d_addr , d_pt ); 918 cgt_xn_ack -> hash_b_s [ _posi ]. g_byss_ag = BYPASS ; 920 } } @VIL/alg/lib_ftp_alg.h 16 #ide __INCLUDE_LIB_FTP_ALG_H__ 17  #__INCLUDE_LIB_FTP_ALG_H__ ) 18  ~"e_h.h " 19  ~"e__t.h " 21  #META_DATA_OFFSET 128 ) 22  #ETHERNET_START ( META_DATA_OFFSET + RTE_PKTMBUF_HEADROOM ) ) 23  #ETH_HDR_SIZE 14 ) 24  #IP_START ( ETHERNET_START + ETH_HDR_SIZE ) ) 25  #PROTOCOL_START ( IP_START + 9) ) 26  #TCP_START ( IP_START + IP_V4_HEADER_SIZE ) ) 27  #TCP_MIN_HDR_SIZE 20 ) 29  #RTE_TCP_PROTO_ID 6 ) 30  #RTE_SP_DEFAULT_TTL 64 ) 32  #RTE_SYNPROXY_MAX_SPOOFED_PKTS 64 ) 34  #RTE_TCP_SYN 0x02 ) 35  #RTE_TCP_ACK 0x10 ) 36  #RTE_TCP_SYN_ACK ( RTE_TCP_SYN | RTE_TCP_ACK ) ) 37  #IP_VERSION_4 4 ) 38  #IP_VERSION_6 6 ) 39  #IPv4_HEADER_SIZE 20 ) 40  #IPv6_HEADER_SIZE 40 ) 44 ep_g_byss { 45 mNO_BYPASS , 46 mBYPASS 49 ep_g_mode { 50 mFTP_ALG_PORT , 51 mFTP_ALG_PASV 53 ep_g_dei { 54 mSERVER_IN_PRIVATE , 55 mSERVER_IN_PUBLIC 57 ephy_pt { 58 mPRIVATE_PORT , 59 mPUBLIC_PORT 62  sp_g_key { 63 ut32_t m_addss ; 64 ut16_t ml4pt ; 65 ut8_t mfr1 ; 66 ut8_t mfr2 ; 68  sp_g_b_y { 69 ut32_t m_addss ; 70 ut16_t ml4pt ; 71 ut8_t mp_g_mode ; 72 ut8_t mp_g_dei ; 73 ut32_t mssi_id ; 74 ut8_t mg_byss_ag ; 75 ut8_t mdummy ; 76 ut8_t mdummy1 ; 78 } g__e_che_igd ; 80  #FTP_SERVER_PORT 21 ) 81  #FTP_PORT_STRING "PORT" ) 82  #FTP_PORT_PARAMETER_STRING "PORT %hu,%hu,%hu,%hu,%hu,%hu\r\n" ) 83  #FTP_PORT_PARAMETER_COUNT 6 ) 84  #FTP_PORT_RESPONSE_STRING "200 PORT commd sucssful.\r\n" ) 85  #FTP_PORT_STRING_END_MARKER '\n' ) 86  #FTP_MAXIMUM_PORT_STRING_LENGTH 60 ) 87  #FTP_PASV_STRING "PASV" ) 88  #FTP_PASV_PARAMETER_STRING "%d Eg PassivMod(%hu,%hu,%hu,%hu,%hu,%hu)\r\n" ) 89  #FTP_PASV_PARAMETER_COUNT 7 ) 90  #FTP_PASV_STRING_END_MARKER '\n' ) 91  #FTP_PASV_RETURN_CODE 227 ) 93  p_g_dpi ( 94  pe_cgDZ * p_t , 95  pe_cgDZ_y_key * t_y_key , 96  e_mbuf * pkt , 97  e__xn_ack * cgt_xn_ack , 98 t32_t _posi , 99 ut8_t dei ); 100  lib_p_g_ (); 101 t8_t e__vsi (* i_hdr ); @VIL/alg/lib_sip_alg.c 17  ~ 18  ~ 19  ~ 20  ~ 21  ~ 22  ~ 23  ~ 25  ~ 26  ~ 27  ~ 28  ~ 29  ~ 30  ~ 31  ~ 32  ~ 33  ~ 34  ~ 35  ~ 36  ~ 37  ~ 38  ~ 40  ~"pe_ais_comm.h " 41  ~"hash_func.h " 42  ~"lib_s_g.h " 43  ~"vnf_comm.h " 44  ~"pe_comm_be.h " 46  #SIP_ALG_SIP "SIP" ) 47  #SIP_ALG_200_OK "200 OK" ) 48  #SIP_ALG_INVITE "INVITE" ) 49  #SIP_ALG_BYE "BYE" ) 50  #SIP_ALG_TRYING "100 Tryg" ) 51  #SIP_ALG_RINGING "180 Rgg" ) 52  #SIP_ALG_ACK "ACK" ) 53  #SIP_ALG_CONTACT "Cڏ" ) 54  #SIP_ALG_CONTENT_LEN "Cڋ-Lgth" ) 55  #SIP_ALG_VIA "V" ) 56  #SIP_ALG_FROM "From" ) 57  #SIP_ALG_TO "To" ) 58  #SIP_ALG_CALLID "Cl-ID" ) 59  #SIP_ALG_RTP "RTP" ) 60  #SIP_ALG_RTCP "a=RTCP" ) 61  #SIP_ALG_CANCEL "CANCEL" ) 62  #SIP_ALG_CONTYPE "Cڋ-Ty" ) 63  #SIP_ALG_APPSDP "iti/sdp" ) 64  #SIP_ALG_CSEQ "CSeq" ) 65  #SIP_ALG_AUDIO "mudio" ) 66  #SIP_ALG_DOUBLE_CRLF "\r\n\r\n" ) 67  #SIP_ALG_CRLF "\r\n" ) 68  #SIP_ALG_AT "@" ) 69  #SIP_ALG_GREAT ">" ) 70  #SIP_ALG_OWNER "o=" ) 71  #SIP_ALG_IPV4 "IP4" ) 72  #SIP_ALG_CONN "c=" ) 73  #SIP_ALG_REMOTE_PARTY_ID "Reme-Pty-ID" ) 74  #SIP_ALG_SPACE " " ) 75  #SIP_ALG_SEMICOLON ";" ) 77  #SIP_DEFAULT_L4PORT 5060 ) 79  #SIP_ALG_INVITE_MSGTYPE 1 ) 80  #SIP_ALG_BYE_MSGTYPE 2 ) 81  #SIP_ALG_200_OK_INVITE_MSGTYPE 3 ) 82  #SIP_ALG_200_OK_BYE_MSGTYPE 4 ) 83  #SIP_ALG_TRYING_RINGING_MSGTYPE 5 ) 84  #SIP_ALG_ACK_MSGTYPE 6 ) 86  #MAX_NUM_SIP_ALG_ENTRIES 16384 ) 88  #SIP_ALG_VIA_FIELD_IPADDR 14 ) 89  #SIP_ALG_CTAC_FIELD_IPADDR 7 ) 91  #ADDRESS_PORT_STRING 1 ) 92  #PORT_STRING 2 ) 94  #MAX_ADDR_PORT_SIZE 30 ) 95  #MAX_ADDR_SIZE 20 ) 96  #MAX_PORT_SIZE 10 ) 97  #MAX_SIP_UDP_MSG_SIZE 2000 ) 99  #ALG_DEBUG 0 ) 101 um { mFALSE , mTRUE }; 103  e_mempo * glib_g_pktmbuf_tx_po ; 105  e_mbuf * glib_g_pkt ; 107  e_hash_ms gs_g_hash_ms = { 108 . me = NULL , 109 . gs = MAX_NUM_SIP_ALG_ENTRIES , 110 . grved = 0, 111 . gkey_n = ( s_g_key ), 112 . ghash_func = e_jhash , 113 . ghash_func__v = 0, 114 . gexa_ag = 1, 117  e_hash * gs_g_hash_b ; 119  s_g_b_y * gs_g_b [ MAX_NUM_SIP_ALG_ENTRIES ]; 121 * s_g_oss ( e_mbuf * pkt , 122 ut16_t pkt_dei , ut16_ _dei , 123 ut16_t msgTy , ut32_t modIp , 124 ut16_t modL4Pt , ut32_t pubIp , 125 ut16_t pubL4Pt , ut16_ modRPt , 126 ut16_t modRtPt , ut16_* diffModSL ); 127 * gSClIdS (* pMsg ); 128 * tSAlgModifyPayldAddrPt (* pSMsg , ** pSMsgEnd , 129 ut32_t dSL , ut32_* diffL , 130 ut32_t pub_ , ut16_t pub_pt , 131 ut32_t ty ); 132 * tSAlgAdjuMsg (* pSMsg , ** pSMsgEnd , 133 ut32_t wSL , ut32_ dSL ); 137  $lib_s_g_ () 139 * s = `e_zmloc ( NULL , 64, RTE_CACHE_LINE_SIZE );; 140  sockid = 0; 142 if(! s ){ 143 `tf ("NAT SIP ALG Init failed\n"); 146 `tf ( s , ` (s), "v4_s_g_hash_%d", sockid ); 147 `tf ("NAT SIP ALG initialization ...\n"); 150 s_g_hash_ms . sock_id = SOCKET_ID_ANY ; 151 s_g_hash_ms . me = s ; 152 s_g_hash_b = `e_hash_ (& s_g_hash_ms ); 154 i( s_g_hash_b = NULL ) { 155 `tf ("SIP ALGte_hash_create failed. socket %d ...\n", 156 s_g_hash_ms . sock_id ); 157 `e_ex (0, "SIP ALGte_hash_create failed"); 159 `tf ("s_g_hash_b %p\n\n", (*) s_g_hash_b ); 162 } } 164 * ( n ); 165 * $ ( n ) 167  n = n =0 ? 1 : `o ( `log10l ( `bs (n))) + 1; 169 i( n < 0) 170 n ++; 172 * buf = `oc ((), n + 1); 173 if( buf ! NULL ) 174 `tf ( buf , n + 1, "%ld", n ); 175  buf ; 176 } } 178  s_g_b_y * ve_s_g_y ( 179  s_g_key * g_key ); 181  s_g_b_y * $ve_s_g_y ( 182  s_g_key * g_key ) 184  s_g_b_y * s_g_da = NULL ; 186  t = `e_hash_lookup ( s_g_hash_b , g_key ); 188 i( t < 0) { 189 #ifde ALGDBG 190 `tf ("alg-hashookup failedet %d, " 192 t , EINVAL , ENOENT ); 195 s_g_da = s_g_b [ t ]; 196  s_g_da ; 199  NULL ; 200 } } 203  $move_s_g_y ( ut32_t addr , ut16_t ptid ) 205  s_g_key g_key ; 206 * s_g_y_da ; 207  t ; 209 g_key . l4pt = ptid ; 210 g_key . _addss = addr ; 211 g_key . fr1 = 0; 212 g_key . fr2 = 0; 214 i( ALG_DEBUG ) 215 `tf ("move_s_y i%x,܈%d\n", g_key . _addss , 216 g_key . l4pt ); 218 t = `e_hash_lookup ( s_g_hash_b , & g_key ); 219 i( t < 0) { 220 i( ALG_DEBUG ) 221 `tf ("removesipalgentry: " 223 t ); 227 s_g_y_da = s_g_b [ t ]; 229 ` ( s_g_y_da ); 230 `e_hash_d_key ( s_g_hash_b , & g_key ); 233 } } 239  puϋ_s_g_y ( ut32_t addr , ut16_t ptid , 240 * s__id , ut8_t _dei , 241 s_g_pt_ty pt_ty ); 242  $puϋ_s_g_y ( ut32_t addr , ut16_t ptid , 243 * s__id , ut8_t _dei , 244 s_g_pt_ty pt_ty ) 246  s_g_key g_key ; 248 g_key . l4pt = ptid ; 249 g_key . _addss = addr ; 250 g_key . fr1 = 0; 251 g_key . fr2 = 0; 252  t ; 254 i( ALG_DEBUG ) 255 `tf ("populate_sip_alg_entryort %d, ip %x\n", 256 g_key . l4pt ,lg_key. _addss ); 258  s_g_b_y * w_g_da = 259 `ve_s_g_y (& g_key ); 261 i( w_g_da ) { 262 i( ALG_DEBUG ) 263 `tf ("sip_alg_entryxists ip%x,ort %d\n", 264 g_key . _addss ,lg_key. l4pt ); 268 w_g_da = NULL ; 269 w_g_da = ( s_g_b_y *) 270 `mloc (( s_g_b_y )); 271 i( w_g_da = NULL ) { 272 `tf ("populate siplgntry:llocation failed\n"); 276 w_g_da -> l4pt = ptid ; 277 w_g_da -> _addss = addr ; 278 w_g_da -> l4pt_ty = pt_ty ; 279 w_g_da -> s_g__dei = _dei ; 280 `ry ((*) w_g_da -> s_g__id , (*) s__id ); 281 w_g_da -> fr1 = 0; 282 w_g_da -> fr2 = 0; 283 w_g_da -> fr3 = 0; 285 t = `e_hash_add_key ( s_g_hash_b , & g_key ); 286 i( t < 0) { 287 `tf ("puϋ s -_hash_add_key_dERROR %d\n", t ); 288 ` ( w_g_da ); 292 s_g_b [ t ] = w_g_da ; 294 i( ALG_DEBUG ) { 295 `tf ("SIP_ALG:able update - ip=%x onort=%det=%d\n", 296 g_key . _addss , ptid , t ); 299 } } 301  $s_g_dpi ( e_mbuf * pkt , pkt_d pkt_dei , 302 ut32_t modIp , ut16_t modL4Pt , 303 ut32_t pubIp , ut16_t pubL4Pt , 304 ut16_t modRPt , ut16_ modRtPt ) 306 ut16_t msgTy = 0; 307 s_g__dei _dei = 0; 308 ut32_t _addss = 0; 309 ut16_t pt = 0; 310  t = 0; 311  v4_hdr * _h ; 312  h_hdr * h_h = `e_pktmbuf_mtod ( pkt , ether_hdr *); 313  udp_hdr * udp_h ; 314 * pSMsg = NULL ; 315  s_g_b_y * s_g_y ; 316 * s__id = NULL ; 317  pos = 0; 318  s_g_key g_key ; 319 ut16_t diffModSL = 0; 321 _h = ( v4_hdr *)((*) h_h + ( h_hdr )); 322 udp_h = ( udp_hdr *)((*) _h + ( v4_hdr )); 323 pSMsg = ((*) udp_h + ( udp_hdr )); 325 i( ALG_DEBUG ) { 326 `tf ("%s:ackgth(%u), bufngth(%u)\n", __func__ , 327 `e_pktmbuf_pkt_n ( pkt ),kt-> buf_n ); 328 `tf ("%s:a segmaddr(%%p)\n", __func__ , 329 `e_pktmbuf_ϡg ( pkt ),kt); 330 `tf ("%s: dn(%u, %u)\n", __func__ , `e_pktmbuf_da_n ( pkt ), 331 `e_pktmbuf_da_n ( `e_pktmbuf_ϡg ( pkt ))); 332 `tf ("%s: bufaddr(%p), da_off(%u),b_gs(%u)\n", __func__ , 333 pkt -> buf_addr ,kt-> da_off ,kt-> nb_gs ); 336 i( `IS_STRING_SAME ( pSMsg , SIP_ALG_INVITE )) { 338 i( `tSAlgMsgFldPos ( pSMsg , SIP_ALG_CALLID , & pos , 0) == 339 TRUE ) 340 s__id = 341 `gSClIdS ( pSMsg + pos + 342 `TAG_TO_DATAPOS ( SIP_ALG_CALLID )); 344 i( ALG_DEBUG ) 345 `tf ("sgdpi: %d cid %s\n", __LINE__ , 346 s__id ); 348 i( pkt_dei = PRIVATE ) { 349 _dei = SIP_CALL_OUTGOING ; 350 _addss = `e_bsw32 ( _h -> c_addr ); 351 pt = `e_bsw16 ( udp_h -> c_pt ); 352 } i( pkt_dei = PUBLIC ) { 353 _dei = SIP_CALL_INCOMING ; 354 _addss = pubIp ; 355 pt = pubL4Pt ; 358 i( ALG_DEBUG ) 359 `tf ("0=>sip_alg_dpi:kt_dir(%d), call_dir(%d), " 361 pkt_dei , _dei , _addss , pt ); 364 t = `puϋ_s_g_y ( _addss , pt , 365 s__id , _dei , 366 SIP_UDP ); 367 i( t < 0) { 368 `tf ("sipalgdpi:populate SIPlg UDPntry failed\n"); 371 i( modRPt != 0) { 372 t = `puϋ_s_g_y ( _addss , modRPt , 373 s__id , 374 _dei , SIP_RTP ); 375 i( t < 0) { 376 `tf ("sipalgdpi: " 381 i( modRtPt != 0) { 382 t = `puϋ_s_g_y ( _addss , modRtPt , 383 s__id , 384 _dei , SIP_RTCP ); 385 i( t < 0) { 386 `tf ("sipalgdpi: " 393 pSMsg = 394 `s_g_oss ( pkt , pkt_dei , _dei , 395 SIP_ALG_INVITE_MSGTYPE , modIp , modL4Pt , 0, 396 0, modRPt , modRtPt , & diffModSL ); 403 i( pkt_dei = PRIVATE ) { 404 g_key . _addss = `e_bsw32 ( _h -> c_addr ); 405 g_key . l4pt = `e_bsw16 ( udp_h -> c_pt ); 407 g_key . _addss = pubIp ; 408 g_key . l4pt = pubL4Pt ; 411 g_key . fr1 = 0; 412 g_key . fr2 = 0; 413 s_g_y = `ve_s_g_y (& g_key ); 415 i( ALG_DEBUG ) { 416 `tf ("%s: s_g_y_r(%p)\n", __func__ , 417 s_g_y ); 418 `tf ("1=>%s:kt_dir(%d), modIp(%x),modL4Port(%x), " 420 __func__ , pkt_dei , modIp , modL4Pt , 421 modRPt , modRtPt , pubIp , pubL4Pt ); 424 i( s_g_y ) { 425 _dei = s_g_y -> s_g__dei ; 426 i( `IS_STRING_SAME ( pSMsg , SIP_ALG_BYE ) || 427 `IS_STRING_SAME ( pSMsg , SIP_ALG_CANCEL )) { 428 msgTy = SIP_ALG_BYE_MSGTYPE ; 430  sAlgPross ; 431 } i( `IS_STRING_SAME ( pSMsg , SIP_ALG_ACK )) { 432 msgTy = SIP_ALG_ACK_MSGTYPE ; 434  sAlgPross ; 437 pSMsg += 8; 439 i( `IS_STRING_SAME ( pSMsg , SIP_ALG_200_OK )) { 441 i( tSAlgMsgFldPos 442 ( pSMsg , SIP_ALG_CSEQ , & pos , 0= TRUE ) { 443 * pBye ; 445 pBye = 446 pSMsg + pos + 447 `TAG_TO_DATAPOS ( SIP_ALG_CSEQ ); 448 `SKIP_SPACES ( pBye ); 450 * pBye != ' ') 451 pBye ++; 452 `SKIP_SPACES ( pBye ); 453 i( `IS_STRING_SAME ( pBye , SIP_ALG_BYE ) 455 ( IS_STRING_SAME 456 ( pBye , SIP_ALG_CANCEL ))) 457 msgTy = 458 SIP_ALG_200_OK_BYE_MSGTYPE ; 461 msgTy = 462 SIP_ALG_200_OK_INVITE_MSGTYPE ; 464 } i( `IS_STRING_SAME ( pSMsg , SIP_ALG_TRYING ) || 465 `IS_STRING_SAME ( pSMsg , SIP_ALG_RINGING )) { 466 msgTy = SIP_ALG_TRYING_RINGING_MSGTYPE ; 469 sAlgPross : 470 i( ALG_DEBUG ) 471 `tf ("2=>%s:kt_dir(%d), call_dir(%d), " 474 __func__ , pkt_dei , _dei , 475 msgTy , modIp , modL4Pt , modRPt , 476 modRtPt ); 478 pSMsg = 479 `s_g_oss ( pkt , pkt_dei , _dei , 480 msgTy , modIp , modL4Pt , pubIp , 481 pubL4Pt , modRPt , modRtPt , 482 & diffModSL ); 484 pSMsg = NULL ; 487 i( ALG_DEBUG ) 488 `tf ("%s: BefܐIPٮgth(%u), udngth(%u)\n", __func__ , 489 `e_bsw16 ( _h -> tٮ_ngth ),_bsw16( udp_h -> dgm_n )); 494 ut16_t n = 0; 495 i( diffModSL > 0) { 496 n = `e_bsw16 ( udp_h -> dgm_n ); 497 n + diffModSL ; 498 udp_h -> dgm_n = `e_bsw16 ( n ); 500 n = `e_bsw16 ( _h -> tٮ_ngth ); 501 n + diffModSL ; 502 _h -> tٮ_ngth = `e_bsw16 ( n ); 504 i( `e_pktmbuf_nd ( pkt , diffModSL = NULL ) 505 `tf ("%s:ktmbuf_nduNULL", __func__ ); 509 i( ALG_DEBUG ) 510 `tf ("%s: After IPotalength(%u), udpength(%u), " 511 "diffModSL(%u)\n", __func__ , 512 `e_bsw16 ( _h -> tٮ_ngth ), 513 `e_bsw16 ( udp_h -> dgm_n ), 514 diffModSL ); 516 i( pSMsg ! NULL ) 520 } } 522 * $s_g_oss ( e_mbuf * pkt , ut16_t pkt_dei , 523 ut16_t _dei , ut16_ msgTy , ut32_t modIp , 524 ut16_t modL4Pt , ut32_t pubIp , ut16_ pubL4Pt , 525 ut16_t modRPt , ut16_ modRtPt , 526 ut16_t * diffModSL ) 528  v4_hdr * _h ; 529  h_hdr * h_h = `e_pktmbuf_mtod ( pkt , ether_hdr *); 530  udp_hdr * udp_h ; 531 * pSMsg , * pS , * pEndP ; 532  pos ; 534 ut32_t diffL , addrPtL ; 535  sdpMsgL = 0; 536  s_msg_n = 0; 538 _h = ( v4_hdr *)((*) h_h + ( h_hdr )); 539 udp_h = ( udp_hdr *)((*) _h + ( v4_hdr )); 540 pSMsg = ((*) udp_h + ( udp_hdr )); 541 * pTmpSMsg = pSMsg ; 542 * pSSMsg = pSMsg ; 544 s_msg_n = 545 `e_bsw16 ( _h -> tٮ_ngth - ( v4_hdr ) - 546 ( udp_hdr ); 548 i( `tSAlgMsgFldPos ( pTmpSMsg , SIP_ALG_CONTENT_LEN , & pos , 0) == 549 TRUE ) 550 pTmpSMsg +( pos + `TAG_TO_DATAPOS ( SIP_ALG_CONTENT_LEN )); 552 `tf ("sip_alg_process: Invalid Content Length\n"); 553  NULL ; 556 `SKIP_SPACES ( pTmpSMsg ); 557  sdpDaL = ` ( pTmpSMsg , & pS , 10); 559 `tSAlgMsgFldPosFdCf ( pTmpSMsg , SIP_ALG_DOUBLE_CRLF , & pos , 0); 560 pTmpSMsg +( pos + ` ( SIP_ALG_DOUBLE_CRLF )); 562 i( sdpDaL != 0) 563 i( tSAlgMsgFldPos 564 ( pTmpSMsg , SIP_ALG_REMOTE_PARTY_ID , & pos , 0= TRUE ) { 565 pTmpSMsg + pos + ` ( SIP_ALG_REMOTE_PARTY_ID ); 567 `tSAlgMsgFldPosFdCf ( pTmpSMsg , 568 SIP_ALG_DOUBLE_CRLF , & pos , 570 pTmpSMsg +( pos + ` ( SIP_ALG_DOUBLE_CRLF )); 573  sMsgL = ( pTmpSMsg - pSMsg ); 575 * pSMsgEnd = pSMsg + sMsgL + sdpDaL ; 577 i( ALG_DEBUG ) 578 `tf ("%s:SipMsg: %p,SipMsgEnd: %p, sipMsgLen: %d, " 580 __func__ , pSMsg , pSMsgEnd , sMsgL , sdpDaL , 581 s_msg_n ); 583 i( _dei = SIP_CALL_OUTGOING ) { 584 i(( msgTy = SIP_ALG_INVITE_MSGTYPE ) 585 || ( msgTy = SIP_ALG_ACK_MSGTYPE )) { 587 i( `tSAlgMsgFldPos ( pSMsg , SIP_ALG_VIA , & pos , 0) 588 = TRUE ) { 590 pSMsg += 591 ( pos + ` ( SIP_ALG_VIA ) + 592 SIP_ALG_VIA_FIELD_IPADDR ); 593 pTmpSMsg = pSMsg ; 595 `tSAlgMsgFldPos ( pTmpSMsg , 596 SIP_ALG_SEMICOLON , & pos , 598 pTmpSMsg + pos ; 599 addrPtL = pTmpSMsg - pSMsg ; 601 `tf ("sip_alg_process; No valid VIA field\n"); 602  NULL ; 605 pSMsg = 606 `tSAlgModifyPayldAddrPt ( pSMsg , & pSMsgEnd , 607 addrPtL , 608 & diffL , modIp , 609 modL4Pt , 610 ADDRESS_PORT_STRING ); 612 * diffModSL + diffL ; 616 i( `tSAlgMsgFldPos ( pSMsg , SIP_ALG_FROM , & pos , 0) 617 = TRUE ) { 618 pSMsg + pos ; 620 pTmpSMsg = pSMsg ; 622 `tSAlgMsgFldPos ( pTmpSMsg , SIP_ALG_GREAT , 623 & pos , 0); 624 pTmpSMsg + pos ; 625 diffL = pTmpSMsg - pSMsg ; 627 `tSAlgMsgFldPos ( pSMsg , SIP_ALG_AT , & pos , 629 pSMsg + pos + 1; 631 addrPtL = pTmpSMsg - pSMsg ; 633 tf 635  NULL ; 638 pSMsg = 639 `tSAlgModifyPayldAddrPt ( pSMsg , & pSMsgEnd , 640 addrPtL , 641 & diffL , modIp , 642 modL4Pt , 643 ADDRESS_PORT_STRING ); 645 * diffModSL + diffL ; 649 i( tSAlgMsgFldPos 650 ( pSMsg , SIP_ALG_CALLID , & pos , 0= TRUE ) { 651 pSMsg + pos ; 653 pTmpSMsg = pSMsg ; 655 `tSAlgMsgFldPosFdCf ( pTmpSMsg , 656 SIP_ALG_CRLF , & pos , 658 pTmpSMsg + pos ; 659 diffL = pTmpSMsg - pSMsg ; 661 `tSAlgMsgFldPos ( pSMsg , SIP_ALG_AT , & pos , 663 pSMsg + pos + 1; 664 addrPtL = pTmpSMsg - pSMsg ; 666 `tf ("sip_alg_process; " 668  NULL ; 672 pSMsg = 673 `tSAlgModifyPayldAddrPt ( pSMsg , & pSMsgEnd , 674 addrPtL , 675 & diffL , modIp , 0, 676 ADDRESS_PORT_STRING ); 678 * diffModSL + diffL ; 681 i( tSAlgMsgFldPos 682 ( pSMsg , SIP_ALG_CONTACT , & pos , 0= TRUE ) { 683 pSMsg + pos ; 685 pTmpSMsg = pSMsg ; 686 `tSAlgMsgFldPosFdCf ( pTmpSMsg , 687 SIP_ALG_CRLF , & pos , 689 pTmpSMsg + pos ; 691 `tSAlgMsgFldPos ( pSMsg , SIP_ALG_AT , & pos , 693 pSMsg + pos + 1; 694 addrPtL = pTmpSMsg - pSMsg ; 697 `tf ("sip_alg_process; " 699  NULL ; 702 pSMsg = 703 `tSAlgModifyPayldAddrPt ( pSMsg , & pSMsgEnd , 704 addrPtL , 705 & diffL , modIp , 706 modL4Pt , 707 ADDRESS_PORT_STRING ); 709 * diffModSL + diffL ; 711 i( msgTy = SIP_ALG_INVITE_MSGTYPE ) { 713 i( tSAlgMsgFldPos 714 ( pSMsg , SIP_ALG_CONTYPE , & pos , 715 0= TRUE ) { 716 pSMsg += 717 ( pos + 718 `TAG_TO_DATAPOS ( SIP_ALG_CONTYPE )); 719 `SKIP_SPACES ( pSMsg ); 721 i(! IS_STRING_SAME 722 ( pSMsg , SIP_ALG_APPSDP )) { 723 `tf ("sip_alg_process " 725  NULL ; 728 `tf ("sip_alg_process; " 730  NULL ; 734 `tSAlgMsgFldPos ( pSMsg , 735 SIP_ALG_CONTENT_LEN , & pos , 737 pSMsg += 738 ( pos + `TAG_TO_DATAPOS ( SIP_ALG_CONTENT_LEN )); 739 `SKIP_SPACES ( pSMsg ); 740 sdpMsgL = ` ( pSMsg , & pEndP , 10); 741 i(! sdpMsgL ) { 743 i( msgTy = SIP_ALG_ACK_MSGTYPE ) 744  sAlgProssEx ; 746 `tf ("sip_alg_process - " 748  NULL ; 752 i( tSAlgMsgFldPos 753 ( pSMsg , SIP_ALG_OWNER , & pos , 754 0= TRUE ) { 755 pSMsg + pos ; 757 pTmpSMsg = pSMsg ; 759 `tSAlgMsgFldPosFdCf ( pSMsg , 760 SIP_ALG_CRLF , 761 & pos , 763 pTmpSMsg + pos ; 766 `tSAlgMsgFldPos ( pSMsg , 767 SIP_ALG_IPV4 , & pos , 769 pSMsg +( pos + ` ( SIP_ALG_IPV4 )); 770 `SKIP_SPACES ( pSMsg ); 772 addrPtL = pTmpSMsg - pSMsg ; 774 `tf ("sip_alg_processing: " 776  NULL ; 779 pSMsg = 780 `tSAlgModifyPayldAddrPt ( pSMsg , 781 & pSMsgEnd , 782 addrPtL , 783 & diffL , 784 modIp , 0, 785 ADDRESS_PORT_STRING ); 787 * diffModSL + diffL ; 788 sdpMsgL + diffL ; 792 i( tSAlgMsgFldPos 793 ( pSMsg , SIP_ALG_CONN , & pos , 794 0= TRUE ) { 795 pSMsg + pos ; 796 pTmpSMsg = pSMsg ; 798 `tSAlgMsgFldPosFdCf ( pSMsg , 799 SIP_ALG_CRLF , 800 & pos , 802 pTmpSMsg + pos ; 805 `tSAlgMsgFldPos ( pSMsg , 806 SIP_ALG_IPV4 , & pos , 808 pSMsg +( pos + ` ( SIP_ALG_IPV4 )); 809 `SKIP_SPACES ( pSMsg ); 811 addrPtL = pTmpSMsg - pSMsg ; 813 `tf ("sip_alg_processing: " 815  NULL ; 818 pSMsg = 819 `tSAlgModifyPayldAddrPt ( pSMsg , 820 & pSMsgEnd , 821 addrPtL , 822 & diffL , 823 modIp , 0, 824 ADDRESS_PORT_STRING ); 826 * diffModSL + diffL ; 827 sdpMsgL + diffL ; 831 i( tSAlgMsgFldPos 832 ( pSMsg , SIP_ALG_AUDIO , & pos , 833 0= TRUE ) { 834 pSMsg += 835 ( pos + 836 `TAG_TO_DATAPOS ( SIP_ALG_AUDIO )); 837 `SKIP_SPACES ( pSMsg ); 838 pTmpSMsg = pSMsg ; 839 tSAlgMsgFldPosFdS 840 ( pTmpSMsg , SIP_ALG_SPACE , & pos , 842 pTmpSMsg + pos ; 843 addrPtL = pTmpSMsg - pSMsg ; 847 pSMsg = 848 `tSAlgModifyPayldAddrPt ( pSMsg , 849 & pSMsgEnd , 850 addrPtL , 851 & diffL , 0, 852 modRPt , 853 PORT_STRING ); 855 * diffModSL + diffL ; 856 sdpMsgL + diffL ; 860 i( tSAlgMsgFldPos 861 ( pSMsg , SIP_ALG_RTCP , & pos , 862 0= TRUE ) { 863 pSMsg += 864 ( pos + 865 `TAG_TO_DATAPOS ( SIP_ALG_RTCP )); 866 `SKIP_SPACES ( pSMsg ); 867 pTmpSMsg = pSMsg ; 868 tSAlgMsgFldPosFdS 869 ( pTmpSMsg , SIP_ALG_SPACE , & pos , 871 pTmpSMsg + pos ; 872 addrPtL = pTmpSMsg - pSMsg ; 875 pSMsg = 876 tSAlgModifyPayldAddrPt 877 ( pSMsg , & pSMsgEnd , addrPtL , 878 & diffL , 0, modRtPt , 879 PORT_STRING ); 881 * diffModSL + diffL ; 882 sdpMsgL + diffL ; 887 } i(( msgTy = SIP_ALG_TRYING_RINGING_MSGTYPE ) 888 || ( msgTy = SIP_ALG_200_OK_INVITE_MSGTYPE )) { 890 i( `tSAlgMsgFldPos ( pSMsg , SIP_ALG_VIA , & pos , 0) 891 = TRUE ) { 893 pSMsg += 894 ( pos + ` ( SIP_ALG_VIA ) + 895 SIP_ALG_VIA_FIELD_IPADDR ); 896 pTmpSMsg = pSMsg ; 898 `tSAlgMsgFldPos ( pTmpSMsg , 899 SIP_ALG_SEMICOLON , & pos , 901 pTmpSMsg + pos ; 902 addrPtL = pTmpSMsg - pSMsg ; 904 `tf ("sip_alg_process; No valid VIA field\n"); 905  NULL ; 908 pSMsg = 909 `tSAlgModifyPayldAddrPt ( pSMsg , & pSMsgEnd , 910 addrPtL , 911 & diffL , modIp , 912 modL4Pt , 913 ADDRESS_PORT_STRING ); 914 * diffModSL = diffL ; 917 i( `tSAlgMsgFldPos ( pSMsg , SIP_ALG_FROM , & pos , 0) 918 = TRUE ) { 919 pSMsg + pos ; 921 pTmpSMsg = pSMsg ; 923 `tSAlgMsgFldPos ( pTmpSMsg , SIP_ALG_GREAT , 924 & pos , 0); 925 pTmpSMsg + pos ; 928 `tSAlgMsgFldPos ( pSMsg , SIP_ALG_AT , & pos , 930 pSMsg + pos + 1; 932 addrPtL = pTmpSMsg - pSMsg ; 934 tf 936  NULL ; 939 pSMsg = 940 `tSAlgModifyPayldAddrPt ( pSMsg , & pSMsgEnd , 941 addrPtL , 942 & diffL , modIp , 943 modL4Pt , 944 ADDRESS_PORT_STRING ); 946 * diffModSL + diffL ; 950 i( tSAlgMsgFldPos 951 ( pSMsg , SIP_ALG_CALLID , & pos , 0= TRUE ) { 952 pSMsg + pos ; 954 pTmpSMsg = pSMsg ; 956 `tSAlgMsgFldPosFdCf ( pTmpSMsg , 957 SIP_ALG_CRLF , & pos , 959 pTmpSMsg + pos ; 962 `tSAlgMsgFldPos ( pSMsg , SIP_ALG_AT , & pos , 964 pSMsg + pos + 1; 965 addrPtL = pTmpSMsg - pSMsg ; 967 `tf ("sip_alg_process; " 969  NULL ; 973 pSMsg = 974 `tSAlgModifyPayldAddrPt ( pSMsg , & pSMsgEnd , 975 addrPtL , 976 & diffL , modIp , 0, 977 ADDRESS_PORT_STRING ); 979 * diffModSL + diffL ; 981 } i( pkt_dei = PRIVATE 982 && msgTy = SIP_ALG_BYE_MSGTYPE ) { 986 i( `tSAlgMsgFldPos ( pSMsg , SIP_ALG_VIA , & pos , 0) 987 = TRUE ) { 989 pSMsg += 990 ( pos + ` ( SIP_ALG_VIA ) + 991 SIP_ALG_VIA_FIELD_IPADDR ); 992 pTmpSMsg = pSMsg ; 994 `tSAlgMsgFldPos ( pTmpSMsg , 995 SIP_ALG_SEMICOLON , & pos , 997 pTmpSMsg + pos ; 998 addrPtL = pTmpSMsg - pSMsg ; 1000 `tf ("sip_alg_process; No valid VIA field\n"); 1001  NULL ; 1004 pSMsg = 1005 `tSAlgModifyPayldAddrPt ( pSMsg , & pSMsgEnd , 1006 addrPtL , 1007 & diffL , modIp , 0, 1008 ADDRESS_PORT_STRING ); 1009 * diffModSL = diffL ; 1012 i( `tSAlgMsgFldPos ( pSMsg , SIP_ALG_FROM , & pos , 0) 1013 = TRUE ) { 1014 pSMsg + pos ; 1016 pTmpSMsg = pSMsg ; 1018 `tSAlgMsgFldPos ( pTmpSMsg , SIP_ALG_GREAT , 1019 & pos , 0); 1020 pTmpSMsg + pos ; 1021 diffL = pTmpSMsg - pSMsg ; 1023 `tSAlgMsgFldPos ( pSMsg , SIP_ALG_AT , & pos , 1025 pSMsg + pos + 1; 1027 addrPtL = pTmpSMsg - pSMsg ; 1029 tf 1031  NULL ; 1034 pSMsg = 1035 `tSAlgModifyPayldAddrPt ( pSMsg , & pSMsgEnd , 1036 addrPtL , 1037 & diffL , modIp , 1038 modL4Pt , 1039 ADDRESS_PORT_STRING ); 1041 * diffModSL + diffL ; 1045 i( tSAlgMsgFldPos 1046 ( pSMsg , SIP_ALG_CALLID , & pos , 0= TRUE ) { 1047 pSMsg + pos ; 1049 pTmpSMsg = pSMsg ; 1051 `tSAlgMsgFldPosFdCf ( pTmpSMsg , 1052 SIP_ALG_CRLF , & pos , 1054 pTmpSMsg + pos ; 1055 diffL = pTmpSMsg - pSMsg ; 1057 `tSAlgMsgFldPos ( pSMsg , SIP_ALG_AT , & pos , 1059 pSMsg + pos + 1; 1060 addrPtL = pTmpSMsg - pSMsg ; 1062 `tf ("sip_alg_process; " 1064  NULL ; 1068 pSMsg = 1069 `tSAlgModifyPayldAddrPt ( pSMsg , & pSMsgEnd , 1070 addrPtL , 1071 & diffL , modIp , 0, 1072 ADDRESS_PORT_STRING ); 1074 * diffModSL + diffL ; 1077 i( tSAlgMsgFldPos 1078 ( pSMsg , SIP_ALG_CONTACT , & pos , 0= TRUE ) { 1079 pSMsg + pos ; 1081 pTmpSMsg = pSMsg ; 1082 `tSAlgMsgFldPosFdCf ( pTmpSMsg , 1083 SIP_ALG_CRLF , & pos , 0); 1084 pTmpSMsg + pos ; 1086  ag = 0; 1087 i( `tSAlgMsgFldPos ( pSMsg , SIP_ALG_AT , 1088 & pos , 0= FALSE ) 1089 ag = 1; 1091 i( ag ) 1092  SMsgAdv2 ; 1093 pSMsg + pos + 1; 1094 addrPtL = pTmpSMsg - pSMsg ; 1097 `tf ("sip_alg_process; " 1099  NULL ; 1102 pSMsg = 1103 `tSAlgModifyPayldAddrPt ( pSMsg , & pSMsgEnd , 1104 addrPtL , 1105 & diffL , modIp , 1106 modL4Pt , 1107 ADDRESS_PORT_STRING ); 1109 * diffModSL + diffL ; 1110 } i( pkt_dei = PUBLIC 1111 && msgTy = SIP_ALG_BYE_MSGTYPE ) { 1118 `tSAlgMsgFldPos ( pSMsg , SIP_ALG_AT , & pos , 0); 1119 pSMsg + pos + 1; 1120 pTmpSMsg = pSMsg ; 1121 `tSAlgMsgFldPosFdS ( pTmpSMsg , SIP_ALG_SPACE , 1122 & pos , 0); 1123 pTmpSMsg + pos ; 1124 addrPtL = pTmpSMsg - pSMsg ; 1126 pSMsg = 1127 `tSAlgModifyPayldAddrPt ( pSMsg , & pSMsgEnd , 1128 addrPtL , 1129 & diffL , modIp , 1130 modL4Pt , 1131 ADDRESS_PORT_STRING ); 1132 * diffModSL + diffL ; 1136 i( `tSAlgMsgFldPos ( pSMsg , SIP_ALG_TO , & pos , 0) 1137 = TRUE ) { 1138 pSMsg + pos ; 1139 pTmpSMsg = pSMsg ; 1140 `tSAlgMsgFldPos ( pTmpSMsg , SIP_ALG_GREAT , 1141 & pos , 0); 1142 pTmpSMsg + pos ; 1143 `tSAlgMsgFldPos ( pSMsg , SIP_ALG_AT , & pos , 1145 pSMsg + pos + 1; 1146 addrPtL = pTmpSMsg - pSMsg ; 1147 pSMsg = 1148 `tSAlgModifyPayldAddrPt ( pSMsg , 1149 & pSMsgEnd , 1150 addrPtL , 1151 & diffL , 1152 modIp , 1153 modL4Pt , 1154 ADDRESS_PORT_STRING ); 1155 * diffModSL + diffL ; 1160 i( tSAlgMsgFldPos 1161 ( pSMsg , SIP_ALG_CALLID , & pos , 0= TRUE ) { 1162 pSMsg + pos ; 1164 pTmpSMsg = pSMsg ; 1166 `tSAlgMsgFldPosFdCf ( pTmpSMsg , 1167 SIP_ALG_CRLF , & pos , 1169 pTmpSMsg + pos ; 1172 `tSAlgMsgFldPos ( pSMsg , SIP_ALG_AT , & pos , 1174 pSMsg + pos + 1; 1175 addrPtL = pTmpSMsg - pSMsg ; 1177 `tf ("sip_alg_process; " 1179  NULL ; 1183 pSMsg = 1184 `tSAlgModifyPayldAddrPt ( pSMsg , & pSMsgEnd , 1185 addrPtL , 1186 & diffL , modIp , 0, 1187 ADDRESS_PORT_STRING ); 1189 * diffModSL + diffL ; 1190 } i( pkt_dei = PRIVATE 1191 && ( msgTy = SIP_ALG_200_OK_BYE_MSGTYPE )) { 1197 i( `tSAlgMsgFldPos ( pSMsg , SIP_ALG_TO , & pos , 0) 1198 = TRUE ) { 1199 pSMsg + pos ; 1201 pTmpSMsg = pSMsg ; 1203 `tSAlgMsgFldPos ( pTmpSMsg , SIP_ALG_GREAT , 1204 & pos , 0); 1205 pTmpSMsg + pos ; 1206 diffL = pTmpSMsg - pSMsg ; 1208 `tSAlgMsgFldPos ( pSMsg , SIP_ALG_AT , & pos , 1210 pSMsg + pos + 1; 1212 addrPtL = pTmpSMsg - pSMsg ; 1214 tf 1216  NULL ; 1219 pSMsg = 1220 `tSAlgModifyPayldAddrPt ( pSMsg , & pSMsgEnd , 1221 addrPtL , 1222 & diffL , modIp , 1223 modL4Pt , 1224 ADDRESS_PORT_STRING ); 1226 * diffModSL = diffL ; 1230 i( tSAlgMsgFldPos 1231 ( pSMsg , SIP_ALG_CONTACT , & pos , 0= TRUE ) { 1232 pSMsg + pos ; 1234 pTmpSMsg = pSMsg ; 1235 `tSAlgMsgFldPosFdCf ( pTmpSMsg , 1236 SIP_ALG_CRLF , & pos , 1238 pTmpSMsg + pos ; 1240  ag = 0; 1241 i( `tSAlgMsgFldPos ( pSMsg , SIP_ALG_AT , 1242 & pos , 0= FALSE ) 1243 ag = 1; 1245 i( ag ) 1246  SMsgAdv2 ; 1247 pSMsg + pos + 1; 1248 addrPtL = pTmpSMsg - pSMsg ; 1250 `tf ("sip_alg_process; " 1252  NULL ; 1255 pSMsg = 1256 `tSAlgModifyPayldAddrPt ( pSMsg , & pSMsgEnd , 1257 addrPtL , 1258 & diffL , modIp , 1259 modL4Pt , 1260 ADDRESS_PORT_STRING ); 1262 * diffModSL + diffL ; 1263 } i( pkt_dei = PUBLIC 1264 && ( msgTy = SIP_ALG_200_OK_BYE_MSGTYPE )) { 1268 i( `tSAlgMsgFldPos ( pSMsg , SIP_ALG_VIA , & pos , 0) 1269 = TRUE ) { 1271 pSMsg += 1272 ( pos + ` ( SIP_ALG_VIA ) + 1273 SIP_ALG_VIA_FIELD_IPADDR ); 1274 pTmpSMsg = pSMsg ; 1276 `tSAlgMsgFldPos ( pTmpSMsg , 1277 SIP_ALG_SEMICOLON , & pos , 1279 pTmpSMsg + pos ; 1280 addrPtL = pTmpSMsg - pSMsg ; 1282 `tf ("sip_alg_process; No valid VIA field\n"); 1283  NULL ; 1286 pSMsg = 1287 `tSAlgModifyPayldAddrPt ( pSMsg , & pSMsgEnd , 1288 addrPtL , 1289 & diffL , modIp , 0, 1290 ADDRESS_PORT_STRING ); 1291 * diffModSL = diffL ; 1294 i( `tSAlgMsgFldPos ( pSMsg , SIP_ALG_FROM , & pos , 0) 1295 = TRUE ) { 1296 pSMsg + pos ; 1298 pTmpSMsg = pSMsg ; 1300 `tSAlgMsgFldPos ( pTmpSMsg , SIP_ALG_GREAT , 1301 & pos , 0); 1302 pTmpSMsg + pos ; 1303 diffL = pTmpSMsg - pSMsg ; 1305 `tSAlgMsgFldPos ( pSMsg , SIP_ALG_AT , & pos , 1307 pSMsg + pos + 1; 1309 addrPtL = pTmpSMsg - pSMsg ; 1311 tf 1313  NULL ; 1316 pSMsg = 1317 `tSAlgModifyPayldAddrPt ( pSMsg , & pSMsgEnd , 1318 addrPtL , 1319 & diffL , modIp , 1320 modL4Pt , 1321 ADDRESS_PORT_STRING ); 1323 * diffModSL + diffL ; 1326 i( tSAlgMsgFldPos 1327 ( pSMsg , SIP_ALG_CALLID , & pos , 0= TRUE ) { 1328 pSMsg + pos ; 1330 pTmpSMsg = pSMsg ; 1331 `tSAlgMsgFldPosFdCf ( pTmpSMsg , 1332 SIP_ALG_CRLF , & pos , 1334 pTmpSMsg + pos ; 1335 `tSAlgMsgFldPos ( pSMsg , SIP_ALG_AT , & pos , 1337 pSMsg + pos + 1; 1338 addrPtL = pTmpSMsg - pSMsg ; 1340 pSMsg = 1341 `tSAlgModifyPayldAddrPt ( pSMsg , 1342 & pSMsgEnd , 1343 addrPtL , 1344 & diffL , 1345 modIp , 0, 1346 ADDRESS_PORT_STRING ); 1348 * diffModSL + diffL ; 1351 `tf ("sip_alg_process; " 1353  NULL ; 1357 } i( _dei = SIP_CALL_INCOMING ) { 1358 i(( msgTy = SIP_ALG_INVITE_MSGTYPE ) 1359 || ( msgTy = SIP_ALG_ACK_MSGTYPE )) { 1362 i( `tSAlgMsgFldPos ( pSMsg , SIP_ALG_AT , & pos , 0) 1363 = TRUE ) { 1364 pSMsg + pos + 1; 1365 pTmpSMsg = pSMsg ; 1366 `tSAlgMsgFldPos ( pTmpSMsg , SIP_ALG_SIP , 1367 & pos , 0); 1368 pTmpSMsg +( pos - 1); 1370 addrPtL = pTmpSMsg - pSMsg ; 1372 tf 1374 __LINE__ ); 1375  NULL ; 1378 pSMsg = 1379 `tSAlgModifyPayldAddrPt ( pSMsg , & pSMsgEnd , 1380 addrPtL , 1381 & diffL , modIp , 1382 modL4Pt , 1383 ADDRESS_PORT_STRING ); 1384 * diffModSL + diffL ; 1388 i( `tSAlgMsgFldPos ( pSMsg , SIP_ALG_TO , & pos , 0) 1389 = TRUE ) { 1390 pSMsg + pos ; 1391 pTmpSMsg = pSMsg ; 1392 `tSAlgMsgFldPos ( pTmpSMsg , SIP_ALG_GREAT , 1393 & pos , 0); 1394 pTmpSMsg + pos ; 1395 `tSAlgMsgFldPos ( pSMsg , SIP_ALG_AT , & pos , 1397 pSMsg + pos + 1; 1398 addrPtL = pTmpSMsg - pSMsg ; 1400 `tf ("sip_alg_processing; " 1402 __LINE__ ); 1403  NULL ; 1406 pSMsg = 1407 `tSAlgModifyPayldAddrPt ( pSMsg , & pSMsgEnd , 1408 addrPtL , 1409 & diffL , modIp , 1410 modL4Pt , 1411 ADDRESS_PORT_STRING ); 1412 * diffModSL + diffL ; 1414 } i(( msgTy = SIP_ALG_TRYING_RINGING_MSGTYPE ) 1415 || ( msgTy = SIP_ALG_200_OK_INVITE_MSGTYPE )) { 1418 i( `tSAlgMsgFldPos ( pSMsg , SIP_ALG_TO , & pos , 0) 1419 = TRUE ) { 1420 pSMsg + pos ; 1421 pTmpSMsg = pSMsg ; 1422 `tSAlgMsgFldPos ( pTmpSMsg , SIP_ALG_GREAT , 1423 & pos , 0); 1424 pTmpSMsg + pos ; 1425 `tSAlgMsgFldPos ( pSMsg , SIP_ALG_AT , & pos , 1427 pSMsg + pos + 1; 1428 addrPtL = pTmpSMsg - pSMsg ; 1429 pSMsg = 1430 `tSAlgModifyPayldAddrPt ( pSMsg , 1431 & pSMsgEnd , 1432 addrPtL , 1433 & diffL , 1434 modIp , 1435 modL4Pt , 1436 ADDRESS_PORT_STRING ); 1437 * diffModSL + diffL ; 1440 i( msgTy = SIP_ALG_200_OK_INVITE_MSGTYPE ) { 1444 i( tSAlgMsgFldPos 1445 ( pSMsg , SIP_ALG_CONTACT , & pos , 1446 0= TRUE ) { 1447 pSMsg + pos ; 1449 pTmpSMsg = pSMsg ; 1450 `tSAlgMsgFldPos ( pTmpSMsg , 1451 SIP_ALG_SEMICOLON , 1452 & pos , 0); 1453 pTmpSMsg + pos ; 1455  ag = 0; 1456 i( `tSAlgMsgFldPos ( pSMsg , 1457 SIP_ALG_AT , & pos , 1458 30= FALSE ) 1459 ag = 1; 1461 i( ag ) 1462  SMsgAdv ; 1464 pSMsg + pos + 1; 1465 addrPtL = pTmpSMsg - pSMsg ; 1467 `tf ("sip_alg_process; " 1469  NULL ; 1472 pSMsg = 1473 `tSAlgModifyPayldAddrPt ( pSMsg , 1474 & pSMsgEnd , 1475 addrPtL , 1476 & diffL , 1477 modIp , 1478 modL4Pt , 1479 ADDRESS_PORT_STRING ); 1481 * diffModSL + diffL ; 1482 SMsgAdv : 1484 pTmpSMsg = pSMsg ; 1485 i( tSAlgMsgFldPos 1486 ( pSMsg , SIP_ALG_REMOTE_PARTY_ID , & pos , 1487 0= TRUE ) { 1488 pSMsg + pos + 1489 ` ( SIP_ALG_REMOTE_PARTY_ID ); 1490 pTmpSMsg = pSMsg ; 1491 `tSAlgMsgFldPos ( pTmpSMsg , 1492 SIP_ALG_GREAT , 1493 & pos , 0); 1494 pTmpSMsg + pos ; 1495 `tSAlgMsgFldPos ( pSMsg , 1496 SIP_ALG_AT , & pos , 1498 pSMsg + pos + 1; 1499 addrPtL = pTmpSMsg - pSMsg ; 1501 pSMsg = 1502 tSAlgModifyPayldAddrPt 1503 ( pSMsg , & pSMsgEnd , addrPtL , 1504 & diffL , modIp , modL4Pt , 1505 ADDRESS_PORT_STRING ); 1506 diffModSL + diffL ; 1508 `tf ("sip_alg_process: " 1510 pSMsg = pTmpSMsg ; 1514 i( tSAlgMsgFldPos 1515 ( pSMsg , SIP_ALG_OWNER , & pos , 1516 0= TRUE ) { 1517 pSMsg + pos ; 1519 pTmpSMsg = pSMsg ; 1521 `tSAlgMsgFldPosFdCf ( pSMsg , 1522 SIP_ALG_CRLF , 1523 & pos , 1525 pTmpSMsg + pos ; 1528 `tSAlgMsgFldPos ( pSMsg , 1529 SIP_ALG_IPV4 , & pos , 1531 pSMsg +( pos + ` ( SIP_ALG_IPV4 )); 1532 `SKIP_SPACES ( pSMsg ); 1534 addrPtL = pTmpSMsg - pSMsg ; 1536 `tf ("sip_alg_processing: " 1538  NULL ; 1541 pSMsg = 1542 `tSAlgModifyPayldAddrPt ( pSMsg , 1543 & pSMsgEnd , 1544 addrPtL , 1545 & diffL , 1546 modIp , 0, 1547 ADDRESS_PORT_STRING ); 1549 * diffModSL + diffL ; 1550 sdpMsgL + diffL ; 1554 i( tSAlgMsgFldPos 1555 ( pSMsg , SIP_ALG_CONN , & pos , 1556 0= TRUE ) { 1557 pSMsg + pos ; 1558 pTmpSMsg = pSMsg ; 1560 `tSAlgMsgFldPosFdCf ( pSMsg , 1561 SIP_ALG_CRLF , 1562 & pos , 1564 pTmpSMsg + pos ; 1567 `tSAlgMsgFldPos ( pSMsg , 1568 SIP_ALG_IPV4 , & pos , 1570 pSMsg +( pos + ` ( SIP_ALG_IPV4 )); 1571 `SKIP_SPACES ( pSMsg ); 1573 addrPtL = pTmpSMsg - pSMsg ; 1575 `tf ("sip_alg_processing: " 1577  NULL ; 1580 pSMsg = 1581 `tSAlgModifyPayldAddrPt ( pSMsg , 1582 & pSMsgEnd , 1583 addrPtL , 1584 & diffL , 1585 modIp , 0, 1586 ADDRESS_PORT_STRING ); 1588 * diffModSL + diffL ; 1589 sdpMsgL + diffL ; 1593 i( tSAlgMsgFldPos 1594 ( pSMsg , SIP_ALG_AUDIO , & pos , 1595 0= TRUE ) { 1596 pSMsg += 1597 ( pos + ` ( SIP_ALG_AUDIO )); 1598 `SKIP_SPACES ( pSMsg ); 1599 pTmpSMsg = pSMsg ; 1600 tSAlgMsgFldPosFdS 1601 ( pTmpSMsg , SIP_ALG_SPACE , & pos , 1603 pTmpSMsg + pos ; 1604 addrPtL = pTmpSMsg - pSMsg ; 1608 pSMsg = 1609 `tSAlgModifyPayldAddrPt ( pSMsg , 1610 & pSMsgEnd , 1611 addrPtL , 1612 & diffL , 0, 1613 modRPt , 1614 PORT_STRING ); 1616 * diffModSL + diffL ; 1617 sdpMsgL + diffL ; 1620 } i( pkt_dei = PUBLIC 1621 && msgTy = SIP_ALG_BYE_MSGTYPE ) { 1625 `tSAlgMsgFldPos ( pSMsg , SIP_ALG_AT , & pos , 0); 1626 pSMsg + pos + 1; 1627 pTmpSMsg = pSMsg ; 1628 `tSAlgMsgFldPosFdS ( pTmpSMsg , SIP_ALG_SPACE , 1629 & pos , 0); 1630 pTmpSMsg + pos ; 1631 addrPtL = pTmpSMsg - pSMsg ; 1633 pSMsg = 1634 `tSAlgModifyPayldAddrPt ( pSMsg , & pSMsgEnd , 1635 addrPtL , 1636 & diffL , modIp , 1637 modL4Pt , 1638 ADDRESS_PORT_STRING ); 1639 * diffModSL + diffL ; 1643 i( `tSAlgMsgFldPos ( pSMsg , SIP_ALG_TO , & pos , 0) 1644 = TRUE ) { 1645 pSMsg + pos ; 1646 pTmpSMsg = pSMsg ; 1647 `tSAlgMsgFldPos ( pTmpSMsg , SIP_ALG_GREAT , 1648 & pos , 0); 1649 pTmpSMsg + pos ; 1650 `tSAlgMsgFldPos ( pSMsg , SIP_ALG_AT , & pos , 1652 pSMsg + pos + 1; 1653 addrPtL = pTmpSMsg - pSMsg ; 1654 pSMsg = 1655 `tSAlgModifyPayldAddrPt ( pSMsg , 1656 & pSMsgEnd , 1657 addrPtL , 1658 & diffL , 1659 modIp , 1660 modL4Pt , 1661 ADDRESS_PORT_STRING ); 1662 * diffModSL + diffL ; 1665 tf 1667  NULL ; 1669 } i( pkt_dei = PRIVATE 1670 && msgTy = SIP_ALG_BYE_MSGTYPE ) { 1674 i( `tSAlgMsgFldPos ( pSMsg , SIP_ALG_VIA , & pos , 0) 1675 = TRUE ) { 1677 pSMsg += 1678 ( pos + ` ( SIP_ALG_VIA ) + 1679 SIP_ALG_VIA_FIELD_IPADDR ); 1680 pTmpSMsg = pSMsg ; 1682 `tSAlgMsgFldPos ( pTmpSMsg , 1683 SIP_ALG_SEMICOLON , & pos , 1685 pTmpSMsg + pos ; 1686 addrPtL = pTmpSMsg - pSMsg ; 1688 `tf ("sip_alg_process; No valid VIA field\n"); 1689  NULL ; 1692 pSMsg = 1693 `tSAlgModifyPayldAddrPt ( pSMsg , & pSMsgEnd , 1694 addrPtL , 1695 & diffL , modIp , 0, 1696 ADDRESS_PORT_STRING ); 1697 * diffModSL = diffL ; 1700 i( `tSAlgMsgFldPos ( pSMsg , SIP_ALG_FROM , & pos , 0) 1701 = TRUE ) { 1702 pSMsg + pos ; 1704 pTmpSMsg = pSMsg ; 1706 `tSAlgMsgFldPos ( pTmpSMsg , SIP_ALG_GREAT , 1707 & pos , 0); 1708 pTmpSMsg + pos ; 1709 diffL = pTmpSMsg - pSMsg ; 1711 `tSAlgMsgFldPos ( pSMsg , SIP_ALG_AT , & pos , 1713 pSMsg + pos + 1; 1715 addrPtL = pTmpSMsg - pSMsg ; 1717 tf 1719  NULL ; 1722 pSMsg = 1723 `tSAlgModifyPayldAddrPt ( pSMsg , & pSMsgEnd , 1724 addrPtL , 1725 & diffL , modIp , 1726 modL4Pt , 1727 ADDRESS_PORT_STRING ); 1729 * diffModSL + diffL ; 1731 } i( pkt_dei = PRIVATE 1732 && msgTy = SIP_ALG_200_OK_BYE_MSGTYPE ) { 1736 i( `tSAlgMsgFldPos ( pSMsg , SIP_ALG_VIA , & pos , 0) 1737 = TRUE ) { 1739 pSMsg += 1740 ( pos + ` ( SIP_ALG_VIA ) + 1741 SIP_ALG_VIA_FIELD_IPADDR ); 1742 pTmpSMsg = pSMsg ; 1744 `tSAlgMsgFldPos ( pTmpSMsg , 1745 SIP_ALG_SEMICOLON , & pos , 1747 pTmpSMsg + pos ; 1748 addrPtL = pTmpSMsg - pSMsg ; 1750 `tf ("sip_alg_process; No valid VIA field\n"); 1751  NULL ; 1754 pSMsg = 1755 `tSAlgModifyPayldAddrPt ( pSMsg , & pSMsgEnd , 1756 addrPtL , 1757 & diffL , modIp , 0, 1758 ADDRESS_PORT_STRING ); 1759 * diffModSL = diffL ; 1762 i( `tSAlgMsgFldPos ( pSMsg , 1763 SIP_ALG_FROM , & pos , 0= TRUE ) { 1764 pSMsg + pos ; 1766 pTmpSMsg = pSMsg ; 1768 `tSAlgMsgFldPos ( pTmpSMsg , SIP_ALG_GREAT , 1769 & pos , 0); 1770 pTmpSMsg + pos ; 1771 diffL = pTmpSMsg - pSMsg ; 1773 `tSAlgMsgFldPos ( pSMsg , SIP_ALG_AT , & pos , 1775 pSMsg + pos + 1; 1777 addrPtL = pTmpSMsg - pSMsg ; 1779 tf 1781  NULL ; 1784 pSMsg = 1785 `tSAlgModifyPayldAddrPt ( pSMsg , & pSMsgEnd , 1786 addrPtL , 1787 & diffL , modIp , 1788 modL4Pt , 1789 ADDRESS_PORT_STRING ); 1791 * diffModSL + diffL ; 1793 } i( pkt_dei = PUBLIC 1794 && msgTy = SIP_ALG_200_OK_BYE_MSGTYPE ) { 1796 i( `tSAlgMsgFldPos ( pSMsg , SIP_ALG_TO , & pos , 0) 1797 = TRUE ) { 1798 pSMsg + pos ; 1800 pTmpSMsg = pSMsg ; 1802 `tSAlgMsgFldPos ( pTmpSMsg , SIP_ALG_GREAT , 1803 & pos , 0); 1804 pTmpSMsg + pos ; 1805 diffL = pTmpSMsg - pSMsg ; 1807 `tSAlgMsgFldPos ( pSMsg , SIP_ALG_AT , & pos , 1809 pSMsg + pos + 1; 1811 addrPtL = pTmpSMsg - pSMsg ; 1813 tf 1815  NULL ; 1818 pSMsg = `tSAlgModifyPayldAddrPt (pSipMsg, 1819 & pSMsgEnd , 1820 addrPtL , 1821 & diffL , modIp , 1822 modL4Pt , 1823 ADDRESS_PORT_STRING ); 1825 * diffModSL = diffL ; 1829 i( tSAlgMsgFldPos 1830 ( pSMsg , SIP_ALG_CONTACT , & pos , 0= TRUE ) { 1831 pSMsg + pos ; 1833 pTmpSMsg = pSMsg ; 1834 `tSAlgMsgFldPosFdCf ( pTmpSMsg , 1835 SIP_ALG_CRLF , & pos , 1837 pTmpSMsg + pos ; 1839 `tSAlgMsgFldPos ( pSMsg , SIP_ALG_AT , & pos , 1841 pSMsg + pos + 1; 1842 addrPtL = pTmpSMsg - pSMsg ; 1844 `tf ("sip_alg_process; " 1846  NULL ; 1849 pSMsg = 1850 `tSAlgModifyPayldAddrPt ( pSMsg , & pSMsgEnd , 1851 addrPtL , 1852 & diffL , modIp , 1853 modL4Pt , 1854 ADDRESS_PORT_STRING ); 1856 * diffModSL + diffL ; 1860 SMsgAdv2 : 1862 i( _dei = SIP_CALL_OUTGOING ) { 1864 i( pkt_dei = PRIVATE ) { 1865 i( msgTy = SIP_ALG_200_OK_BYE_MSGTYPE ) { 1866 i( move_s_g_y 1867 ( `e_bsw32 ( _h -> c_addr ), 1868 `e_bsw16 ( udp_h -> c_pt )) < 0) 1869 `tf ("removesipalgentry failed: " 1871 _h -> c_addr , udp_h -> c_pt ); 1875 i( pkt_dei = PUBLIC ) { 1876 i( msgTy = SIP_ALG_200_OK_BYE_MSGTYPE ) { 1877 i( `move_s_g_y ( pubIp , pubL4Pt ) < 0) 1878 `tf ("removesipalgentry failed: " 1880 pubIp , pubL4Pt ); 1886 i(( sdpMsgL > 0&& ( sdpDaL > 0)) { 1887 pSMsg = pSSMsg ; 1888 * tmpSdpL = NULL ; 1890 sdpMsgL + sdpDaL ; 1891 tmpSdpL = ` ( sdpMsgL ); 1892  tmpSL = ` ( tmpSdpL ); 1895 i( `tSAlgMsgFldPos ( pSMsg , SIP_ALG_CONTENT_LEN , & pos , 0) 1896 = TRUE ) { 1897 pSMsg +( pos + `TAG_TO_DATAPOS ( SIP_ALG_CONTENT_LEN )); 1898 `SKIP_SPACES ( pSMsg ); 1899 pTmpSMsg = pSMsg ; 1900 `tSAlgMsgFldPosFdCf ( pTmpSMsg , 1901 SIP_ALG_DOUBLE_CRLF , & pos , 1903 pTmpSMsg + pos ; 1904 `SKIP_SPACES ( pSMsg ); 1905 diffL = pTmpSMsg - pSMsg ; 1906 `tSAlgAdjuMsg ( pSMsg , & pSMsgEnd , tmpSL , 1907 diffL ); 1908 `y ( pSMsg , tmpSdpL , tmpSL ); 1910 `tf ("sip_alg_process: Invalid Content Length\n"); 1911  NULL ; 1915 sAlgProssEx : 1917  pSSMsg ; 1918 } } 1924  $tSAlgGAudioPts ( e_mbuf * pkt , ut16_t * pPt , 1925 ut16_t * Pt ) 1927  v4_hdr * _h ; 1928  h_hdr * h_h = `e_pktmbuf_mtod ( pkt , ether_hdr *); 1929  udp_hdr * udp_h ; 1930 * pSMsg , * pEndP ; 1931  pos , sdpMsgL ; 1933 _h = ( v4_hdr *)((*) h_h + ( h_hdr )); 1934 udp_h = ( udp_hdr *)((*) _h + ( v4_hdr )); 1935 pSMsg = ((*) udp_h + ( udp_hdr )); 1938 i( `tSAlgMsgFldPos ( pSMsg , SIP_ALG_CONTYPE , & pos , 0= FALSE ) 1941 pSMsg +( pos + `TAG_TO_DATAPOS ( SIP_ALG_CONTYPE )); 1942 `SKIP_SPACES ( pSMsg ); 1945 i(! `IS_STRING_SAME ( pSMsg , SIP_ALG_APPSDP )) { 1946 `tf ("sip_alg_getAudioPort Invalid Contentype\n"); 1951 `tSAlgMsgFldPos ( pSMsg , SIP_ALG_CONTENT_LEN , & pos , 0); 1952 pSMsg +( pos + `TAG_TO_DATAPOS ( SIP_ALG_CONTENT_LEN )); 1953 `SKIP_SPACES ( pSMsg ); 1954 sdpMsgL = ` ( pSMsg , & pEndP , 10); 1955 i(! sdpMsgL ) { 1956 `tf ("sipAlggetAudioport - sdpMsgLen is 0\n"); 1961 i( `tSAlgMsgFldPos ( pSMsg , SIP_ALG_AUDIO , & pos , 0) == 1962 TRUE ) { 1963 pSMsg +( pos + `TAG_TO_DATAPOS ( SIP_ALG_AUDIO )); 1964 `SKIP_SPACES ( pSMsg ); 1965 * pPt = ` ( pSMsg , & pEndP , 10); 1967 * pPt = 0; 1970 i( `tSAlgMsgFldPos ( pSMsg , SIP_ALG_RTCP , & pos , 0) == 1971 TRUE ) { 1972 pSMsg +( pos + `TAG_TO_DATAPOS ( SIP_ALG_RTCP )); 1973 `SKIP_SPACES ( pSMsg ); 1974 * Pt = ` ( pSMsg , & pEndP , 10); 1976 * Pt = 0; 1978 i( ALG_DEBUG ) 1979 `tf (" sipAlgGetAudioPort;tpPort %d,tcpPort %d\n", 1980 * pPt , * Pt ); 1982 } } 1986 $tSAlgMsgFldPosFdS (* pDa , cڡ * pIdS , * pPos , 1987  chL ) 1989 * pS = pDa ; 1990  i = 0; 1992 i(! pIdS ) 1993  FALSE ; 1995 i(! chL ) 1996 chL = 1500; 1998  TRUE ) { 1999 * pDa != ' ') { 2000 pDa ++; 2001 i ++; 2004 i( i > chL ) { 2005 `tf ("SIP ALG Find Field Pos: " 2007 chL ); 2008 * pPos = chL ; 2009  FALSE ; 2012 i( `bcmp ( pDa , pIdS , ` (pIdStr)) == 0) 2016 * pPos = pDa - pS ; 2017  TRUE ; 2018 } } 2021  $tSAlgMsgFldPosFdCf ( 2022 * pDa , 2023 cڡ * pIdS , 2024 * pPos , 2025  chL ) 2027 * pS = pDa ; 2028  i = 0; 2030 i(! pIdS ) 2031  FALSE ; 2033 i(! chL ) 2034 chL = 1500; 2036  TRUE ) { 2037 * pDa != '\r' && *(pData + 1) != '\n') { 2038 pDa ++; 2039 i ++; 2041 i( i > chL ) { 2042 `tf ("SIP ALG Find Field Pos: " 2044 chL ); 2045 * pPos = chL ; 2046  FALSE ; 2049 i( `bcmp ( pDa , pIdS , ` (pIdStr)) == 0) 2053 * pPos = pDa - pS ; 2054  TRUE ; 2055 } } 2058  $tSAlgMsgFldPos (* pDa , 2059 cڡ * pIdS , 2060 * pPos , 2061  chL ) 2063 * pS = pDa ; 2064  i = 0, j = 0; 2066 i(! pIdS ) 2067  FALSE ; 2069 i(! chL ) 2070 chL = 1500; 2072  TRUE ) { 2073 * pDa != '\r' && *(pData + 1) != '\n') { 2076 * pDa == ' ') { 2077 pDa ++; 2078 j ++; 2081 i(* pDa == '\r' && *(pData + 1) == '\n') 2084 i( `bcmp ( pDa , pIdS , ` (pIdStr)) == 0) { 2085 * pPos = pDa - pS ; 2086  TRUE ; 2089 pDa ++; 2090 j ++; 2092 i( j > chL ) { 2093 * pPos = pDa - pS ; 2094  FALSE ; 2101  i = 0; i < ( chL - 1); i++) { 2102 i( pDa [ i ] == '\r') 2103 i( pDa [ i + 1] == '\n') 2107 i( i > chL ) { 2108 `tf ("SIP ALG Find Field Pos: " 2110 chL ); 2111 * pPos = chL ; 2112  FALSE ; 2115 pDa + i + 2; 2116 chL -( i + 2); 2118 i(( pDa [0] == '\r' &&Data[1] == '\n') || 2119 ( chL <= 0)) { 2122 i( chL > 0) { 2123 pDa += 2; 2127 * pPos = pDa - pS ; 2129  FALSE ; 2133 * pPos = pDa - pS ; 2134  TRUE ; 2135 } } 2138 * $gSClIdS (* pMsg ) 2140 * pS ; 2141 * pClId = NULL ; 2142  i ; 2144 pS = pMsg ; 2145  i = 0; i < 200; i++) { 2146 i(* pMsg != '\r') 2147 pMsg ++; 2151 i( i >= 200) { 2152 `tf ("SIP_ALG: getCallid wrong string format\n"); 2153  NULL ; 2156 size_t size = `RTE_CACHE_LINE_ROUNDUP ( pMsg - pS + 1); 2158 pClId = `e_zmloc ( NULL , size , RTE_CACHE_LINE_SIZE ); 2159 i(! pClId ) 2160  NULL ; 2162 `bcy ( pS , pClId , pMsg -Start); 2163 *( pClId + ( pMsg - pS )) = 0; 2165 i( ALG_DEBUG ) 2166 `tf ("%s: %s\n", __func__ , pClId ); 2168  pClId ; 2169 } } 2171 * $tSAlgModifyPayldAddrPt ( 2172 * pSMsg , ** pSMsgEnd , 2173 ut32_t dSL , ut32_* diffL , 2174 ut32_t modIp , ut16_t modPt , ut32_ ty ) 2176  addt [ MAX_ADDR_PORT_SIZE ]; 2177  _addr Addr ; 2178 ut32_t wSL = 0; 2179 * tmpPt = NULL ; 2181 i( modPt != 0) 2182 tmpPt = ` ( modPt ); 2184 * diffL = 0; 2185 i( ty = ADDRESS_PORT_STRING ) { 2186 Addr . s_addr = `htl ( modIp ); 2187 * tmpAddr = `_ ( Addr ); 2189 i( modPt != 0) 2190 `rtf ( addt , "%s:%s", tmpAddr , tmpPt ); 2192 `rtf ( addt , "%s", tmpAddr ); 2194 wSL = ` ( addt ); 2196 i( `abs ( wSL - dSL ) > 0) { 2201 `tSAlgAdjuMsg ( pSMsg , pSMsgEnd , 2202 wSL , dSL ); 2206 `y ( pSMsg , addt , ` (addrport)); 2207 } i( ty = PORT_STRING ) { 2208 if( tmpPt ) 2209 wSL = ` ( tmpPt ); 2211 i( `abs ( wSL - dSL ) > 0) { 2216 `tSAlgAdjuMsg ( pSMsg , pSMsgEnd , 2217 wSL , dSL ); 2221 if( tmpPt ) 2222 `y ( pSMsg , tmpPt , ` (tmpPort)); 2225 i( wSL > dSL ) 2226 * diffL = wSL - dSL ; 2228  pSMsg ; 2229 } } 2231 * $tSAlgAdjuMsg (* pSMsg , ** pSMsgEnd , 2232 ut32_t wSL , ut32_ dSL ) 2234  MsgBufr [ MAX_SIP_UDP_MSG_SIZE ]; 2236 i( wSL > dSL ) { 2237 pSMsg + dSL ; 2238  msgL = * pSMsgEnd - pSMsg ; 2240 `y ( MsgBufr , pSMsg , msgL ); 2241 pSMsg +( wSL - dSL ); 2242 `y ( pSMsg , MsgBufr , msgL ); 2244 i( ALG_DEBUG ) 2245 `tf ("tSAlgAdjuMsg: %u\n", msgL ); 2248 * pSMsgEnd +( wSL - dSL ); 2251 `memt ( pSMsg , ' ', dSL ); 2254  pSMsg ; 2255 } } @VIL/alg/lib_sip_alg.h 17 #ide __INCLUDE_LIB_ALG_H__ 18  #__INCLUDE_LIB_ALG_H__ ) 20  ~"e_h.h " 22 ut16_t gs_ssi_numb ; 23  #IS_STRING_SAME ( pS , rId ( `bcmp (S), sId, ` (rId)=0) ) 24  #TAG_TO_DATAPOS ( r ( ` (r+ 1) ) 25  #SKIP_SPACES ( pS ) \ 27 *(*)( pS ) == ' ') \ 28 (*)( pS )++; \ 29 } ) 31 epkt_d { mPRIVATE , mPUBLIC }; 34 es_g__dei { 35 mSIP_CALL_INCOMING , 36 mSIP_CALL_OUTGOING 40 es_g_pt_ty { 41 mSIP_UDP , 42 mSIP_RTP , 43 mSIP_RTCP 50  ss_g_key { 55 ut32_t m_addss ; 56 ut16_t ml4pt ; 57 ut8_t mfr1 ; 58 ut8_t mfr2 ; 65  ss_g_b_y { 66 ut32_t m_addss ; 71 ut16_t ml4pt ; 72 ut8_t ms_g__dei ; 74 ut8_t ms_g__id [100]; 75 ut8_t ml4pt_ty ; 76 ut8_t mfr1 ; 77 ut16_t mfr2 ; 78 ut32_t mfr3 ; 79 } g__e_che_igd ; 94  lib_s_g_ (); 117  s_g_dpi ( e_mbuf * pkt , pkt_d pkt_dei , 118 ut32_t modIp , ut16_t modL4Pt , 119 ut32_t pubIp , ut16_t pubL4Pt , 120 ut16_t modRPt , ut16_ modRtPt ); 133  tSAlgGAudioPts ( 134  e_mbuf * pkt , 135 ut16_t * pPt , 136 ut16_t * _pt ); 137  tSAlgMsgFldPos ( 138 * pDa , 139 cڡ * pIdS , 140 * pos , 141  chL ); 142  tSAlgMsgFldPosFdCf ( 143 * pDa , 144 cڡ * pIdS , 145 * pPos , 146  chL ); 147  tSAlgMsgFldPosFdS ( 148 * pDa , 149 cڡ * pIdS , 150 * pPos , 151  chL ); 152  move_s_g_y ( 153 ut32_t addr , 154 ut16_t ptid ); @VIL/conntrack/rte_cnxn_tracking.c 17  ~ 18  ~ 19  ~ 20  ~ 21  ~ 22  ~ 23  ~ 24  ~"e_xn_ackg.h " 25  ~"e__t.h " 27  #CNXN_TRX_DEBUG 0 ) 28  #TESTING_TIMERS 0 ) 29  #RTE_CT_TIMER_EXPIRED_DUMP 0 ) 31  #META_DATA_OFFSET 128 ) 32  #ETHERNET_START ( META_DATA_OFFSET + RTE_PKTMBUF_HEADROOM ) ) 33  #ETH_HDR_SIZE 14 ) 34  #IP_START ( ETHERNET_START + ETH_HDR_SIZE ) ) 35  #PROTOCOL_START ( IP_START + 9) ) 36  #SRC_ADDR_START ( IP_START + 12) ) 37  #TCP_START ( IP_START + 20) ) 40  #PROTOCOL_START_IPV6 ( IP_START + 6) ) 41  #SRC_ADDR_START_IPV6 ( IP_START + 8) ) 42  #TCP_START_IPV6 ( IP_START + 40) ) 44  #TCP_PROTOCOL 6 ) 45  #UDP_PROTOCOL 17 ) 46  #TCP_FW_IPV4_KEY_SIZE 16 ) 48  #TCP_FW_IPV6_KEY_SIZE 40 ) 50  #IPv4_HEADER_SIZE 20 ) 51  #IPv6_HEADER_SIZE 40 ) 53  #IP_VERSION_4 4 ) 54  #IP_VERSION_6 6 ) 57 e__xn_ack_bch_lookup_basic_ty ( 58  e__xn_ack * , 59  e_mbuf ** pkts , 60 ut64_t * pkts_mask , 61 ut64_t no_w_xn_mask , 62 ut64_t * y_pkt_mask , 63 ut64_t * hijack_mask , 64 ut8_t _hdr_size_bys ); 74 $e__xn_t_pkt ( e_mbuf * pkt , ut8_t ty ) 76  i ; 77 ut8_t * rd = `RTE_MBUF_METADATA_UINT8_PTR ( pkt , IP_START ); 79 `tf ("\n"); 80 `tf ("IPnd TCP/UDP headers:\n"); 82 i( ty = IP_VERSION_4 ) { 83  i = 0; i < 40; i++) { 84 `tf ("%02x ", rd [ i ]); 85 i(( i & 3) == 3) 86 `tf ("\n"); 88 `tf ("\n"); 91 i( ty = IP_VERSION_6 ) { 92  i = 0; i < 60; i++) { 93 `tf ("%02x ", rd [ i ]); 94 i(( i & 3) == 3) 95 `tf ("\n"); 97 `tf ("\n"); 100 } } 103 $e_xn__ty ( ut8_t * ty ,  e_mbuf * pkt ) 106  _hdr_size_bys = `e__g_IP_hdr_size ( pkt ); 108 i( _hdr_size_bys = IPv4_HEADER_SIZE ) 109 * ty = IP_VERSION_4 ; 111 i( _hdr_size_bys = IPv6_HEADER_SIZE ) 112 * ty = IP_VERSION_6 ; 113 } } 116 $e__t_hashkey ( ut32_t * key ) 118 `tf ("Key: %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x \\\n", 119 key [0], key[1], key[2], key[3], 120 key [4], key[5], key[6], key[7], key[8], key[9]); 121 } } 133 ut8_t 134 $e___xn_hashkey ( 135 ut32_t * c_addr , 136 ut32_t * d_addr , 137 ut16_t c_pt , 138 ut16_t d_pt , 139 ut8_t o , 140 ut32_t * key , 141 ut8_t ty ) 143 ut8_t hash_d_ig_dei = 1; 145 key [9] = o ; 147 i( ty = IP_VERSION_4 ) { 148 ut32_t sour = * c_addr ; 149 ut32_t de = * d_addr ; 151 key [3] = key[4] = key[5] = key[6] = key[7] = key[8] = 0; 153 i(( sour < de ) 154 || (( sour = de && ( c_pt < d_pt ))) { 155 key [0] = sour ; 156 key [1] = de ; 157 key [2] = ( c_pt << 16| d_pt ; 159 key [0] = de ; 160 key [1] = sour ; 161 key [2] = ( d_pt << 16| c_pt ; 162 hash_d_ig_dei = 0; 166 i( ty = IP_VERSION_6 ) { 167  _cmp = `memcmp ( c_addr , d_addr , 16); 168 ut32_t * lo_addr ; 169 ut32_t * hi_addr ; 171 i(( _cmp < 0|| ((_cm=0&& ( c_pt < d_pt ))) { 172 lo_addr = c_addr ; 173 hi_addr = d_addr ; 174 key [8] = ( c_pt << 16| d_pt ; 176 lo_addr = d_addr ; 177 hi_addr = c_addr ; 178 key [8] = ( d_pt << 16| c_pt ; 179 hash_d_ig_dei = 0; 181 key [0] = lo_addr [0]; 182 key [1] = lo_addr [1]; 183 key [2] = lo_addr [2]; 184 key [3] = lo_addr [3]; 185 key [4] = hi_addr [0]; 186 key [5] = hi_addr [1]; 187 key [6] = hi_addr [2]; 188 key [7] = hi_addr [3]; 191 #ifde ALGDBG 192 `e__t_hashkey ( key ); 194  hash_d_ig_dei ; 195 } } 199 $e__g_IP_hdr_size ( e_mbuf * pkt ) 207 ut8_t hdr_chk = `RTE_MBUF_METADATA_UINT8 ( pkt , IP_START ); 209 hdr_chk = hdr_chk >> 4; 211 i( hdr_chk = IP_VERSION_4 ) 212  IPv4_HEADER_SIZE ; 214 i( hdr_chk = IP_VERSION_6 ) 215  IPv6_HEADER_SIZE ; 224 } } 227 $e__t_tim_f_w_xn ( 228  e__xn_ack * , 229  e__xn_da * cd ) 231 cd -> e_ud_f_tim = RTE_CT_TCP_NONE ; 232 `e__t_xn_tim_f_t ( , cd , RTE_CT_TCP_SYN_SENT ); 233 } } 264  le  265 $e__memb_w_ci ( 266  e__xn_ack * , 267  e__xn_da * y ) 269 -> ϋ_ci ++; 270 -> w_cis [-> ϋ_ci ] = y ; 271 } } 273  e__xn_da * 274 $e__ch_w_cis ( e__xn_ack * , ut32_t * key ) 276  i ; 278  i = 0; i < -> ϋ_ci ; i++) { 279 ut32_t * xn_key = -> w_cis [ i ]-> key ; 280  key_cmp = `memcmp ( xn_key , key , 281 ( -> w_cis [ i ]-> key )); 283 i( key_cmp == 0) 284  -> w_cis [ i ]; 286  NULL ; 287 } } 289  le  $e__fg_w_cis ( e__xn_ack * ) 291 -> ϋ_ci = -1; 292 } } 297  e__ck_ai 298 $e__hd_t_lookup ( 299  e__xn_ack * , 300  e_mbuf * ck , 301 ut8_t pkt_num , 302 ut8_t key_is__d , 303 ut32_t * key , 304  hash_b_y , 305  no_w_xn , 306 ut8_t _hdr_size_bys ) 308  e__xn_da w_xn_da ; 310 `memt (& w_xn_da , 0, ( e__xn_da )); 311 e__ck_ai ck_ai ; 313 #ifde CT_CGNAT 314 t32_t posi = hash_b_y ; 315 -> posis [ pkt_num ] = posi ; 319 i( hash_b_y >= 0) { 325  e__xn_da * y = 326 & -> hash_b_s [ hash_b_y ]; 328 ck_ai = `e__vify_t_ck ( , y , ck , 329 key_is__d , _hdr_size_bys ); 331  ck_ai ) { 333  RTE_CT_FORWARD_PACKET : 334 y -> cous . cks_fwded ++; 337  RTE_CT_DROP_PACKET : 338 y -> cous . cks_drݳd ++; 339  RTE_CT_DROP_PACKET ; 341  RTE_CT_REOPEN_CNXN_AND_FORWARD_PACKET : 348 i( `e__t_w_ci ( , & w_xn_da , 349 ck , 0, _hdr_size_bys ) != 350 RTE_CT_DROP_PACKET ) { 351 `e_memy (& y -> _oc . t__da , 352 & w_xn_da . _oc . t__da , 353 ( w_xn_da . _oc . t__da )); 354 `e__t_tim_f_w_xn ( , y ); 355 i( -> cous -> ssis_aived > 0) 356 -> cous -> ssis_aived --; 361  RTE_CT_SEND_SERVER_SYN : 362 -> cous -> pkts_fwded ++; 364  RTE_CT_SEND_SERVER_SYN ; 366  RTE_CT_SEND_SERVER_ACK : 367 -> cous -> pkts_fwded ++; 369  RTE_CT_SEND_SERVER_ACK ; 371  RTE_CT_HIJACK : 372 -> cous -> pkts_fwded ++; 376  RTE_CT_HIJACK ; 378  RTE_CT_DESTROY_CNXN_AND_FORWARD_PACKET : 396 i( `e_hash_d_key ( -> rhash , y -> key ) >= 0) { 407 -> cous -> ssis_od ++; 408 i( -> cous -> cut_aive_ssis > 0) 409 -> cous -> cut_aive_ssis --; 410 `e__nl_xn_tim ( y ); 412 y -> cous . cks_fwded ++; 420  e__xn_da * w_hash_y ; 422 i( no_w_xn ) { 423 -> cous -> pkts_dr_vid_cn ++; 424  RTE_CT_DROP_PACKET ; 427 ck_ai = `e__t_w_ci ( , & w_xn_da , 428 ck , -> misc_tis . syroxy_abd , 429 _hdr_size_bys ); 431 i( `uiky ( ck_ai = RTE_CT_DROP_PACKET )) { 432 -> cous -> pkts_dr_vid_cn ++; 433  RTE_CT_DROP_PACKET ; 437 t32_t posi = `e_hash_add_key ( -> rhash , key ); 438 i( posi < 0) { 439 tf 441 posi , pkt_num ); 442  RTE_CT_DROP_PACKET ; 444 #ifde CT_CGNAT 445 -> posis [ pkt_num ] = posi ; 447 w_hash_y = & -> hash_b_s [ posi ]; 451 `memy ( w_xn_da . key , key, (new_cnxn_data.key)); 452 w_xn_da . key_is__d = key_is_client_order; 453 w_xn_da . oc = TCP_PROTOCOL ; 454 `e_xn__ty (& w_xn_da . ty , ck ); 455 `e_memy ( w_hash_y , & w_xn_da , 456 ( e__xn_da )); 457 w_hash_y -> cous . cks_fwded = 1; 458 w_hash_y -> cous . cks_drݳd = 0; 459 -> cous -> cut_aive_ssis ++; 460 -> cous -> ssis_aived ++; 462 i( ck_ai = RTE_CT_SEND_CLIENT_SYNACK ) { 466 `e__r_tis ( ck , w_hash_y ); 473 `e__cvt_to_ood__syck ( w_hash_y , 474 ck ); 481 ck_ai = `e__vify_t_ck ( , 482 w_hash_y , ck , 483 ! key_is__d , 484 _hdr_size_bys ); 486 i( `uiky ( ck_ai ! RTE_CT_FORWARD_PACKET )) { 488 `tf ("Seriousrror in synproxy generating "); 489 `tf ("SYN/ACK\n"); 490  RTE_CT_DROP_PACKET ; 492 -> cous -> pkts_fwded ++; 494  RTE_CT_SEND_CLIENT_SYNACK ; 496 `e__t_tim_f_w_xn ( , w_hash_y ); 508 -> cous -> pkts_fwded ++; 509  RTE_CT_FORWARD_PACKET ; 510 } } 512  ut64_t 513 $e__xn_ack_bch_lookup_basic ( 514  e__xn_ack * , 515  e_mbuf ** pkts , 516 ut64_t pkts_mask , 517 ut64_t no_w_xn_mask , 518 ut64_t * y_pkt_mask , 519 ut64_t * hijack_mask ) 522 ut64_t pkts_to_oss = pkts_mask ; 524 ut64_t vid_cks = pkts_mask ; 525 ut8_t comg_m [ RTE_HASH_LOOKUP_BULK_MAX ]; 527 ut8_t key_ig_d [ RTE_HASH_LOOKUP_BULK_MAX ]; 528 ut32_t cks_f_lookup = 0; 529 t32_t posis [ RTE_HASH_LOOKUP_BULK_MAX ]; 530 ut32_t i ; 531  e__xn_da w_xn_da ; 533 i( CNXN_TRX_DEBUG > 1) { 534 `tf ("E cnxack %p", ); 535 `tf (" synproxy batchookup withacket mask %p\n", 536 (*) pkts_mask ); 539 `e__fg_w_cis ( ); 540 * y_pkt_mask = 0; 541 * hijack_mask = 0; 548 ; pkts_to_oss ;) { 549 ut8_t pos = (ut8_t `__but_z ( pkts_to_oss ); 551 ut64_t pkt_mask = 1LLU << pos ; 553 pkts_to_oss &~ pkt_mask ; 555  e_mbuf * pkt = pkts [ pos ]; 557  _hdr_size_bys = `e__g_IP_hdr_size ( pkt ); 559 i( `uiky ( _hdr_size_bys < 0)) { 564 * _hdr = `RTE_MBUF_METADATA_UINT32_PTR ( pkt , IP_START ); 569  t_hdr * thdr = 570 ( t_hdr *) `RTE_MBUF_METADATA_UINT32_PTR ( pkt , 571 ( IP_START + _hdr_size_bys )); 572 ut16_t c_pt = `e_bsw16 ( thdr ->src_port); 573 ut16_t d_pt = `e_bsw16 ( thdr ->dst_port); 575 i( _hdr_size_bys = IPv4_HEADER_SIZE ) { 576  v4_hdr * ihdr = (v4_hd*) _hdr ; 577 ut8_t o = ihdr -> xt_o_id ; 579 i(!( o = TCP_PROTOCOL ||r= UDP_PROTOCOL )) { 590 ut32_t c_addr = `e_bsw32 ( ihdr ->src_addr); 591 ut32_t d_addr = `e_bsw32 ( ihdr ->dst_addr); 593 i( CNXN_TRX_DEBUG > 2) { 594 i( CNXN_TRX_DEBUG > 4) 595 `e__xn_t_pkt ( pkt , 596 IP_VERSION_4 ); 602 comg_m [ cks_f_lookup ] = pos ; 603 key_ig_d [ cks_f_lookup ] = 604 `e___xn_hashkey (& c_addr , & d_addr , 605 c_pt , d_pt , 606 o , 607 & -> hash_keys 608 [ cks_f_lookup ][0], 609 IP_VERSION_4 ); 610 cks_f_lookup ++; 613 i( _hdr_size_bys = IPv6_HEADER_SIZE ) { 614  v6_hdr * ihdr = (v6_hd*) _hdr ; 615 ut8_t o = ihdr ->proto; 617 i(!( o = TCP_PROTOCOL ||r= UDP_PROTOCOL )) { 622 i( CNXN_TRX_DEBUG > 2) { 623 i( CNXN_TRX_DEBUG > 4) 624 `e__xn_t_pkt ( pkt , 625 IP_VERSION_6 ); 632 comg_m [ cks_f_lookup ] = pos ; 633 key_ig_d [ cks_f_lookup ] = 634 `e___xn_hashkey ( 635 ( ut32_t * ihdr -> c_addr , 636 ( ut32_t * ihdr -> d_addr , 637 c_pt , d_pt , 638 o , 639 & -> hash_keys 640 [ cks_f_lookup ][0], 641 IP_VERSION_6 ); 642 cks_f_lookup ++; 647 i( `uiky ( cks_f_lookup == 0)) 648  vid_cks ; 651 `memt (& w_xn_da , 0, ( e__xn_da )); 655  lookup_su = 656 `e_hash_lookup_bulk ( -> rhash , (cڡ **)&-> hash_key_rs , 657 cks_f_lookup , & posis [0]); 659 i( `uiky ( lookup_su < 0)) { 661 `tf ("Unexpected hashableroblem, discardingllackets"); 664 #ifde ALGDBG 665  i = 0; i < cks_f_lookup ; i++) { 666 i( posis [ i ] >= 0) 667 `tf ("@CTositions[i]= %d, compacting_map[i]= %d\n", 668 posis [ i ], comg_m [i]); 671  i = 0; i < cks_f_lookup ; i++) { 673  hash_b_y = posis [ i ]; 675 ut8_t pkt_dex = comg_m [ i ]; 677 ut64_t pkt_mask = 1LLU << pkt_dex ; 678 ut8_t key_is__d = key_ig_d [ i ]; 679 ut32_t * key = -> hash_key_rs [ pkt_dex ]; 680 ut8_t oc = *( key + 9); 681  e_mbuf * ck = pkts [ pkt_dex ]; 682  no_w_xn = ( pkt_mask & no_w_xn_mask ) != 0; 686 i( oc = TCP_PROTOCOL ) { 687 e__ck_ai t_pkt_ai ; 689  _hdr_size_bys = `e__g_IP_hdr_size ( ck ); 690 t_pkt_ai = `e__hd_t_lookup ( , ck , 691 pkt_dex , key_is__d , 692 key , hash_b_y , no_w_xn , 693 _hdr_size_bys ); 695  t_pkt_ai ) { 697  RTE_CT_SEND_CLIENT_SYNACK : 698  RTE_CT_SEND_SERVER_ACK : 702 * y_pkt_mask | pkt_mask ; 705  RTE_CT_SEND_SERVER_SYN : 706  RTE_CT_FORWARD_PACKET : 709  RTE_CT_HIJACK : 710 * hijack_mask | pkt_mask ; 715 vid_cks ^ pkt_mask ; 716 -> cous -> pkts_dr ++; 723 i( hash_b_y >= 0) { 729  e__xn_da * y = 730 & -> hash_b_s [ hash_b_y ]; 732 i( e__udp_ck 733 ( , y , pkts [ pkt_dex ], 734 key_is__d )) { 735 y -> cous . cks_fwded ++; 736 -> cous -> pkts_fwded ++; 744  e__xn_da * _y = 745 `e__ch_w_cis ( , key ); 747 i( _y ! NULL ) { 748 i( `e__udp_ck ( , _y , 749 pkts [ pkt_dex ], 750 key_is__d )) { 751 _y -> cous . 752 cks_fwded ++; 753 -> cous -> pkts_fwded ++; 760 i( no_w_xn ) { 764 vid_cks ^ pkt_mask ; 765 -> cous -> pkts_dr ++; 766 -> cous -> 767 pkts_dr_vid_cn ++; 771 i( `e__udp_w_ci ( , 772 & w_xn_da , 773 pkts [ pkt_dex ])) { 777 t32_t posi = 778 `e_hash_add_key ( 779 -> rhash , key ); 781 i( posi < 0) 784  e__xn_da 785 * w_hash_y = & -> 786 hash_b_s [ posi ]; 793 `memy ( w_xn_da . key , key, 794 ( w_xn_da . key )); 796 w_xn_da . 797 key_is__d 798 key_is__d ; 799 w_xn_da . oc = 800 UDP_PROTOCOL ; 801 `e_xn__ty ( 802 & w_xn_da . ty , 803 ck ); 804 `e_memy ( w_hash_y , 805 & w_xn_da , 807 e__xn_da )); 809 w_hash_y -> cous . 810 cks_fwded = 1; 811 -> cous -> pkts_fwded ++; 812 w_hash_y -> cous . 813 cks_drݳd = 0; 814 -> cous -> pkts_dr = 0; 815 -> cous -> 816 cut_aive_ssis ++; 817 -> cous -> 818 ssis_aived ++; 820 w_hash_y -> 821 e_ud_f_tim 822 RTE_CT_UDP_NONE ; 823 `e__t_xn_tim_f_udp ( 824 , 825 w_hash_y , 826 RTE_CT_UDP_UNREPLIED ); 828 `e__memb_w_ci ( 829 , 830 w_hash_y ); 839 i( CNXN_TRX_DEBUG > 1) { 840 `tf ("Exit cnxnracker synproxy batchookup with"); 841 `tf ("ack mask %p\n", (*) vid_cks ); 844  vid_cks ; 845 } } 847 ut64_t 848 $e__xn_ack_bch_lookup_wh_syroxy ( 849  e__xn_ack * , 850  e_mbuf ** pkts , 851 ut64_t pkts_mask , 852  e_syroxy_hr * _hr ) 854  `e__xn_ack_bch_lookup_basic ( , pkts , pkts_mask , 0, 855 & _hr -> y_pkt_mask , &_hr-> hijack_mask ); 856 } } 857 #ifde CT_CGNAT 858 ut64_t $cgDZ__oss ( 859  e__xn_ack * , 860  e_mbuf ** pkts , 861 ut64_t pkts_mask , 862  e_CT_hr * _hr ) 865 `e__dib_syroxy ( ); 866  `e__xn_ack_bch_lookup_basic ( , pkts , pkts_mask , 867 _hr -> no_w_xn_mask , 868 & _hr -> y_pkt_mask , 869 & _hr -> hijack_mask ); 870 } } 872 ut64_t 873 $e__xn_ack_bch_lookup ( 874  e__xn_ack * , 875  e_mbuf ** pkts , 876 ut64_t pkts_mask , 877  e_CT_hr * _hr ) 880  `e__xn_ack_bch_lookup_basic ( , pkts , pkts_mask , 881 _hr -> no_w_xn_mask , 882 & _hr -> y_pkt_mask , &_hr-> hijack_mask ); 883 } } 886  $e__xn_ack_bch_lookup_ty ( 887  e__xn_ack * , 888  e_mbuf ** pkts , 889 ut64_t * pkts_mask , 890  e_CT_hr * _hr , 891 ut8_t _hdr_size_bys ) 894 `e__xn_ack_bch_lookup_basic_ty ( , pkts , pkts_mask , 895 _hr -> no_w_xn_mask , 896 & _hr -> y_pkt_mask , &_hr-> hijack_mask , 897 _hdr_size_bys ); 898 } } 902 ut64_t 903 $e__xn_ack_bch_lookup_wh_w_xn_cڌ ( 904  e__xn_ack * , 905  e_mbuf ** pkts , 906 ut64_t pkts_mask , 907 ut64_t no_w_xn_mask ) 909 ut64_t dt_ ; 911  `e__xn_ack_bch_lookup_basic ( , pkts , pkts_mask , 912 no_w_xn_mask , 913 & dt_ , &dont_care); 914 } } 918 $e__lize_deu_timeouts ( e__xn_ack * w_xn_ack ) 923 ut64_t htz = `e_g_tsc_hz (); 925 w_xn_ack -> htz = hertz; 926 w_xn_ack -> timg_cyes_r_timg_ = htz / 10; 927 w_xn_ack -> timg_100ms_s_evious = 0; 928 w_xn_ack -> timg_100ms_s = 0; 929 w_xn_ack -> timg_ϡ_time = `e_g_tsc_cyes (); 932 w_xn_ack -> _timeout . ttimeout . t_timeouts 933 [ RTE_CT_TCP_SYN_SENT ] = 120 * htz ; 934 w_xn_ack -> _timeout . ttimeout . t_timeouts 935 [ RTE_CT_TCP_SYN_RECV ] = 60 * htz ; 937 w_xn_ack -> _timeout . ttimeout . t_timeouts 938 [ RTE_CT_TCP_ESTABLISHED ] = 60 * 60 * 24 * 5 * htz ; 940 w_xn_ack -> _timeout . ttimeout . t_timeouts 941 [ RTE_CT_TCP_FIN_WAIT ] = 120 * htz ; 942 w_xn_ack -> _timeout . ttimeout . t_timeouts 943 [ RTE_CT_TCP_CLOSE_WAIT ] = 60 * htz ; 944 w_xn_ack -> _timeout . ttimeout . t_timeouts 945 [ RTE_CT_TCP_LAST_ACK ] = 30 * htz ; 946 w_xn_ack -> _timeout . ttimeout . t_timeouts 947 [ RTE_CT_TCP_TIME_WAIT ] = 120 * htz ; 948 w_xn_ack -> _timeout . ttimeout . t_timeouts 949 [ RTE_CT_TCP_CLOSE ] = 10 * htz ; 950 w_xn_ack -> _timeout . ttimeout . t_timeouts 951 [ RTE_CT_TCP_SYN_SENT_2 ] = 120 * htz ; 952 w_xn_ack -> _timeout . ttimeout . t_timeouts 953 [ RTE_CT_TCP_RETRANS ] = 300 * htz ; 954 w_xn_ack -> _timeout . ttimeout . t_timeouts 955 [ RTE_CT_TCP_UNACK ] = 300 * htz ; 957 w_xn_ack -> _timeout . udimeout . udp_timeouts 958 [ RTE_CT_UDP_UNREPLIED ] = 30 * htz ; 959 w_xn_ack -> _timeout . udimeout . udp_timeouts 960 [ RTE_CT_UDP_REPLIED ] = 180 * htz ; 962 w_xn_ack -> misc_tis . t_max_s = 963 RTE_CT_TCP_MAX_RETRANS ; 964 w_xn_ack -> misc_tis . t_loo = 0; 965 w_xn_ack -> misc_tis . t_be_lib = 0; 966 #ifde CT_CGNAT 967  i ; 968  i =0; i < RTE_HASH_LOOKUP_BULK_MAX ;i ++ ) 969 w_xn_ack -> posis [ i ] = -1; 973 } } 975  e_CT_cou_block ge_CT_cou_b [ MAX_CT_INSTANCES ] 976 g__e_che_igd ; 977  ge_CT_hi_cou_block__u = -1; 980 $e__lize_xn_ack_wh_syroxy ( 981  e__xn_ack * w_xn_ack , 982 ut32_t max_ci_cou , 983 * me , 984 ut16_t por_offt ) 986 ut32_t i ; 987 ut32_t size ; 988  e_CT_cou_block * cou_r ; 995 w_xn_ack -> por_offt =ointer_offset; 997 `memt ( w_xn_ack -> me , '\0', (new_cnxn_tracker->name)); 998 `y ( w_xn_ack -> me ,ame, ` (new_cnxn_tracker->name)); 1001 ut32_t numb_of_s = max_ci_cou ; 1003 size = `RTE_CACHE_LINE_ROUNDUP (( e__xn_da ) * 1004 numb_of_s ); 1005 w_xn_ack -> hash_b_s = 1006 `e_zmloc ( NULL , size , RTE_CACHE_LINE_SIZE ); 1007 i( w_xn_ack -> hash_b_s = NULL ) { 1008 `tf (" Notnough memory, or invalidrguments\n"); 1011 w_xn_ack -> num_xn_s = numb_of_s ; 1015  i = 0; i < numb_of_s ; i++) 1016 `e_tim_ (& w_xn_ack -> hash_b_s [ i ]. tim ); 1019  i = 0; i < RTE_HASH_LOOKUP_BULK_MAX ; i++) 1020 w_xn_ack -> hash_key_rs [ i ] = 1021 & w_xn_ack -> hash_keys [ i ][0]; 1028 i( e_CT_hi_cou_block__u = MAX_CT_INSTANCES ) 1031 e_CT_hi_cou_block__u ++; 1032 cou_r = & e_CT_cou_b [ e_CT_hi_cou_block__u ]; 1034 w_xn_ack -> cous = cou_r ; 1037  e_hash_ms rhash_rms = { 1038 . me =ame, 1039 . s = numb_of_s , 1040 . hash_func = NULL , 1041 . key_n = 40, 1042 . hash_func__v = 0, 1043 . sock_id = `e_sock_id (), 1044 . exa_ag = 1 1047 w_xn_ack -> rhash = `e_hash_ (& rhash_rms ); 1050 } } 1053 $e__lize_xn_ack ( 1054  e__xn_ack * w_xn_ack , 1055 ut32_t max_ci_cou , 1056 * me ) 1058  `e__lize_xn_ack_wh_syroxy ( w_xn_ack , 1059 max_ci_cou , me , 0); 1060 } } 1063 $e___xn_ack_sours ( e__xn_ack * d_xn_ack ) 1065 `e_ ( d_xn_ack -> hash_b_s ); 1066 `e_hash_ ( d_xn_ack -> rhash ); 1068 } } 1071 $e__g_xn_ack_size () 1073  ( e__xn_ack ); 1074 } } 1077 e__xn_tim_exped ( e_tim * , * g ); 1080 $e__t_xn_tim ( 1081  e__xn_ack * , 1082  e__xn_da * cd , 1083 ut64_t ticks_u_timeout ) 1090  e_tim * = (e_tim *) cd ; 1091 #ifde CT_CGNAT 1093 ut32_t ce_id = `g_tim_ce_id (); 1096 ut32_t ce_id = `e_lce_id (); 1101  sucss = `e_tim_t ( , ticks_u_timeout , SINGLE , ce_id , 1102 e__xn_tim_exped , ); 1104 i( sucss < 0) { 1108 `tf ("CNXN_TRACKER: Failedo set connectionimer.\n"); 1110 } } 1118 $e__t_xn_tim_f_t ( 1119  e__xn_ack * , 1120  e__xn_da * cd , 1121 ut8_t t_e ) 1124 cd -> exed_timeout = 1125 ( -> timg_100ms_s * ct-> timg_cyes_r_timg_ ) + 1126 -> _timeout . ttimeout . t_timeouts [ t_e ]; 1128 i( t_e = cd -> e_ud_f_tim ) { 1141 i( TESTING_TIMERS ) 1142 `tf ("S Tim f ci %d s %s\n", cd , 1143 e__t_mes [ t_e ]); 1145 `e__t_xn_tim ( , cd , 1146 -> _timeout . 1147 ttimeout . t_timeouts [ t_e ]); 1148 cd -> e_ud_f_tim = t_e ; 1149 } } 1158 $e__t_xn_tim_f_udp ( 1159  e__xn_ack * , 1160  e__xn_da * cd , 1161 ut8_t udp_e ) 1164 cd -> exed_timeout = ( -> timg_cyes_r_timg_ ) + 1165 -> _timeout . udimeout . udp_timeouts [ udp_e ]; 1167 i( udp_e = cd -> e_ud_f_tim ) { 1180 i( TESTING_TIMERS ) 1181 `tf ("S Tim f ci %d s %s\n", cd , 1182 e__udp_mes [ udp_e ]); 1183 `e__t_xn_tim ( , cd , 1184 -> _timeout . 1185 udimeout . udp_timeouts [ udp_e ]); 1186 cd -> e_ud_f_tim = udp_e ; 1187 } } 1193 $e__nl_xn_tim ( e__xn_da * cd ) 1195 i( TESTING_TIMERS ) 1196 `tf ("Cancel Timer\n"); 1198 `e_tim_ (& cd -> tim ); 1199 } } 1202 $e__hd_exped_tims ( e__xn_ack * ) 1209 ut64_t w_time = `e_g_tsc_cyes (); 1210 ut64_t time_diff = w_time - -> timg_ϡ_time ; 1212 i( time_diff > -> timg_cyes_r_timg_ ) { 1213 -> timg_ϡ_time = w_time ; 1214 -> timg_100ms_s ++; 1217 i( -> timg_100ms_s !-> timg_100ms_s_evious ) { 1218 `e_tim_mage (); 1219 -> timg_100ms_s_evious = ct-> timg_100ms_s ; 1221 } } 1226 $e__xn_tim_exped ( e_tim * , * g ) 1231  e__xn_da * cd = (e__xn_d*) ; 1232  e__xn_ack * = (e__xn_ack *) g ; 1233  sucss = 0; 1241 ut64_t cut_time = -> timg_100ms_s * 1242 -> timg_cyes_r_timg_ ; 1244 i( cd -> exed_timeout > cut_time ) { 1245 ut64_t time_diff = cd -> exed_timeout - cut_time ; 1247 `e__t_xn_tim ( , cd , time_diff ); 1251 i( cd -> oc = TCP_PROTOCOL ) { 1252 i( cd -> e_ud_f_tim = RTE_CT_TCP_TIME_WAIT || 1253 cd -> e_ud_f_tim = RTE_CT_TCP_CLOSE ) 1254 -> cous -> ssis_od ++; 1256 -> cous -> ssis_timedout ++; 1261 i( cd -> _oc . syroxy_da . syroxd ) 1262 `e__a_bufd_cks ( , cd ); 1264 } i( cd -> oc = UDP_PROTOCOL ) 1265 -> cous -> ssis_od ++; 1266 i( -> cous -> cut_aive_ssis > 0) 1267 -> cous -> cut_aive_ssis --; 1269 i( RTE_CT_TIMER_EXPIRED_DUMP ) { 1270 ut64_t r = ( cd -> cous . cks_drݳd * 10000) / 1271 ( cd -> cous . cks_fwded + 1272 cd -> cous . cks_drݳd ); 1274 i( cd -> oc = TCP_PROTOCOL ) { 1275 `tf ("CnxnTrkr %s,imed-out TCP Connection: %p,", 1276 -> me , cd ); 1277 `tf (" %s,kts forwarded %" 1278 PRIu64 ",kts dropped %" PRIu64 1280 e__t_mes [ cd -> e_ud_f_tim ], 1281 cd -> cous . cks_fwded , 1282 cd -> cous . cks_drݳd , 1283 ( ut32_t ( r / 100), 1284 ( ut32_t ( r % 100)); 1285 } i( cd -> oc = UDP_PROTOCOL ) { 1286 `tf ("CnxnTrkr %s, Timed-out UDP Connection: %p,", 1287 -> me , cd ); 1288 `tf (" %s,ktfwded %" PRIu64 1289 ",ktdrݳd %" PRIu64 ", drop%% %u.%u\n", 1290 e__udp_mes [ cd -> e_ud_f_tim ], 1291 cd -> cous . cks_fwded , 1292 cd -> cous . cks_drݳd , 1293 ( ut32_t ( r / 100), 1294 ( ut32_t ( r % 100)); 1298 sucss = `e_hash_d_key ( -> rhash , & cd -> key ); 1300 i( sucss < 0) { 1302 `e__t_hashkey ( cd -> key ); 1305 } } 1307  e_CT_cou_block * 1308 $e__g_cou_addss ( e__xn_ack * ) 1310  -> cous ; 1311 } } 1314 $e__t_cfiguti_tis ( e__xn_ack * , 1315 * me , * vue ) 1318  iv = `oi ( vue ); 1321 i( `rcmp ( me , "tcp_loose") == 0) { 1322 -> misc_tis . t_loo = iv ; 1327 i( `rcmp ( me , "tcp_be_liberal") == 0) { 1328 -> misc_tis . t_be_lib = iv ; 1333 i( `rcmp ( me , "tcp_max_retrans") == 0) { 1334 -> misc_tis . t_max_s = iv ; 1338 ut64_t time_vue = iv * -> htz ; 1344 i( `rcmp ( me , "tcp_syn_sent") == 0) { 1345 i( time_vue == 0) 1347 -> _timeout . ttimeout . t_timeouts [ RTE_CT_TCP_SYN_SENT ] = 1348 time_vue ; 1353 i( `rcmp ( me , "tcp_syn_recv") == 0) { 1354 i( time_vue == 0) 1356 -> _timeout . ttimeout . t_timeouts [ RTE_CT_TCP_SYN_RECV ] = 1357 time_vue ; 1362 i( `rcmp ( me , "tcp_established") == 0) { 1363 i( time_vue == 0) 1365 -> _timeout . ttimeout . t_timeouts [ RTE_CT_TCP_ESTABLISHED ] = 1366 time_vue ; 1371 i( `rcmp ( me , "tcp_fin_wait") == 0) { 1372 i( time_vue == 0) 1374 -> _timeout . ttimeout . t_timeouts [ RTE_CT_TCP_FIN_WAIT ] = 1375 time_vue ; 1380 i( `rcmp ( me , "tcp_close_wait") == 0) { 1381 i( time_vue == 0) 1383 -> _timeout . ttimeout . t_timeouts [ RTE_CT_TCP_CLOSE_WAIT ] = 1384 time_vue ; 1389 i( `rcmp ( me , "tcp_last_ack") == 0) { 1390 i( time_vue == 0) 1392 -> _timeout . ttimeout . t_timeouts [ RTE_CT_TCP_LAST_ACK ] = 1393 time_vue ; 1398 i( `rcmp ( me , "tcp_time_wait") == 0) { 1399 i( time_vue == 0) 1401 -> _timeout . ttimeout . t_timeouts [ RTE_CT_TCP_TIME_WAIT ] = 1402 time_vue ; 1407 i( `rcmp ( me , "tcp_close") == 0) { 1408 i( time_vue == 0) 1410 -> _timeout . ttimeout . t_timeouts [ RTE_CT_TCP_CLOSE ] = 1411 time_vue ; 1416 i( `rcmp ( me , "tcp_syn_sent_2") == 0) { 1417 i( time_vue == 0) 1419 -> _timeout . ttimeout . t_timeouts [ RTE_CT_TCP_SYN_SENT_2 ] = 1420 time_vue ; 1425 i( `rcmp ( me , "tcp_retrans") == 0) { 1426 i( time_vue == 0) 1428 -> _timeout . ttimeout . t_timeouts [ RTE_CT_TCP_RETRANS ] = 1429 time_vue ; 1434 i( `rcmp ( me , "tcp_unack") == 0) { 1435 i( time_vue == 0) 1437 -> _timeout . ttimeout . t_timeouts [ RTE_CT_TCP_UNACK ] = 1438 time_vue ; 1443 i( `rcmp ( me , "udp_unreplied") == 0) { 1444 i( time_vue == 0) 1446 -> _timeout . udimeout . udp_timeouts [ RTE_CT_UDP_UNREPLIED ] = 1447 time_vue ; 1452 i( `rcmp ( me , "udp_replied") == 0) { 1453 i( time_vue == 0) 1455 -> _timeout . udimeout . udp_timeouts [ RTE_CT_UDP_REPLIED ] = 1456 time_vue ; 1460 } } 1463 $e__xn_ack_bch_lookup_basic_ty ( 1464  e__xn_ack * , 1465  e_mbuf ** pkts , 1466 ut64_t * pkts_mask , 1467 ut64_t no_w_xn_mask , 1468 ut64_t * y_pkt_mask , 1469 ut64_t * hijack_mask , 1470 ut8_t _hdr_size_bys ) 1473 ut64_t pkts_to_oss = * pkts_mask ; 1475 ut8_t comg_m [ RTE_HASH_LOOKUP_BULK_MAX ]; 1477 ut8_t key_ig_d [ RTE_HASH_LOOKUP_BULK_MAX ]; 1478 ut32_t cks_f_lookup = 0; 1479 t32_t posis [ RTE_HASH_LOOKUP_BULK_MAX ]; 1480 ut32_t i ; 1481  e__xn_da w_xn_da ; 1483 i( CNXN_TRX_DEBUG > 1) { 1484 `tf ("E cnxack %p", ); 1485 `tf (" synproxy batchookup withacket mask %p\n", 1486 (*)* pkts_mask ); 1489 `e__fg_w_cis ( ); 1490 * y_pkt_mask = 0; 1491 * hijack_mask = 0; 1498  _hdr_size_bys ) { 1499  IPv4_HEADER_SIZE : 1500 ; pkts_to_oss ;) { 1501 ut8_t pos = (ut8_t `__but_z ( 1502 pkts_to_oss ); 1504 ut64_t pkt_mask = 1LLU << pos ; 1506 pkts_to_oss &~ pkt_mask ; 1508  e_mbuf * pkt = pkts [ pos ]; 1514  t_hdr * thdr = (tcp_hdr *) 1515 `RTE_MBUF_METADATA_UINT32_PTR ( pkt , 1516 ( IP_START + _hdr_size_bys )); 1517 ut16_t c_pt = `e_bsw16 ( thdr ->src_port); 1518 ut16_t d_pt = `e_bsw16 ( thdr ->dst_port); 1520  v4_hdr * ihdr = (ipv4_hdr *) 1521 `RTE_MBUF_METADATA_UINT32_PTR ( pkt , IP_START ); 1522 ut8_t o = ihdr -> xt_o_id ; 1524 i(!( o = TCP_PROTOCOL ||r= UDP_PROTOCOL )) { 1535 ut32_t c_addr = `e_bsw32 ( ihdr ->src_addr); 1536 ut32_t d_addr = `e_bsw32 ( ihdr ->dst_addr); 1538 i( CNXN_TRX_DEBUG > 2) { 1539 i( CNXN_TRX_DEBUG > 4) 1540 `e__xn_t_pkt ( pkt , 1541 IP_VERSION_4 ); 1547 comg_m [ cks_f_lookup ] = pos ; 1548 key_ig_d [ cks_f_lookup ] = 1549 `e___xn_hashkey (& c_addr , & d_addr , 1550 c_pt , d_pt , 1551 o , 1552 & -> hash_keys 1553 [ cks_f_lookup ][0], 1554 IP_VERSION_4 ); 1555 cks_f_lookup ++; 1558  IPv6_HEADER_SIZE : 1559 ; pkts_to_oss ;) { 1560 ut8_t pos = (ut8_t `__but_z ( 1561 pkts_to_oss ); 1563 ut64_t pkt_mask = 1LLU << pos ; 1565 pkts_to_oss &~ pkt_mask ; 1567  e_mbuf * pkt = pkts [ pos ]; 1570 * _hdr = `RTE_MBUF_METADATA_UINT32_PTR ( pkt , 1571 IP_START ); 1576  t_hdr * thdr = (tcp_hdr *) 1577 `RTE_MBUF_METADATA_UINT32_PTR ( pkt , 1578 ( IP_START + _hdr_size_bys )); 1579 ut16_t c_pt = `e_bsw16 ( thdr ->src_port); 1580 ut16_t d_pt = `e_bsw16 ( thdr ->dst_port); 1582  v6_hdr * ihdr = (v6_hd*) _hdr ; 1583 ut8_t o = ihdr ->proto; 1585 i(!( o = TCP_PROTOCOL ||r= UDP_PROTOCOL )) { 1590 i( CNXN_TRX_DEBUG > 2) { 1591 i( CNXN_TRX_DEBUG > 4) 1592 `e__xn_t_pkt ( pkt , 1593 IP_VERSION_6 ); 1600 comg_m [ cks_f_lookup ] = pos ; 1601 key_ig_d [ cks_f_lookup ] = 1602 `e___xn_hashkey ( 1603 ( ut32_t * ihdr -> c_addr , 1604 ( ut32_t * ihdr -> d_addr , 1605 c_pt , d_pt , 1606 o , 1607 & -> hash_keys 1608 [ cks_f_lookup ][0], 1609 IP_VERSION_6 ); 1610 cks_f_lookup ++; 1616 i( `uiky ( cks_f_lookup == 0)) 1620 `memt (& w_xn_da , 0, ( e__xn_da )); 1624  lookup_su = `e_hash_lookup_bulk ( -> rhash , 1625 (cڡ **)& -> hash_key_rs , 1626 cks_f_lookup , & posis [0]); 1628 i( `uiky ( lookup_su < 0)) { 1630 `tf ("Unexpected hashableroblem, discardingllackets"); 1631 * pkts_mask = 0; 1634  i = 0; i < cks_f_lookup ; i++) { 1636  hash_b_y = posis [ i ]; 1638 ut8_t pkt_dex = comg_m [ i ]; 1640 ut64_t pkt_mask = 1LLU << pkt_dex ; 1641 ut8_t key_is__d = key_ig_d [ i ]; 1642 ut32_t * key = -> hash_key_rs [ pkt_dex ]; 1643 ut8_t oc = *( key + 9); 1644  e_mbuf * ck = pkts [ pkt_dex ]; 1645  no_w_xn = ( pkt_mask & no_w_xn_mask ) != 0; 1649 i( oc = TCP_PROTOCOL ) { 1650 e__ck_ai t_pkt_ai ; 1652 t_pkt_ai = `e__hd_t_lookup ( , ck , 1653 pkt_dex , key_is__d , 1654 key , hash_b_y , no_w_xn , 1655 _hdr_size_bys ); 1657  t_pkt_ai ) { 1659  RTE_CT_SEND_CLIENT_SYNACK : 1660  RTE_CT_SEND_SERVER_ACK : 1664 * y_pkt_mask | pkt_mask ; 1667  RTE_CT_SEND_SERVER_SYN : 1668  RTE_CT_FORWARD_PACKET : 1671  RTE_CT_HIJACK : 1672 * hijack_mask | pkt_mask ; 1677 * pkts_mask ^ pkt_mask ; 1678 -> cous -> pkts_dr ++; 1685 i( hash_b_y >= 0) { 1691  e__xn_da * y = 1692 & -> hash_b_s [ hash_b_y ]; 1694 i( e__udp_ck 1695 ( , y , pkts [ pkt_dex ], 1696 key_is__d )) { 1697 y -> cous . cks_fwded ++; 1698 -> cous -> pkts_fwded ++; 1706  e__xn_da * _y = 1707 `e__ch_w_cis ( , key ); 1709 i( _y ! NULL ) { 1710 i( `e__udp_ck ( , _y , 1711 pkts [ pkt_dex ], 1712 key_is__d )) { 1713 _y -> cous . 1714 cks_fwded ++; 1715 -> cous -> pkts_fwded ++; 1722 i( no_w_xn ) { 1726 * pkts_mask ^ pkt_mask ; 1727 -> cous -> pkts_dr ++; 1728 -> cous -> 1729 pkts_dr_vid_cn ++; 1733 i( `e__udp_w_ci ( , 1734 & w_xn_da , pkts [ pkt_dex ])) { 1738 t32_t posi = 1739 `e_hash_add_key ( -> 1740 rhash , key ); 1742 i( posi < 0) 1745  e__xn_da 1746 * w_hash_y = & -> 1747 hash_b_s [ posi ]; 1754 `memy ( w_xn_da . key , key, 1755 ( w_xn_da . key )); 1757 w_xn_da . 1758 key_is__d 1759 key_is__d ; 1760 w_xn_da . oc = 1761 UDP_PROTOCOL ; 1762 `e_xn__ty ( 1763 & w_xn_da . ty , 1764 ck ); 1765 `e_memy ( w_hash_y , 1766 & w_xn_da , 1768 e__xn_da )); 1770 w_hash_y -> cous . 1771 cks_fwded = 1; 1772 -> cous -> pkts_fwded ++; 1773 w_hash_y -> cous . 1774 cks_drݳd = 0; 1775 -> cous -> pkts_dr = 0; 1776 -> cous -> 1777 cut_aive_ssis ++; 1778 -> cous -> 1779 ssis_aived ++; 1781 w_hash_y -> 1782 e_ud_f_tim 1783 RTE_CT_UDP_NONE ; 1784 `e__t_xn_tim_f_udp ( 1785 , 1786 w_hash_y , 1787 RTE_CT_UDP_UNREPLIED ); 1789 `e__memb_w_ci ( 1790 , 1791 w_hash_y ); 1800 i( CNXN_TRX_DEBUG > 1) { 1801 `tf ("Exit cnxnracker synproxy batchookup with"); 1802 `tf ("ack mask %p\n", (*)* pkts_mask ); 1804 } } @VIL/conntrack/rte_cnxn_tracking.h 17 #ide _CNXN_TRACKING_H 18  #_CNXN_TRACKING_H ) 20  ~ 21  ~ 22  ~ 23  ~ 26  ~ 27  ~ 29  ~"e__t.h " 54  e__xn_ack g__e_che_igd ; 56  e_CT_hi_cou_block__u ; 58  se_CT_cou_block { 60 ut64_t mcut_aive_ssis ; 61 ut64_t mssis_aived ; 63 ut64_t mssis_aived ; 65 ut64_t mssis_eablished ; 66 ut64_t mssis_od ; 67 ut64_t mssis_timedout ; 68 ut64_t mpkts_fwded ; 69 ut64_t mpkts_dr ; 70 ut64_t mpkts_dr_vid_cn ; 71 ut64_t mpkts_dr_vid_e ; 72 ut64_t mpkts_dr_vid_r ; 73 ut64_t mpkts_dr_outof_wdow ; 74 } g__e_che_igd ; 76  se_syroxy_hr { 77 ut64_t my_pkt_mask ; 78 ut64_t mhijack_mask ; 79  e_mbuf ** mbufd_pkts_to_fwd ; 80 ut8_t mnum_bufd_pkts_to_fwd ; 83  se_CT_hr { 84 ut64_t mno_w_xn_mask ; 85 ut64_t my_pkt_mask ; 86 ut64_t mhijack_mask ; 87  e_mbuf ** mbufd_pkts_to_fwd ; 88 ut8_t mnum_bufd_pkts_to_fwd ; 91  #MAX_CT_INSTANCES 24 ) 93  e_CT_cou_block e_CT_cou_b [ MAX_CT_INSTANCES ] 94 __e_che_igd ; 122 ut64_t 123 e__xn_ack_bch_lookup ( 124  e__xn_ack * , 125  e_mbuf ** pkts , 126 ut64_t pkts_mask , 127  e_CT_hr * _hr ); 130 e__xn_ack_bch_lookup_ty ( 131  e__xn_ack * , 132  e_mbuf ** pkts , 133 ut64_t * pkts_mask , 134  e_CT_hr * _hr , 135 ut8_t _hdr_size_bys ); 169 ut64_t 170 e__xn_ack_bch_lookup_wh_w_xn_cڌ ( 171  e__xn_ack * , 172  e_mbuf ** pkts , 173 ut64_t pkts_mask , 174 ut64_t no_w_xn_mask ); 205 ut64_t 206 e__xn_ack_bch_lookup_wh_syroxy ( 207  e__xn_ack * , 208  e_mbuf ** pkts , 209 ut64_t pkts_mask , 210  e_syroxy_hr * _hr ); 239  e_mbuf * 240 e__g_bufd_syroxy_cks ( e__xn_ack * ); 259 e__lize_xn_ack_wh_syroxy ( 260  e__xn_ack * w_xn_ack , 261 ut32_t max_ci_cou , 262 * me , 263 ut16_t por_offt ); 283 e__lize_xn_ack ( 284  e__xn_ack * w_xn_ack , 285 ut32_t max_ci_cou , 286 * me ); 301 e___xn_ack_sours ( 302  e__xn_ack * d_xn_ack ); 313 e__g_xn_ack_size (); 323  e_CT_cou_block * 324 e__g_cou_addss ( e__xn_ack * ); 346 e__t_cfiguti_tis ( 347  e__xn_ack * , 348 * me , 349 * vue ); 363 e__hd_exped_tims ( e__xn_ack * ); 367 e__g_IP_hdr_size ( e_mbuf * pkt ); 378 e__ab_syroxy ( e__xn_ack * ); 389 e__dib_syroxy ( e__xn_ack * ); 391 e__lize_deu_timeouts ( 392  e__xn_ack * w_xn_ack ); 394 ut8_t 395 e___xn_hashkey ( 396 ut32_t * c_addr , 397 ut32_t * d_addr , 398 ut16_t c_pt , 399 ut16_t d_pt , 400 ut8_t o , 401 ut32_t * key , 402 ut8_t ty ); 405 #ifde CT_CGNAT 406 ut32_t g_tim_ce_id (); 407 ut64_t cgDZ__oss ( 408  e__xn_ack * , 409  e_mbuf ** pkts , 410 ut64_t pkts_mask , 411  e_CT_hr * _hr ); @VIL/conntrack/rte_ct_synproxy.c 17  ~ 18  ~ 19  ~ 20  ~ 21  ~ 22  ~ 24  ~ 25  ~ 26  ~ 27  ~ 28  ~ 29  ~ 30  ~ 31  ~ 33  ~"e__t.h " 71  #META_DATA_OFFSET 128 ) 72  #ETHERNET_START ( META_DATA_OFFSET + RTE_PKTMBUF_HEADROOM ) ) 73  #ETH_HDR_SIZE 14 ) 74  #IP_START ( ETHERNET_START + ETH_HDR_SIZE ) ) 75  #PROTOCOL_START ( IP_START + 9) ) 76  #IP_V4_HEADER_SIZE 20 ) 77  #IP_V6_HEADER_SIZE 40 ) 78  #TCP_START ( IP_START + IP_V4_HEADER_SIZE ) ) 79  #TCP_MIN_HDR_SIZE 20 ) 81  #RTE_TCP_PROTO_ID 6 ) 82  #RTE_SP_DEFAULT_TTL 64 ) 84  #RTE_SYNPROXY_MAX_SPOOFED_PKTS 64 ) 86  #RTE_TCP_SYN 0x02 ) 87  #RTE_TCP_ACK 0x10 ) 88  #RTE_TCP_SYN_ACK ( RTE_TCP_SYN | RTE_TCP_ACK ) ) 90  #RTE_SP_DEFAULT_WINDOW 29200 ) 91  #RTE_CT_DEBUG_SPOOFED_SEQ 0 ) 92  #RTE_DPDK_IS_16_4 0 ) 94  #IP_VERSION_4 4 ) 95  #IP_VERSION_6 6 ) 101  e_syroxy_tis gdeu_v4_syroxy_tis = { 102 . tis = RTE_SP_OPTIONS_MSS | 103 RTE_SP_OPTIONS_SACK_PERM | 104 RTE_SP_OPTIONS_WINDOW_SCALE , 105 . gmss = 1460, 106 . gwdow_s = 7, 107 . gl_wdow = RTE_SP_DEFAULT_WINDOW 111  e_syroxy_tis gdeu_v6_syroxy_tis = { 112 . tis = RTE_SP_OPTIONS_MSS | 113 RTE_SP_OPTIONS_SACK_PERM | 114 RTE_SP_OPTIONS_WINDOW_SCALE , 115 . gmss = 1440, 116 . gwdow_s = 7, 117 . gl_wdow = RTE_SP_DEFAULT_WINDOW 121  __e_unud  122 $e__syroxy_t_pkt_fo ( e_mbuf * pkt ) 124  v4_hdr * ihdr4 = (ipv4_hdr *) 125 `RTE_MBUF_METADATA_UINT32_PTR ( pkt , IP_START ); 126 __e_unud  t_hdr * thdr = (tcp_hdr *) 127 `RTE_MBUF_METADATA_UINT32_PTR ( pkt , TCP_START ); 128 ut32_t ck_ngth = `e_pktmbuf_pkt_n ( pkt ); 130 `tf ("\ackgth %u, ingth %u\n", ck_ngth , 131 `e_bsw16 ( ihdr4 -> tٮ_ngth )); 132 `e_pktmbuf_dump ( dout , pkt , 80); 133 } } 135  le  136 $e__eml_t_chksum_upde_32 ( 137 ut32_t num_befe , 138 ut32_t num_a , 140 ut16_t * chksum ) 142 ut32_t sum ; 144 sum = ~ `e_bsw16 (* chksum ) & 0xffff; 145 num_befe = ~num_before; 146 sum +( num_befe >> 16) + (num_before & 0xffff); 147 sum +( num_a >> 16) + (num_after & 0xffff); 148 sum = (sum >> 16) + (sum & 0xffff); 149 sum += (sum >> 16); 150 * chksum = `e_bsw16 (~ sum & 0xffff); 151 } } 155  le ut32_t 156 $e__g_ndom_q_numb () 158  `e_g_tsc_cyes (); 159 } } 162  t8_t $e__vsi (* i_hdr ) 164 ut8_t * ihdr = (ut8_*) i_hdr ; 165 t8_t hdr_chk = * ihdr ; 167 hdr_chk = hdr_chk >> 4; 168 i( hdr_chk = IP_VERSION_4 || hdr_chk = IP_VERSION_6 ) 169  hdr_chk ; 172 } } 174  le  175 $e_syroxy_adju_pkt_ngth ( e_mbuf * pkt ) 177 ut16_t pkt_ngth = 0; 178  _hdr_size_bys = `e__g_IP_hdr_size ( pkt ); 179 * hdr = `RTE_MBUF_METADATA_UINT32_PTR ( pkt , IP_START ); 181 i( _hdr_size_bys = IP_V4_HEADER_SIZE ) { 182  v4_hdr * ihdr4 = (v4_hd*) hdr ; 184 pkt_ngth = `e_bsw16 ( ihdr4 -> tٮ_ngth + ETH_HDR_SIZE ; 185 } i( _hdr_size_bys = IP_V6_HEADER_SIZE ) { 186  v6_hdr * ihdr6 = (v6_hd*) hdr ; 188 pkt_ngth = `e_bsw16 ( ihdr6 -> yld_n ) + 189 IP_V6_HEADER_SIZE + ETH_HDR_SIZE ; 191 ut16_t mbuf_pkt_ngth = `e_pktmbuf_pkt_n ( pkt ); 193 i( pkt_ngth = mbuf_pkt_ngth ) 196 i( pkt_ngth < mbuf_pkt_ngth ) { 197 `e_pktmbuf_im ( pkt , mbuf_pkt_ngth - pkt_ngth ); 202 `e_pktmbuf_nd ( pkt , pkt_ngth - mbuf_pkt_ngth ); 203 } } 206 $e_syroxy_bud_v4_hd ( 207  v4_hdr * hdr4 , 208 ut32_t c_addr , 209 ut32_t d_addr , 210 ut16_t t_ngth ) 214 hdr4 -> vsi_ihl = 0x45; 215 hdr4 -> ty_of_rvi = 0; 216 hdr4 -> tٮ_ngth = `e_bsw16 ( t_ngth + IP_V4_HEADER_SIZE ); 217 hdr4 -> ck_id = 0; 219 hdr4 -> agmt_offt = 0x0040; 220 hdr4 -> time_to_live = RTE_SP_DEFAULT_TTL ; 221 hdr4 -> xt_o_id = RTE_TCP_PROTO_ID ; 223 hdr4 -> c_addr = `e_bsw32 (src_addr); 224 hdr4 -> d_addr = `e_bsw32 (dst_addr); 225 } } 229 $e_syroxy_bud_v6_hd ( 230  v6_hdr * hdr6 , 231 ut8_t * c_addr , 232 ut8_t * d_addr , 233 ut16_t t_ngth ) 237 ut8_t mp_c [16]; 238 ut8_t mp_d [16]; 240 hdr6 -> vtc_ow = 0x60; 241 hdr6 -> yld_n = `e_bsw16 ( t_ngth ); 242 hdr6 -> o = RTE_TCP_PROTO_ID ; 243 hdr6 -> h_lims = RTE_SP_DEFAULT_TTL ; 247 `e_mov16 ( mp_c , c_addr ); 248 `e_mov16 ( mp_d , d_addr ); 249 `e_mov16 ( hdr6 -> c_addr , mp_c ); 250 `e_mov16 ( hdr6 -> d_addr , mp_d ); 251 } } 255  ut16_t 256 $e__add_t_tis ( t_hdr * thdr , 257 cڡ  e_syroxy_tis * t_ts ) 259 ut32_t * tis_r = (ut32_*)( thdr + 1); 260 ut32_t * ved_r = tis_r ; 261 ut8_t tis = t_ts ->options; 262 ut32_t ti_bys ; 264 i( tis & RTE_SP_OPTIONS_MSS ) { 265 ti_bys = ( RTE_CT_TCPOPT_MSS << 24) | 266 ( RTE_CT_TCPOLEN_MSS << 16| t_ts -> mss ; 267 * tis_r ++ = `e_bsw32 ( ti_bys ); 270 i( tis & RTE_SP_OPTIONS_TIMESTAMP ) { 274 i( tis & RTE_SP_OPTIONS_SACK_PERM ) 275 ti_bys = ( RTE_CT_TCPOPT_SACK_PERM << 24) | 276 ( RTE_CT_TCPOLEN_SACK_PERM << 16); 278 ti_bys = ( RTE_CT_TCPOPT_NOP << 24) | 279 ( RTE_CT_TCPOPT_NOP << 16); 281 ti_bys |( RTE_CT_TCPOPT_TIMESTAMP << 8) | 282 RTE_CT_TCPOLEN_TIMESTAMP ; 283 * tis_r ++ = `e_bsw32 ( ti_bys ); 284 * tis_r ++ = `e_bsw32 ( t_ts -> ts_v ); 285 * tis_r ++ = `e_bsw32 ( t_ts -> ts_echo_y ); 286 } i( tis & RTE_SP_OPTIONS_SACK_PERM ) { 287 ti_bys = ( RTE_CT_TCPOPT_NOP << 24) | 288 ( RTE_CT_TCPOPT_NOP << 16) | 289 ( RTE_CT_TCPOPT_SACK_PERM << 8) | 290 RTE_CT_TCPOLEN_SACK_PERM ; 291 * tis_r ++ = `e_bsw32 ( ti_bys ); 294 i( tis & RTE_SP_OPTIONS_WINDOW_SCALE ) { 295 ti_bys = ( RTE_CT_TCPOPT_NOP << 24) | 296 ( RTE_CT_TCPOPT_WINDOW << 16) | 297 ( RTE_CT_TCPOLEN_WINDOW << 8) | 298 t_ts -> wdow_s ; 299 * tis_r ++ = `e_bsw32 ( ti_bys ); 306 ut16_t da_offt_bys = (ut16_t) `RTE_PTR_DIFF ( tis_r , 307 ved_r + ( t_hdr ); 308 thdr -> da_off = ( da_offt_bys >> 2) << 4; 310  da_offt_bys ; 311 } } 318  le ut16_t 319 $e_syroxy_bud_t_hd ( 320 __e_unud  e_mbuf * d_pkt , 321  t_hdr * t_hdr , 322 ut16_t c_pt , 323 ut16_t d_pt , 324 ut32_t q , 325 ut32_t ack , 326 ut8_t ags , 327 cڡ  e_syroxy_tis * t_ts , 328 ut8_t add_tis ) 330 t_hdr -> c_pt = `e_bsw16 (src_port); 331 t_hdr -> d_pt = `e_bsw16 (dst_port); 332 t_hdr -> _q = `e_bsw32 ( q ); 333 t_hdr -> cv_ack = `e_bsw32 ( ack ); 335 t_hdr -> t_ags = ags ; 336 t_hdr -> rx_w = t_ts -> l_wdow ; 338 t_hdr -> t_u = 0; 342 ut16_t w_t_hdr_size = TCP_MIN_HDR_SIZE ; 344 i( add_tis ) 345 w_t_hdr_size = `e__add_t_tis ( t_hdr , t_ts ); 347 t_hdr -> da_off = ( TCP_MIN_HDR_SIZE >> 2) << 4; 349  w_t_hdr_size ; 350 } } 353 $e_syroxy_compu_checksums (* i_hdr ,  t_hdr * t_hdr ) 364 t8_t hdr_chk = `e__vsi ( i_hdr ); 366 t_hdr -> cksum = 0; 368 i( hdr_chk = IP_VERSION_4 ) { 369  v4_hdr * i4_hdr = (v4_hd*) i_hdr ; 371 i4_hdr -> hdr_checksum = 0; 372 t_hdr -> cksum = `e_v4_ud_cksum ( i4_hdr ,_hdr); 373 i4_hdr -> hdr_checksum = `e_v4_cksum (i4_hdr); 374 } i( hdr_chk = IP_VERSION_6 ) { 375  v6_hdr * i6_hdr = (v6_hd*) i_hdr ; 377 t_hdr -> cksum = `e_v6_ud_cksum ( i6_hdr ,_hdr); 379 } } 391 $e__cvt_to_ood__syck ( e__xn_da * cd , 392  e_mbuf * d_pkt ) 398  _hdr_size_bys = `e__g_IP_hdr_size ( d_pkt ); 399 * hdr = `RTE_MBUF_METADATA_UINT32_PTR ( d_pkt , IP_START ); 400  t_hdr * thdr = (tcp_hdr *) 401 `RTE_MBUF_METADATA_UINT32_PTR ( d_pkt , IP_START + 402 _hdr_size_bys ); 403 ut16_t t_hd_size ; 406 ut32_t w_q = `e__g_ndom_q_numb (); 408 i( RTE_CT_DEBUG_SPOOFED_SEQ ) 409 w_q = 10; 411 cd -> _oc . syroxy_da . ig_ood_q = w_q ; 414 t_hd_size = `e_syroxy_bud_t_hd ( d_pkt , thdr , 415 `e_bsw16 ( thdr -> d_pt ), 416 `e_bsw16 ( thdr -> c_pt ), 417 w_q , `e_bsw32 ( thdr -> _q ) + 1, 418 RTE_TCP_SYN_ACK , 419 _hdr_size_bys = IP_V4_HEADER_SIZE ? 420 & deu_v4_syroxy_tis : 421 & deu_v6_syroxy_tis , 1); 424 i( _hdr_size_bys = IP_V4_HEADER_SIZE ) { 425  v4_hdr * ihdr4 = (v4_hd*) hdr ; 427 `e_syroxy_bud_v4_hd ( ihdr4 , 428 `e_bsw32 ( ihdr4 -> d_addr ), 429 `e_bsw32 ( ihdr4 -> c_addr ), t_hd_size ); 431 } i( _hdr_size_bys = IP_V6_HEADER_SIZE ) { 432  v6_hdr * ihdr6 = (v6_hd*) hdr ; 434 `e_syroxy_bud_v6_hd ( ihdr6 , 435 ( ut8_t *) ihdr6 -> d_addr , 436 ( ut8_t *) ihdr6 -> c_addr , t_hd_size ); 438 `e_syroxy_adju_pkt_ngth ( d_pkt ); 440 `e_syroxy_compu_checksums ( hdr , thdr ); 442 } } 446 $e__cvt_to_ood_rv_syn ( e__xn_da * cd , 447  e_mbuf * d_pkt ) 453  _hdr_size_bys = `e__g_IP_hdr_size ( d_pkt ); 454 * hdr = `RTE_MBUF_METADATA_UINT32_PTR ( d_pkt , IP_START ); 455  t_hdr * thdr = (tcp_hdr *) 456 `RTE_MBUF_METADATA_UINT32_PTR ( d_pkt , IP_START 457 + _hdr_size_bys ); 458 ut16_t t_hd_size ; 460 t_hd_size = `e_syroxy_bud_t_hd ( d_pkt , thdr , 461 `e_bsw16 ( thdr -> c_pt ), 462 `e_bsw16 ( thdr -> d_pt ), 463 `e_bsw32 ( thdr -> _q ) - 1, 0, 464 RTE_TCP_SYN , 465 & cd -> _oc . syroxy_da . xn_tis , 1); 467 i( _hdr_size_bys = IP_V4_HEADER_SIZE ) { 468  v4_hdr * ihdr4 = (v4_hd*) hdr ; 470 `e_syroxy_bud_v4_hd ( ihdr4 , 471 `e_bsw32 ( ihdr4 -> c_addr ), 472 `e_bsw32 ( ihdr4 -> d_addr ), t_hd_size ); 473 } i( _hdr_size_bys = IP_V6_HEADER_SIZE ) { 474  v6_hdr * ihdr6 = (v6_hd*) hdr ; 476 `e_syroxy_bud_v6_hd ( ihdr6 , 477 ( ut8_t *) ihdr6 -> c_addr , 478 ( ut8_t *) ihdr6 -> d_addr , t_hd_size ); 481 `e_syroxy_adju_pkt_ngth ( d_pkt ); 483 `e_syroxy_compu_checksums ( hdr , thdr ); 485 } } 488 $e__cvt_to_ood_rv_ack ( e__xn_da * cd , 489  e_mbuf * d_pkt ) 495  _hdr_size_bys = `e__g_IP_hdr_size ( d_pkt ); 496 * hdr = `RTE_MBUF_METADATA_UINT32_PTR ( d_pkt , IP_START ); 497  t_hdr * thdr = (tcp_hdr *) 498 `RTE_MBUF_METADATA_UINT32_PTR ( d_pkt , IP_START + 499 _hdr_size_bys ); 504 ut32_t _q = `e_bsw32 ( thdr -> _q ); 505 ut16_t t_hd_size ; 507 cd -> _oc . syroxy_da . q_diff = 508 _q - cd -> _oc . syroxy_da . ig_ood_q ; 511 t_hd_size = `e_syroxy_bud_t_hd ( d_pkt , thdr , 512 `e_bsw16 ( thdr -> d_pt ), 513 `e_bsw16 ( thdr -> c_pt ), 514 `e_bsw32 ( thdr -> cv_ack ), 515 `e_bsw32 ( thdr -> _q + 1, RTE_TCP_ACK , 516 & cd -> _oc . syroxy_da . xn_tis , 0); 519 i( _hdr_size_bys = IP_V4_HEADER_SIZE ) { 520  v4_hdr * ihdr4 = (v4_hd*) hdr ; 522 `e_syroxy_bud_v4_hd ( ihdr4 , 523 `e_bsw32 ( ihdr4 -> d_addr ), 524 `e_bsw32 ( ihdr4 -> c_addr ), t_hd_size ); 526 } i( _hdr_size_bys = IP_V6_HEADER_SIZE ) { 527  v6_hdr * ihdr6 = (v6_hd*) hdr ; 529 `e_syroxy_bud_v6_hd ( ihdr6 , 530 ( ut8_t *) ihdr6 -> d_addr , 531 ( ut8_t *) ihdr6 -> c_addr , t_hd_size ); 533 `e_syroxy_adju_pkt_ngth ( d_pkt ); 535 `e_syroxy_compu_checksums ( hdr , thdr ); 536 } } 551 $e__adju_rv_q_a_wdow_check ( 552  e__xn_da * cd , 553 __e_unud * i_hdr , 554  t_hdr * thdr , 555 e__pkt_dei d ) 557 ut32_t num_befe , num_a ; 559 i(! cd -> _oc . syroxy_da . xn_eablished ) 562 i( d = RTE_CT_DIR_ORIGINAL ) 567 num_befe = `e_bsw32 ( thdr -> _q ); 568 num_a = num_befe - cd -> _oc . syroxy_da . q_diff ; 569 thdr -> _q = `e_bsw32 ( num_a ); 571 `e__eml_t_chksum_upde_32 ( num_befe , num_a , 572 & thdr -> cksum ); 573 } } 577 $e__adju__ck_s ( 578  t_hdr * thdr , 579 ut32_t diff ) 581 ut32_t num_befe , num_a ; 582 ut32_t * ck_r ; 583 ut8_t ck_blk_size ; 584 ut16_t daoff__bys = ( thdr -> da_off & 0xf0) >> 2; 585 ut16_t ngth = daoff__bys - ( t_hdr ); 587 i(! ngth ) 590 ut8_t * tis_r = (ut8_*)( thdr + 1); 592  ngth > 0) { 593 ut8_t code = * tis_r ; 594 ut8_t size = tis_r [1]; 595  i ; 597  code ) { 599  RTE_CT_TCPOPT_EOL : 602  RTE_CT_TCPOPT_NOP : 603 ngth --; 604 tis_r ++; 607  RTE_CT_TCPOPT_SACK : 616 ck_blk_size = size - 2; 618 ck_r = ( ut32_t *)( tis_r + 2); 620  num_acks = ck_blk_size >> 2; 622 i( `uiky ( ck_blk_size > 32 || 623 (( ck_blk_size & 0x3) != 0))) { 624 `tf ("Sack blockarsing failure\n"); 628  i = 0; i < num_acks ; i++) { 629 num_befe = `e_bsw32 (* ck_r ); 630 num_a = num_befe + diff ; 631 * ck_r = `e_bsw32 ( num_a ); 632 ck_r ++; 633 `e__eml_t_chksum_upde_32 ( 634 num_befe , 635 num_a , 636 & thdr -> cksum ); 643 i(( size < 2|| (siz> ngth )) { 644 `tf ("ERROR!, opsize %i,ength %i\n", 645 size , ngth ); 649 tis_r + size ; 650 ngth - size ; 652 } } 655 $e__adju__ack_befe_wdow_check ( 656  e__xn_da * cd , 657 __e_unud * i_hdr , 658  t_hdr * thdr , 659 e__pkt_dei d ) 661 ut32_t num_befe , num_a ; 663 i(! cd -> _oc . syroxy_da . xn_eablished ) 666 i( d ! RTE_CT_DIR_ORIGINAL ) 671 num_befe = `e_bsw32 ( thdr -> cv_ack ); 672 num_a = num_befe + cd -> _oc . syroxy_da . q_diff ; 673 thdr -> cv_ack = `e_bsw32 ( num_a ); 674 `e__eml_t_chksum_upde_32 ( num_befe , 675 num_a , & thdr -> cksum ); 680 `e__adju__ck_s ( thdr , 681 cd -> _oc . syroxy_da . q_diff ); 686 } } 693 $e__r_t_tis ( 694 ut8_t * tis_r , 695 ut16_t ngth , 696  e_syroxy_tis * t_ts ) 698  size ; 700 t_ts -> tis = 0; 702  ngth > 0) { 703 ut8_t code = * tis_r ++; 705 i( code = RTE_CT_TCPOPT_EOL ) 708 i( code = RTE_CT_TCPOPT_NOP ) { 709 ngth --; 713 size = * tis_r ++; 715 i( `uiky ( size < 2 || opsiz> ngth )) { 717 `tf ("parsingrror, opsize: %i,ength: %i\n", 718 size , ngth ); 722  code ) { 724  RTE_CT_TCPOPT_MSS : 725 i( size = RTE_CT_TCPOLEN_MSS ) { 726 ut16_t * mss_r = (ut16_*) tis_r ; 728 t_ts -> mss = `e_bsw16 (* mss_r ); 729 t_ts -> tis | RTE_SP_OPTIONS_MSS ; 733  RTE_CT_TCPOPT_WINDOW : 734 i( size = RTE_CT_TCPOLEN_WINDOW ) { 735 t_ts -> wdow_s = `RTE_MIN (* tis_r , 736 RTE_CT_MAX_TCP_WINDOW_SCALE ); 737 t_ts -> tis | RTE_SP_OPTIONS_WINDOW_SCALE ; 741  RTE_CT_TCPOPT_TIMESTAMP : 742 i( size = RTE_CT_TCPOLEN_TIMESTAMP ) { 743 ut32_t * ts_v_r = (ut32_*) tis_r ; 744 ut32_t * ts_e_r = 745 ( ut32_t *)( tis_r + 4); 746 t_ts -> ts_v = `e_bsw32 (* ts_v_r ); 747 t_ts -> ts_echo_y = 748 `e_bsw32 (* ts_e_r ); 749 t_ts -> tis | RTE_SP_OPTIONS_TIMESTAMP ; 753  RTE_CT_TCPOPT_SACK_PERM : 754 i( size = RTE_CT_TCPOLEN_SACK_PERM ) 755 t_ts -> tis | RTE_SP_OPTIONS_SACK_PERM ; 762 tis_r + size - 2; 763 ngth - size ; 766 } } 770 $e__r_tis ( e_mbuf * pkt ,  e__xn_da * cd ) 775  _hdr_ngth = `e__g_IP_hdr_size ( pkt ); 776  t_hdr * thdr = (tcp_hdr *) 777 `RTE_MBUF_METADATA_UINT32_PTR ( pkt , IP_START + _hdr_ngth ); 778 ut8_t * t_r = `RTE_MBUF_METADATA_UINT8_PTR ( pkt , 779 ( IP_START + _hdr_ngth + ( t_hdr ))); 781  e_syroxy_tis * t_ts = 782 & cd -> _oc . syroxy_da . xn_tis ; 783  ngth__bys = 784 (( thdr -> da_off & 0xf0>> 2- ( t_hdr ); 786 `e__r_t_tis ( t_r , ngth__bys , t_ts ); 787 t_ts -> l_wdow = thdr -> rx_w ; 788 } } 793  e_mbuf * 794 $e__g_bufd_syroxy_cks ( 795  e__xn_ack * ) 797  e_mbuf * kr_li = -> bufd_pkt_li ; 799 -> bufd_pkt_li = NULL ; 800  kr_li ; 801 } } 805  $e__ab_syroxy ( e__xn_ack * ) 807 -> misc_tis . syroxy_abd = 1; 808 `tf ("rte_ct_enable_synproxy = %d\n", 809 -> misc_tis . syroxy_abd ); 810 } } 812  $e__dib_syroxy ( e__xn_ack * ) 814 -> misc_tis . syroxy_abd = 0; 817 } } 820 $e__bufr_ck ( 821  e__xn_ack * , 822  e__xn_da * cd , 823  e_mbuf * pkt ) 831  e_mbuf ** xt = (rte_mbuf **) 832 `RTE_MBUF_METADATA_UINT64_PTR ( pkt , 833 -> por_offt ); 834 * xt = cd -> _oc . syroxy_da . bufd_pkt_li ; 835 cd -> _oc . syroxy_da . bufd_pkt_li = pkt ; 836 } } 839 $e__a_bufd_cks ( 840  e__xn_ack * , 841  e__xn_da * cd ) 843  e_mbuf * xn_li = 844 cd -> _oc . syroxy_da . bufd_pkt_li ; 846 i( xn_li = NULL ) 849 cd -> _oc . syroxy_da . bufd_pkt_li = NULL ; 851  e_mbuf * kr_li = -> bufd_pkt_li ; 853 i( kr_li = NULL ) 860  xn_li ! NULL ) { 861  e_mbuf * d_xt ; 863  e_mbuf ** xt = (rte_mbuf **) 864 `RTE_MBUF_METADATA_UINT64_PTR ( xn_li , 865 -> por_offt ); 867 d_xt = * xt ; 868 * xt = kr_li ; 869 kr_li = xn_li ; 870 xn_li = d_xt ; 872 -> bufd_pkt_li = kr_li ; 873 } } @VIL/conntrack/rte_ct_tcp.c 17  ~ 18  ~ 19  ~ 20  ~ 21  ~"e__t.h " 22  ~"e_xn_ackg.h " 25  #CT_DEBUG 0 ) 26  #STATE_TRACKING 0 ) 27  #RTE_CT_ASSERT 0 ) 30  #META_DATA_OFFSET 128 ) 31  #RTE_PKTMBUF_HEADROOM 128 ) 32  #ETHERNET_START ( META_DATA_OFFSET + RTE_PKTMBUF_HEADROOM ) ) 33  #ETH_HDR_SIZE 14 ) 34  #IP_START ( ETHERNET_START + ETH_HDR_SIZE ) ) 36  #IPv4_HEADER_SIZE 20 ) 37  #IPv6_HEADER_SIZE 40 ) 39  #IP_VERSION_4 4 ) 40  #IP_VERSION_6 6 ) 42  #e_a ( q2 , q1 `e_befe (q1, seq2) ) 43  le ut8_t $e_befe ( ut32_t q1 , ut32_ q2 ) 45  ( t32_t ( q1 - q2 ) < 0; 46 } } 50  #NO RTE_CT_TCP_NONE ) 51  #SS RTE_CT_TCP_SYN_SENT ) 52  #SR RTE_CT_TCP_SYN_RECV ) 53  #ES RTE_CT_TCP_ESTABLISHED ) 54  #FW RTE_CT_TCP_FIN_WAIT ) 55  #CW RTE_CT_TCP_CLOSE_WAIT ) 56  #LA RTE_CT_TCP_LAST_ACK ) 57  #TW RTE_CT_TCP_TIME_WAIT ) 58  #CL RTE_CT_TCP_CLOSE ) 59  #S2 RTE_CT_TCP_SYN_SENT_2 ) 60  #IV RTE_CT_TCP_MAX ) 61  #IG RTE_CT_TCP_IGNORE ) 63 cڡ ut8_t ge__t_e_b [2][6][ RTE_CT_TCP_MAX ] = { 66 { SS , ctSS, IG , ctIG, ctIG, ctIG, ctIG, ctSS, ctSS, 67 S2 }, 70 { IV , ctIV, SR , ctIV, ctIV, ctIV, ctIV, ctIV, ctIV, 71 SR }, 74 { IV , ctIV, FW , ctFW, LA , ctLA, ctLA, TW , CL , 75 IV }, 77 { ES , IV , ctES, ctES, CW , ctCW, TW , ctTW, CL , 78 IV }, 81 { IV , CL , ctCL, ctCL, ctCL, ctCL, ctCL, ctCL, ctCL, 82 CL }, 83 { IV , ctIV, ctIV, ctIV, ctIV, ctIV, ctIV, ctIV, ctIV, ctIV} 88 { IV , S2 , ctIV, ctIV, ctIV, ctIV, ctIV, SS , ctIV, 89 S2 }, 92 { IV , SR , IG , ctIG, ctIG, ctIG, ctIG, ctIG, ctIG, 93 SR }, 96 { IV , ctIV, FW , ctFW, LA , ctLA, ctLA, TW , CL , 97 IV }, 100 { IV , IG , SR , ES , CW , ctCW, TW , ctTW, CL , 101 IG }, 104 { IV , CL , ctCL, ctCL, ctCL, ctCL, ctCL, ctCL, ctCL, 105 CL }, 106 { IV , ctIV, ctIV, ctIV, ctIV, ctIV, ctIV, ctIV, ctIV, ctIV} 111 ee_t_ag { 112 mRTE_CT_TCP_SYN_FLAG , 113 mRTE_CT_TCP_SAK_FLAG , 114 mRTE_CT_TCP_FIN_FLAG , 115 mRTE_CT_TCP_ACK_FLAG , 116 mRTE_CT_TCP_RST_FLAG , 117 mRTE_CT_TCP_ILL_FLAG , 120  ut8_t ge__t_ags_to_e_b_dex [16] = { 122 RTE_CT_TCP_ILL_FLAG , 123 RTE_CT_TCP_FIN_FLAG , 124 RTE_CT_TCP_SYN_FLAG , 125 RTE_CT_TCP_ILL_FLAG , 126 RTE_CT_TCP_RST_FLAG , 127 RTE_CT_TCP_RST_FLAG , 128 RTE_CT_TCP_RST_FLAG , 129 RTE_CT_TCP_ILL_FLAG , 131 RTE_CT_TCP_ACK_FLAG , 132 RTE_CT_TCP_FIN_FLAG , 133 RTE_CT_TCP_SAK_FLAG , 134 RTE_CT_TCP_ILL_FLAG , 135 RTE_CT_TCP_RST_FLAG , 136 RTE_CT_TCP_ILL_FLAG , 137 RTE_CT_TCP_RST_FLAG , 138 RTE_CT_TCP_ILL_FLAG , 141  le ut8_t 142 $e__g_dex ( ut8_t t_ags ) 144 ut8_t imp܏_ags ; 146 t_ags &= 0x3f; 147 imp܏_ags = (( t_ags & 0x10) >> 1) | (tcp_flags & 7); 150 i( `uiky (( t_ags == 0) || (tcp_flags == 0x3f))) 152  RTE_CT_TCP_ILL_FLAG ; 154  e__t_ags_to_e_b_dex [ imp܏_ags ]; 156 } } 158  le  159 $e__eh_dei_has_ags ( e__xn_da * cd , ut8_t ags ) 161  (( cd -> _oc . t__da . [0]. ags | cd-> 162 _oc . t__da . [1]. ags ) & flags) != 0; 163 } } 165  le ut32_t $e__q_us_ngth ( e_mbuf * pkt , 166 ut8_t _hdr_size ) 168 ut16_t pkt_ngth = 0; 169  t_hdr * thd = 170 ( t_hdr *) `RTE_MBUF_METADATA_UINT32_PTR ( pkt , 171 ( IP_START + 172 _hdr_size )); 173 ut32_t t_hdr_size = ( thd -> da_off & 0xf0) >> 2; 175 * _hdr = `RTE_MBUF_METADATA_UINT32_PTR ( pkt , IP_START ); 177 i( _hdr_size = IPv4_HEADER_SIZE ) { 178  v4_hdr * ihdr = (v4_hd*) _hdr ; 180 pkt_ngth = `e_bsw16 ( ihdr -> tٮ_ngth ); 182 i( _hdr_size = IPv6_HEADER_SIZE ) { 183  v6_hdr * ihdr = (v6_hd*) _hdr ; 185 pkt_ngth = `e_bsw16 ( ihdr -> yld_n + IPv6_HEADER_SIZE ; 195  `e_bsw32 ( thd -> _q ) + 196 pkt_ngth - _hdr_size - t_hdr_size + 197 (( thd -> t_ags & ( RTE_CT_TCPHDR_SYN | RTE_CT_TCPHDR_FIN )) != 200 } } 203 $e__check_f_slg_d_ck_rm ( 204  e_mbuf * pkt , 205  e__t_e * e , 206 ut8_t _hdr_size ) 209  t_hdr * thd = 210 ( t_hdr *) `RTE_MBUF_METADATA_UINT32_PTR ( pkt , 211 ( IP_START + 212 _hdr_size )); 213 ut32_t daoff__bys = ( thd -> da_off & 0xf0) >> 2; 214 ut32_t ngth = daoff__bys - ( t_hdr ); 216 e -> s = 0; 217 e -> ags = 0; 219 i( ngth == 0) 222 ut8_t * tis_r = 223 `RTE_MBUF_METADATA_UINT8_PTR ( pkt , 224 ( IP_START + _hdr_size + 225 ( t_hdr ))); 227  ngth > 0) { 228 ut8_t ti = * tis_r ; 229 ut8_t size = tis_r [1]; 232  ti ) { 234  RTE_CT_TCPOPT_EOL : 238  RTE_CT_TCPOPT_NOP : 239 tis_r ++; 240 ngth --; 243  RTE_CT_TCPOPT_SACK_PERM : 244 i( size = RTE_CT_TCPOLEN_SACK_PERM ) 245 e -> ags | RTE_CT_TCP_FLAG_SACK_PERM ; 248  RTE_CT_TCPOPT_WINDOW : 249 i( size = RTE_CT_TCPOLEN_WINDOW ) { 250 e -> s = 251 `RTE_MIN ( tis_r [2], 252 RTE_CT_MAX_TCP_WINDOW_SCALE ); 253 e -> ags | RTE_CT_TCP_FLAG_WINDOW_SCALE ; 262 i(( size < 2|| (siz> ngth )) { 264 `tf ("scaling_and_sack_perm:something wrong\n"); 267 tis_r + size ; 268 ngth - size ; 271 } } 274 $e__tdiy_hdr ( t_hdr * thd ) 276 `tf ("T hd: src_pt=%d", `e_bsw16 ( thd -> c_pt )); 277 `tf (", d_pt=%d", `e_bsw16 ( thd -> d_pt )); 278 `tf (", st_q=%u", `e_bsw32 ( thd -> _q )); 279 `tf (",ecv_ack=%u", `e_bsw32 ( thd -> cv_ack )); 280 `tf (",da_off=%d", thd -> da_off / 16); 281 `tf (",t_ags=%02x", thd -> t_ags ); 282 `tf (",x_w=%d\n", `e_bsw16 ( thd -> rx_w )); 284 } } 286  le  287 $e__r_xn_da ( __e_unud  e__xn_ack * , 288  e__xn_da * cd , 289 __e_unud  e_mbuf * pkt ) 293 `memt (& cd -> _oc . t__da , 0, 294 ( cd -> _oc . t__da )); 295 cd -> _oc . t__da . ϡ_dex = RTE_CT_TCP_ILL_FLAG ; 297 } } 299 e__ck_ai 300 $e__t_w_ci ( 301  e__xn_ack * , 302  e__xn_da * cd , 303  e_mbuf * pkt , 304  u_syroxy , 305 ut8_t _hdr_size ) 307  t_hdr * thd = 308 ( t_hdr *) `RTE_MBUF_METADATA_UINT32_PTR ( pkt , 309 ( IP_START + _hdr_size )); 311 e__t_es w_e ; 312 ut8_t dex ; 313  e__t_e * nd = 314 & cd -> _oc . t__da . [ RTE_CT_DIR_ORIGINAL ]; 315  e__t_e * iv = 316 & cd -> _oc . t__da . [ RTE_CT_DIR_REPLY ]; 317 ut16_t w ; 319 i( CT_DEBUG ) 320 `e__tdiy_hdr ( thd ); 322 dex = `e__g_dex ( thd -> t_ags ); 323 w_e = e__t_e_b [0][ dex ][ RTE_CT_TCP_NONE ]; 325 i( `uiky ( w_e > RTE_CT_TCP_MAX )) { 326 i( CT_DEBUG ) 327 `tf ("invalidew state with flags %02x\n", 328 thd -> t_ags ); 329  RTE_CT_DROP_PACKET ; 337 i( `uiky (( w_e ! RTE_CT_TCP_SYN_SENT 338 && -> misc_tis . t_loo == 0))) { 341  RTE_CT_DROP_PACKET ; 344 i( CT_DEBUG ) 345 `tf ("ew connection with state %s\n", 346 e__t_mes [ w_e ]); 349 `e__r_xn_da ( , cd , pkt ); 350 cd -> _oc . t__da . e = w_e ; 352 nd -> d = sd-> maxd = `e__q_us_ngth ( pkt , _hdr_size ); 353 w = `e_bsw16 ( thd -> rx_w ); 354 nd -> maxw = `RTE_MAX ( w , ( ut32_t )1); 356 i( `liky ( w_e = RTE_CT_TCP_SYN_SENT )) { 358 `e__check_f_slg_d_ck_rm ( pkt , nd , 359 _hdr_size ); 361 cd -> _oc . syroxy_da . syroxd = u_syroxy ; 363 i( u_syroxy ) { 370 i( CT_DEBUG > 2) 371 `tf ("synproxy sending SYN-ACKo client\n"); 373  RTE_CT_SEND_CLIENT_SYNACK ; 382 nd -> maxd +nd-> maxw ; 383 nd -> ags = iv ->flags = 384 ( RTE_CT_TCP_FLAG_SACK_PERM | RTE_CT_TCP_FLAG_BE_LIBERAL ); 387 i( CT_DEBUG > 0) { 388 `tf ("tcp_new: sendernd=%u maxend=%u maxwin=%u scale=%i", 389 nd -> d , sd-> maxd , sd-> maxw , 390 nd -> s ); 391 `tf ("eceivernd=%u maxend=%u maxwin=%u scale=%i\n", 392 iv -> d ,eiv-> maxd , 393 iv -> maxw , 394 iv -> s ); 397  RTE_CT_OPEN_CONNECTION ; 398 } } 400  ut32_t 401 $e__t_ck ( e_mbuf * pkt , ut8_t _hdr_size ) 403  t_hdr * thd = 404 ( t_hdr *) `RTE_MBUF_METADATA_UINT32_PTR ( pkt , 405 ( IP_START + 406 _hdr_size )); 407 ut16_t daoff__bys = ( thd -> da_off & 0xf0) >> 2; 408 ut16_t ngth = daoff__bys - ( t_hdr ); 409 ut32_t ck = `e_bsw32 ( thd -> cv_ack ); 411 i( `uiky (! ngth )) 412  ck ; 414 ut8_t * tis_r = `RTE_MBUF_METADATA_UINT8_PTR ( pkt , 415 ( IP_START + _hdr_size + ( t_hdr ))); 417  ngth > 0) { 418 ut8_t code = * tis_r ; 419 ut8_t size = tis_r [1]; 420  i ; 421 ut32_t * ck_r ; 423  code ) { 424  RTE_CT_TCPOPT_TIMESTAMP : 428  RTE_CT_TCPOPT_EOL : 429  ck ; 431  RTE_CT_TCPOPT_NOP : 432 ngth --; 433 tis_r ++; 436  RTE_CT_TCPOPT_SACK : 446 i(( size >( RTE_CT_TCPOLEN_PER_SACK_ENTRY + 2)) && 447 (( size - 2) % 448 RTE_CT_TCPOLEN_PER_SACK_ENTRY ) == 0) { 451 tis_r += 6; 452  i = 0; i < ( size - 2); i += 453 RTE_CT_TCPOLEN_PER_SACK_ENTRY ) { 454 ck_r = 455 ( ut32_t *& tis_r [ i ]; 456 ut32_t ack = `e_bsw32 (* ck_r ); 458 i( `e_a ( ack , ck )) 459 ck = ack ; 461  ck ; 467 i(( size < 2|| (siz> ngth )) { 468 `tf ("rte_ct_tcp_sack: something wrong, opsize %i,", 469 size ); 470 `tf ("gth %i\n", ngth ); 471  ck ; 473 tis_r + size ; 474 ngth - size ; 476  ck ; 477 } } 483  le  484 $e__check_f_smissis ( 485  e__t * e , 486 ut8_t d , 487 ut32_t q , 488 ut32_t ack , 489 ut32_t d , 490 ut16_t w ) 492 i( e -> ϡ_d = d 493 && e -> ϡ_q = q 494 && e -> ϡ_ack = ack 495 && e -> ϡ_d = d && s-> ϡ_w = w ) 496 e -> s ++; 498 e -> ϡ_d = d ; 499 e -> ϡ_q = q ; 500 e -> ϡ_ack = ack ; 501 e -> ϡ_d = d ; 502 e -> ϡ_w = w ; 503 e -> s = 0; 505 } } 511  ut8_t 512 $e__t__wdow ( 513  e__xn_da * cd , 514  e__xn_ack * , 515  e__t * e , 516 e__pkt_dei d , 517 ut8_t dex , 518  e_mbuf * pkt , 519 ut8_t _hdr_size ) 521  e__t_e * nd = & e -> [ d ]; 522  e__t_e * iv = & e -> [! d ]; 523 ut32_t q , ack , ck , d , w , sw ; 524 ut8_t _cv_w , t_ags ; 525 e__ck_ai s ; 527 * hdr = `RTE_MBUF_METADATA_UINT32_PTR ( pkt , IP_START ); 528  t_hdr * thd = 529 ( t_hdr *) `RTE_MBUF_METADATA_UINT32_PTR ( pkt , 530 ( IP_START + _hdr_size )); 532 i( cd -> _oc . syroxy_da . syroxd ) 533 `e__adju__ack_befe_wdow_check ( cd , hdr , 534 thd , d ); 537 q = `e_bsw32 ( thd -> _q ); 538 ack = ck = `e_bsw32 ( thd -> cv_ack ); 539 w = `e_bsw16 ( thd -> rx_w ); 540 d = `e__q_us_ngth ( pkt , _hdr_size ); 541 t_ags = thd ->tcp_flags; 543 i( iv -> ags & RTE_CT_TCP_FLAG_SACK_PERM ) 544 ck = `e__t_ck ( pkt , _hdr_size ); 546 i( `uiky ( nd -> maxw == 0)) { 548 i( t_ags & RTE_CT_TCPHDR_SYN ) { 553 nd -> d = sd-> maxd =nd; 554 nd -> maxw = `RTE_MAX ( w , ( ut32_t )1); 556 `e__check_f_slg_d_ck_rm ( pkt , nd , 557 _hdr_size ); 563 i(( nd -> 564 ags & iv ->flags & 565 RTE_CT_TCP_FLAG_WINDOW_SCALE ) == 0) 566 nd -> s = iv ->scale = 0; 568 i(!( t_ags & RTE_CT_TCPHDR_ACK )) 576 nd -> d =nd; 577 sw = w << nd -> s ; 578 nd -> maxw = ( sw == 0 ? 1 : swin); 579 nd -> maxd = d + sd-> maxw ; 585 i( iv -> maxw == 0) 586 iv -> d =eiv-> maxd = ck ; 590 i((( cd -> _oc . t__da . e = RTE_CT_TCP_SYN_SENT && 591 d = RTE_CT_DIR_ORIGINAL ) || 592 ( cd -> _oc . t__da . e = RTE_CT_TCP_SYN_RECV && 593 d = RTE_CT_DIR_REPLY )&& `e_a ( d , nd ->end)) { 599 nd -> d = sd-> maxd =nd; 600 nd -> maxw = `RTE_MAX ( w , ( ut32_t )1); 602 `e__check_f_slg_d_ck_rm ( pkt , nd , 603 _hdr_size ); 606 i(!( t_ags & RTE_CT_TCPHDR_ACK ) || 607 ((( t_ags & RTE_CT_TCPHDR_RST_ACK ) == 608 RTE_CT_TCPHDR_RST_ACK && ( ack == 0))) { 610 ack = ck = iv -> d ; 613 i(( t_ags & RTE_CT_TCPHDR_RST && q == 0 && 614 cd -> _oc . t__da . e = RTE_CT_TCP_SYN_SENT ) 616 q = d = nd ->end; 619 _cv_w = ! iv -> maxw || 620 `e_a ( d , nd ->d - iv -> maxw - 1); 622 i( `e_befe ( q , nd -> maxd + 1&& _cv_w && 623 `e_befe ( ck , iv -> d + 1) && 624 `e_a ( ck , 625 iv -> d - `RTE_MAX ( nd -> maxw , 626 ( ut32_t ) RTE_MAX_ACKWIN_CONST ) - 1)) { 633 i(!( t_ags & RTE_CT_TCPHDR_SYN )) 634 w << nd -> s ; 637 sw = w + ( ck - ack ); 638 nd -> maxw = `RTE_MAX (nd->maxw, sw ); 640 i( `e_a ( d , nd ->end)) { 641 nd -> d =nd; 642 nd -> ags | RTE_CT_TCP_FLAG_DATA_UNACKNOWLEDGED ; 645 i( t_ags & RTE_CT_TCPHDR_ACK ) { 646 i(!( nd -> ags & RTE_CT_TCP_FLAG_MAXACK_SET )) { 647 nd -> maxack = ack ; 648 nd -> ags | RTE_CT_TCP_FLAG_MAXACK_SET ; 649 } i( `e_a ( ack , nd -> maxack )) 650 nd -> maxack = ack ; 654 i( iv -> maxw !0 && `e_a ( d , nd -> maxd )) 655 iv -> maxw + d - nd -> maxd ; 657 i( `e_a ( ck + w , iv -> maxd - 1)) 658 iv -> maxd = ck + `RTE_MAX ( w , ( ut32_t )1); 660 i( ack = iv -> d ) 661 iv -> ags &~ RTE_CT_TCP_FLAG_DATA_UNACKNOWLEDGED ; 664 i( dex = RTE_CT_TCP_ACK_FLAG ) 665 `e__check_f_smissis ( e , d , q , ack , 666 d , w ); 667 s = 1; 669 s = ( nd -> ags & RTE_CT_TCP_FLAG_BE_LIBERAL || 670 -> misc_tis . t_be_lib ); 673 i( CT_DEBUG ) { 674 i(! s ) { 676 `tf ("t__wdow FAILED f %p\n", cd ); 677 `tf ("rte_before(%u, %u + 1) is %d\n", 678 q , nd -> maxd + 1, 679 `e_befe ( q , nd -> maxd + 1)); 680 `tf ("!%u ||te_after(%u, %u - %u - 1) is %d\n", 681 iv -> maxw , d , nd ->end, 682 iv -> maxw , _cv_w ); 683 `tf ("e_befe(%u, %u + 1i%d\n", ck , 684 iv -> d , `e_befe ( ck , 685 iv -> d + 1)); 686 tf 688 ck , iv -> d , nd -> maxw , 689 RTE_MAX_ACKWIN_CONST , `e_a ( ck , 690 iv -> d - `RTE_MAX ( nd -> maxw , 691 ( ut32_t ) RTE_MAX_ACKWIN_CONST ) 696 i( cd -> _oc . syroxy_da . syroxd ) 697 `e__adju_rv_q_a_wdow_check ( cd , hdr , 698 thd , d ); 699  s ; 700 } } 703  le ut8_t 704 $e__choo_m_timeout_e ( 705  e__xn_ack * , 706 ut8_t e1 , 707 ut8_t e2 ) 709 i( -> _timeout . ttimeout . t_timeouts [ e1 ] < 710 -> _timeout . ttimeout . t_timeouts [ e2 ]) 711  e1 ; 713  e2 ; 714 } } 718 e__ck_ai 719 $e__vify_t_ck ( 720  e__xn_ack * , 721  e__xn_da * cd , 722  e_mbuf * pkt , 723 ut8_t key_was_杳d , 724 ut8_t _hdr_size ) 726  t_hdr * thd = (tcp_hdr *) 727 `RTE_MBUF_METADATA_UINT32_PTR ( pkt , ( IP_START + _hdr_size )); 729 e__t_es w_e , d_e ; 730 e__pkt_dei d ; 731 ut8_t dex ; 735 ut8_t timeout_e ; 737 d = ( cd -> key_is__d =! key_was_杳d ); 739 i( cd -> _oc . syroxy_da . syroxd && 740 cd -> _oc . syroxy_da . hf_eablished && 741 ! cd -> _oc . syroxy_da . xn_eablished && 742 d = RTE_CT_DIR_ORIGINAL ) { 748 `e__bufr_ck ( , cd , pkt ); 749  RTE_CT_HIJACK ; 752 ut32_t cv_ack = `e_bsw32 ( thd ->recv_ack); 753 ut32_t _q = `e_bsw32 ( thd ->sent_seq); 755  check_wdow = 1; 756 e__ck_ai tu_ai = RTE_CT_FORWARD_PACKET ; 760 d_e = cd -> _oc . t__da . e ; 761 dex = `e__g_dex ( thd -> t_ags ); 762 w_e = e__t_e_b [ d ][ dex ][ d_e ]; 764 i( w_e = RTE_CT_TCP_MAX ) { 765 i( CT_DEBUG ) { 766 `tf ("!!!!invalid stateransition from %s ", 767 e__t_mes [ d_e ]); 768 `tf ("with flags 0x%02x\n", 769 thd -> t_ags ); 772 -> cous -> pkts_dr_vid_e ++; 773  RTE_CT_DROP_PACKET ; 776 i( STATE_TRACKING && w_e ! d_e ) 777 `tf ("ew s %s\n", e__t_mes [ w_e ]); 779  w_e ) { 781  RTE_CT_TCP_ESTABLISHED : 783 i( cd -> _oc . syroxy_da . syroxd && 784 ! cd -> _oc . syroxy_da . hf_eablished && 785 ( d_e = RTE_CT_TCP_SYN_RECV )) { 793 i( STATE_TRACKING ) { 794 `tf (" synproxy first half-cnxn complete,"); 795 `tf ("ew state %s\n", 796 e__t_mes [ RTE_CT_TCP_SYN_SENT ]); 798 cd -> _oc . syroxy_da . hf_eablished = ue ; 800 `e__cvt_to_ood_rv_syn ( cd , pkt ); 801 `e__r_xn_da ( , cd , pkt ); 802 cd -> _oc . t__da . e = RTE_CT_TCP_SYN_SENT ; 804  e__t_e * nd = 805 & cd -> _oc . t__da . 806 [ RTE_CT_DIR_ORIGINAL ]; 807 ut16_t w = `e_bsw16 ( thd -> rx_w ); 809 nd -> d = sd-> maxd = 810 `e__q_us_ngth ( pkt , _hdr_size ); 811 nd -> maxw = `RTE_MAX ( w , ( ut32_t )1); 812 `e__check_f_slg_d_ck_rm ( pkt , nd , 813 _hdr_size ); 815 `e__t_xn_tim_f_t ( , cd , 816 RTE_CT_TCP_SYN_SENT ); 817  RTE_CT_SEND_SERVER_SYN ; 821  RTE_CT_TCP_SYN_RECV : 823 i( cd -> _oc . syroxy_da . syroxd && 824 cd -> _oc . syroxy_da . hf_eablished && 825 ! cd -> _oc . syroxy_da . xn_eablished ) { 833 i(! `e__t__wdow ( cd , , 834 & cd -> _oc . t__da , 835 d , dex , pkt , _hdr_size )) { 836 -> cous -> pkts_dr_outof_wdow ++; 837  RTE_CT_DROP_PACKET ; 840 i( STATE_TRACKING ) { 841 `tf ("synproxy full cnxn complete,"); 842 `tf ("ew s %s\n", e__t_mes 843 [ RTE_CT_TCP_ESTABLISHED ]); 852 `e__cvt_to_ood_rv_ack ( cd , pkt ); 854 dex = `e__g_dex ( thd -> t_ags ); 856 i(! `e__t__wdow ( cd , , 857 & cd -> _oc . t__da , 858 ! d , dex , pkt , _hdr_size )) { 859 -> cous -> pkts_dr_outof_wdow ++; 860  RTE_CT_DROP_PACKET ; 865 cd -> _oc . t__da . e = 866 RTE_CT_TCP_ESTABLISHED ; 867 -> cous -> ssis_eablished ++; 868 cd -> _oc . syroxy_da . xn_eablished = ue ; 869 cd -> _oc . t__da . ϡ_dex = dex ; 870 cd -> _oc . t__da . ϡ_d = ! d ; 872 `e__t_xn_tim_f_t ( , cd , 873 RTE_CT_TCP_ESTABLISHED ); 874 `e__a_bufd_cks ( , cd ); 876  RTE_CT_SEND_SERVER_ACK ; 879  RTE_CT_TCP_SYN_SENT : 886 i( d_e < RTE_CT_TCP_TIME_WAIT ) 894  RTE_CT_REOPEN_CNXN_AND_FORWARD_PACKET ; 896  RTE_CT_TCP_IGNORE : 912 i( cd -> _oc . syroxy_da . syroxd && 913 ! cd -> _oc . syroxy_da . xn_eablished ) 914  RTE_CT_DROP_PACKET ; 916 i( dex = RTE_CT_TCP_SAK_FLAG && 917 cd -> _oc . t__da . ϡ_dex == 918 RTE_CT_TCP_SYN_FLAG 919 && cd -> _oc . t__da . ϡ_d ! d 920 && cv_ack = cd -> _oc . t__da . ϡ_d ) { 928  e__t_e * ϡ_ = 929 & cd -> _oc . t__da . [cd->ct_protocol. 930 t__da . 931 ϡ_d ]; 935 d_e = RTE_CT_TCP_SYN_SENT ; 936 w_e = RTE_CT_TCP_SYN_RECV ; 938 ϡ_ -> d = cd -> _oc . t__da . ϡ_d ; 939 ϡ_ -> maxd = 940 cd -> _oc . t__da . ϡ_d ; 941 ϡ_ -> maxw = 942 `RTE_MAX ( cd -> _oc . t__da . ϡ_w , 943 ( ut32_t )1); 944 ϡ_ -> s = 945 cd -> _oc . t__da . ϡ_ws ; 946 cd -> _oc . t__da . ϡ_ags &= 947 ~ RTE_CT_EXP_CHALLENGE_ACK ; 948 ϡ_ -> ags = 949 cd -> _oc . t__da . ϡ_ags ; 950 `memt (& cd -> _oc . t__da . [ d ], 0, 951 ( e__t_e )); 955 cd -> _oc . t__da . ϡ_dex = dex ; 956 cd -> _oc . t__da . ϡ_d = d ; 957 cd -> _oc . t__da . ϡ_q = _q ; 958 cd -> _oc . t__da . ϡ_d = 959 `e__q_us_ngth ( pkt , _hdr_size ); 960 cd -> _oc . t__da . ϡ_w = 961 `e_bsw16 ( thd -> rx_w ); 971 i( dex = RTE_CT_TCP_SYN_FLAG && 972 d = RTE_CT_DIR_ORIGINAL ) { 973  e__t_e ; 976 `e__check_f_slg_d_ck_rm ( pkt , & , 977 _hdr_size ); 980 cd -> _oc . t__da . ϡ_ags = . ags ; 981 cd -> _oc . t__da . ϡ_ws = 982 ( . ags & RTE_CT_TCP_FLAG_WINDOW_SCALE ) == 0 ? 983 0 : . s ; 990 i( d_e = RTE_CT_TCP_LAST_ACK ) 991 cd -> _oc . t__da . ϡ_ags |= 992 RTE_CT_EXP_CHALLENGE_ACK ; 994  RTE_CT_FORWARD_PACKET ; 996  RTE_CT_TCP_TIME_WAIT : 1002 i( d_e = RTE_CT_TCP_LAST_ACK && 1003 dex = RTE_CT_TCP_ACK_FLAG && 1004 cd -> _oc . t__da . ϡ_d ! d && 1005 cd -> _oc . t__da . ϡ_dex == 1006 RTE_CT_TCP_SYN_FLAG 1007 && ( cd -> _oc . t__da . 1008 ϡ_ags & RTE_CT_EXP_CHALLENGE_ACK )) { 1010 cd -> _oc . t__da . ϡ_ags &= 1011 ~ RTE_CT_EXP_CHALLENGE_ACK ; 1012  RTE_CT_FORWARD_PACKET ; 1016  RTE_CT_TCP_CLOSE : 1018 i( dex = RTE_CT_TCP_RST_FLAG ) { 1025 i(( cd -> _oc . t__da . [! d ]. ags & 1026 RTE_CT_TCP_FLAG_MAXACK_SET ) && 1027 `e_befe ( _q , cd -> _oc . 1028 t__da . [! d ]. maxack )) { 1030 -> cous -> pkts_dr_vid_r ++; 1032  RTE_CT_DROP_PACKET ; 1035 i((( cd -> cnus = RTE_SEEN_REPLY_CONN && 1036 cd -> _oc . t__da . ϡ_dex == 1037 RTE_CT_TCP_SYN_FLAG ) || 1038 ( cd -> cnus ! RTE_ASSURED_CONN && 1039 cd -> _oc . t__da . ϡ_dex == 1040 RTE_CT_TCP_ACK_FLAG )) && 1041 cv_ack == 1042 cd -> _oc . t__da . ϡ_d ) { 1045 check_wdow = 0; 1054 i( `liky ( check_wdow )) { 1055 i( `uiky (! `e__t__wdow ( cd , , 1056 & cd -> _oc . t__da , 1057 d , dex , 1058 pkt , _hdr_size ))) { 1059 -> cous -> pkts_dr_outof_wdow ++; 1060  RTE_CT_DROP_PACKET ; 1064 i( w_e = RTE_CT_TCP_ESTABLISHED && 1065 d_e ! RTE_CT_TCP_ESTABLISHED ) 1068 -> cous -> ssis_eablished ++; 1070 cd -> _oc . t__da . ϡ_dex = dex ; 1071 cd -> _oc . t__da . ϡ_d = d ; 1073 i( dex = RTE_CT_TCP_SAK_FLAG ) 1074 cd -> cnus = RTE_SEEN_REPLY_CONN ; 1076 timeout_e = w_e ; 1078 i( cd -> _oc . t__da . s >= 1079 -> misc_tis . t_max_s ) 1080 timeout_e = 1081 `e__choo_m_timeout_e ( , timeout_e , 1082 RTE_CT_TCP_RETRANS ); 1083 i( `e__eh_dei_has_ags ( cd , 1084 RTE_CT_TCP_FLAG_DATA_UNACKNOWLEDGED )) 1085 timeout_e = 1086 `e__choo_m_timeout_e ( , timeout_e , 1087 RTE_CT_TCP_UNACK ); 1089 i( cd -> cnus ! RTE_SEEN_REPLY_CONN ) { 1090 i( thd -> t_ags & RTE_CT_TCPHDR_RST ) { 1097  RTE_CT_DESTROY_CNXN_AND_FORWARD_PACKET ; 1101 i( w_e = RTE_CT_TCP_ESTABLISHED ) 1102 timeout_e = `e__choo_m_timeout_e ( , 1103 timeout_e , 1104 RTE_CT_TCP_UNACK ); 1106 } i( cd -> cnus ! RTE_ASSURED_CONN && 1107 ( d_e = RTE_CT_TCP_SYN_RECV 1108 || d_e = RTE_CT_TCP_ESTABLISHED ) 1109 && w_e = RTE_CT_TCP_ESTABLISHED ) 1110 cd -> cnus = RTE_ASSURED_CONN ; 1112 cd -> _oc . t__da . e = w_e ; 1113 `e__t_xn_tim_f_t ( , cd , timeout_e ); 1115  tu_ai ; 1116 } } @VIL/conntrack/rte_ct_tcp.h 17 #ide __INCLUDE_RTE_CT_TCP_H__ 18  #__INCLUDE_RTE_CT_TCP_H__ ) 19  ~ 20  ~ 21  ~ 23  ~ 24  ~ 25  ~ 26  ~ 27  ~ 28  ~ 29  ~ 30  ~ 31  ~"e_xn_ackg.h " 37  #RTE_CT_TCPOPT_EOL 0 ) 38  #RTE_CT_TCPOPT_NOP 1 ) 39  #RTE_CT_TCPOPT_MSS 2 ) 40  #RTE_CT_TCPOPT_WINDOW 3 ) 41  #RTE_CT_TCPOPT_SACK_PERM 4 ) 42  #RTE_CT_TCPOPT_SACK 5 ) 43  #RTE_CT_TCPOPT_TIMESTAMP 8 ) 45  #RTE_CT_TCPOLEN_MSS 4 ) 46  #RTE_CT_TCPOLEN_WINDOW 3 ) 47  #RTE_CT_TCPOLEN_SACK_PERM 2 ) 48  #RTE_CT_TCPOLEN_TIMESTAMP 10 ) 49  #RTE_CT_TCPOLEN_PER_SACK_ENTRY 8 ) 51  #RTE_CT_TCPOLEN_MSS_ALIGNED 4 ) 52  #RTE_CT_TCPOLEN_WINDOW_ALIGNED 4 ) 53  #RTE_CT_TCPOLEN_SACK_PERM_ALIGNED 4 ) 54  #RTE_CT_TCPOLEN_TIMESTAMP_ALIGNED 12 ) 56  #RTE_CT_MAX_TCP_WINDOW_SCALE 14 ) 58  #RTE_SP_OPTIONS_MSS 1 ) 59  #RTE_SP_OPTIONS_WINDOW_SCALE 2 ) 60  #RTE_SP_OPTIONS_TIMESTAMP 4 ) 61  #RTE_SP_OPTIONS_SACK_PERM 8 ) 64 ee__ck_ai { 65 mRTE_CT_OPEN_CONNECTION , 66 mRTE_CT_DROP_PACKET , 67 mRTE_CT_FORWARD_PACKET , 68 mRTE_CT_DESTROY_CNXN_AND_FORWARD_PACKET , 69 mRTE_CT_REOPEN_CNXN_AND_FORWARD_PACKET , 70 mRTE_CT_SEND_CLIENT_SYNACK , 71 mRTE_CT_SEND_SERVER_SYN , 72 mRTE_CT_SEND_SERVER_ACK , 73 mRTE_CT_HIJACK 76 ee__cnus { 77 mRTE_INIT_CONN , 78 mRTE_SEEN_REPLY_CONN , 79 mRTE_ASSURED_CONN 84 cڡ *cڡ ge__t_mes [] = { 100 cڡ *cڡ ge__udp_mes [] = { 107  #RTE_MAX_ACKWIN_CONST 66000 ) 110  #RTE_CT_TCP_FLAG_WINDOW_SCALE 0x01 ) 113  #RTE_CT_TCP_FLAG_SACK_PERM 0x02 ) 116  #RTE_CT_TCP_FLAG_CLOSE_INIT 0x04 ) 119  #RTE_CT_TCP_FLAG_BE_LIBERAL 0x08 ) 122  #RTE_CT_TCP_FLAG_DATA_UNACKNOWLEDGED 0x10 ) 125  #RTE_CT_TCP_FLAG_MAXACK_SET 0x20 ) 127  #RTE_CT_EXP_CHALLENGE_ACK 0x40 ) 132  #RTE_CT_TCPHDR_FIN 0x01 ) 133  #RTE_CT_TCPHDR_SYN 0x02 ) 134  #RTE_CT_TCPHDR_RST 0x04 ) 135  #RTE_CT_TCPHDR_ACK 0x10 ) 137  #RTE_CT_TCPHDR_RST_ACK ( RTE_CT_TCPHDR_RST | RTE_CT_TCPHDR_ACK ) ) 142 ee__t_es { 143 mRTE_CT_TCP_NONE , 144 mRTE_CT_TCP_SYN_SENT , 145 mRTE_CT_TCP_SYN_RECV , 146 mRTE_CT_TCP_ESTABLISHED , 147 mRTE_CT_TCP_FIN_WAIT , 148 mRTE_CT_TCP_CLOSE_WAIT , 149 mRTE_CT_TCP_LAST_ACK , 150 mRTE_CT_TCP_TIME_WAIT , 151 mRTE_CT_TCP_CLOSE , 152 mRTE_CT_TCP_SYN_SENT_2 , 153 mRTE_CT_TCP_RETRANS , 154 mRTE_CT_TCP_UNACK , 155 mRTE_CT_TCP_IGNORE 158 ee__udp_es { 159 mRTE_CT_UDP_NONE , 160 mRTE_CT_UDP_UNREPLIED , 161 mRTE_CT_UDP_REPLIED , 162 mRTE_CT_UDP_MAX 167  #RTE_CT_TCP_MAX RTE_CT_TCP_UNACK ) 169 ee__pkt_dei { 170 mRTE_CT_DIR_ORIGINAL , 171 mRTE_CT_DIR_REPLY 174  se__t_e { 175 ut32_t md ; 176 ut32_t mmaxd ; 177 ut32_t mmaxw ; 178 ut32_t mmaxack ; 179 ut8_t ms ; 180 ut8_t mags ; 183  se_syroxy_tis { 184 ut8_t mtis ; 185 ut8_t mwdow_s ; 186 ut16_t mmss ; 187 ut32_t mts_v ; 188 ut32_t mts_echo_y ; 189 ut16_t ml_wdow ; 192  s__xn_da { 196  e_mbuf * mbufd_pkt_li ; 197 ut32_t mig_ood_q ; 199 ut32_t mq_diff ; 200  e_syroxy_tis mxn_tis ; 202 ut8_t msyroxd ; 203 bo mhf_eablished ; 205 bo mxn_eablished ; 208  se__t { 209  e__t_e m [2]; 210 ut8_t me ; 211 ut8_t mϡ_d ; 214 ut8_t ms ; 215 ut8_t mϡ_dex ; 216 ut32_t mϡ_q ; 217 ut32_t mϡ_ack ; 218 ut32_t mϡ_d ; 219 ut16_t mϡ_w ; 221 ut8_t mϡ_ws ; 222 ut8_t mϡ_ags ; 230  se__xn_cous { 231 ut64_t mcks_ived ; 232 ut64_t mcks_fwded ; 233 ut64_t mcks_drݳd ; 236  se__o { 237  e__t mt__da ; 238  __xn_da msyroxy_da ; 248  se__xn_da { 252  e_tim mtim ; 254  e__xn_cous mcous ; 258 ut32_t mkey [10]; 260  e__o m_oc ; 263 ut64_t mexed_timeout ; 266 ut8_t me_ud_f_tim ; 269 ut8_t mkey_is__d ; 270 ut8_t mcnus ; 271 ut8_t moc ; 273 ut8_t mty ; 276 ut8_t mg_byss_ag ; 278 ut8_t mrv_dei ; 279 t16_t mtSeqdiff ; 281 ut8_t mp_ssi_ty ; 282 ut32_t mt_yld_size ; 283 t16_t mq_ ; 284 t16_t mack_ ; 285 t16_t mq_rv ; 286 t16_t mack_rv ; 288 } g__e_che_igd ; 291  #RTE_CT_TCP_MAX_RETRANS 3 ) 293  se__ttimeout { 295 ut64_t mt_timeouts [ RTE_CT_TCP_MAX + 1]; 299  se__misc_tis { 300 ut8_t msyroxy_abd ; 301 ut32_t mt_loo ; 302 ut32_t mt_be_lib ; 303 ut32_t mt_max_s ; 306  se__udimeout { 307 ut64_t mudp_timeouts [ RTE_CT_UDP_MAX + 1]; 310  se__timeout { 311  e__ttimeout mttimeout ; 312  e__udimeout mudimeout ; 315  se__xn_ack { 316  e_hash * mrhash ; 322 ut32_t mhash_keys [ RTE_HASH_LOOKUP_BULK_MAX ][10]; 325 * mhash_key_rs [ RTE_HASH_LOOKUP_BULK_MAX ]; 326 #ifde CT_CGNAT 327 ut32_t mposis [ RTE_HASH_LOOKUP_BULK_MAX ]; 330 ut32_t mnum_xn_s ; 336  e__xn_da * mhash_b_s ; 337  e_CT_cou_block * mcous ; 339 ut64_t mhtz ; 340 ut64_t mtimg_cyes_r_timg_ ; 341 ut64_t mtimg_100ms_s ; 342 ut64_t mtimg_100ms_s_evious ; 343 ut64_t mtimg_ϡ_time ; 344  e__timeout m_timeout ; 345  e__misc_tis mmisc_tis ; 347  mme [16]; 348  e__xn_da * mw_cis [64]; 349  e_mbuf * mbufd_pkt_li ; 350  mϋ_ci ; 352 ut16_t mpor_offt ; 353 } g__e_che_igd ; 360 e__ck_ai 361 e__t_w_ci ( 362  e__xn_ack * , 363  e__xn_da * xn , 364  e_mbuf * pkt , 365  u_syroxy , 366 ut8_t _hdr_size ); 373 e__ck_ai 374 e__vify_t_ck ( 375  e__xn_ack * , 376  e__xn_da * xn , 377  e_mbuf * pkt , 378 ut8_t key_was_杳d , 379 ut8_t _hdr_size ); 386 ut8_t 387 e__udp_w_ci ( 388  e__xn_ack * , 389  e__xn_da * cd , 390  e_mbuf * pkt ); 397 e__ck_ai 398 e__udp_ck ( 399  e__xn_ack * , 400  e__xn_da * cd , 401  e_mbuf * pkt , 402 ut8_t key_was_杳d ); 411 e__t_xn_tim_f_t ( 412  e__xn_ack * , 413  e__xn_da * cd , 414 ut8_t t_e ); 417 e__t_xn_tim_f_udp ( 418  e__xn_ack * , 419  e__xn_da * cd , 420 ut8_t t_e ); 423  e__nl_xn_tim ( e__xn_da * cd ); 435 e__cvt_to_ood__syck ( e__xn_da * cd , 436  e_mbuf * d_pkt ); 439 e__cvt_to_ood_rv_syn ( e__xn_da * cd , 440  e_mbuf * d_pkt ); 443 e__cvt_to_ood_rv_ack ( e__xn_da * cd , 444  e_mbuf * d_pkt ); 451 e__adju__ack_befe_wdow_check ( 452  e__xn_da * cd , 453 * i_hdr , 454  t_hdr * thdr , 455 e__pkt_dei d ); 458 e__adju_rv_q_a_wdow_check ( 459  e__xn_da * cd , 460 * i_hdr , 461  t_hdr * thdr , 462 e__pkt_dei d ); 468 e__r_tis ( e_mbuf * pkt ,  e__xn_da * cd ); 474 e__bufr_ck ( 475  e__xn_ack * , 476  e__xn_da * cd , 477  e_mbuf * pkt ); 480 e__a_bufd_cks ( 481  e__xn_ack * , 482  e__xn_da * cd ); @VIL/conntrack/rte_ct_udp.c 17  ~ 18  ~ 19  ~"e__t.h " 20  ~"e_xn_ackg.h " 22 ut8_t $e__udp_w_ci ( __e_unud  e__xn_ack * , 23  e__xn_da * cd , 24 __e_unud  e_mbuf * pkt ) 27 cd -> cnus = RTE_INIT_CONN ; 29 } } 30 e__ck_ai $e__udp_ck ( e__xn_ack * , 31  e__xn_da * cd , 32 __e_unud  e_mbuf * pkt , 33 ut8_t key_was_杳d ) 35 e__pkt_dei d ; 37 d = ( cd -> key_is__d =! key_was_杳d ); 39 i( d = RTE_CT_DIR_REPLY && 40 cd -> cnus = RTE_INIT_CONN ) { 41 `e__t_xn_tim_f_udp ( , cd , RTE_CT_UDP_REPLIED ); 42 cd -> cnus = RTE_ASSURED_CONN ; 43 } i( d = RTE_CT_DIR_REPLY && 44 cd -> cnus = RTE_ASSURED_CONN ) 45 `e__t_xn_tim_f_udp ( , cd , RTE_CT_UDP_REPLIED ); 47 `e__t_xn_tim_f_udp ( , cd , RTE_CT_UDP_UNREPLIED ); 48  RTE_CT_FORWARD_PACKET ; 49 } } @VIL/l2l3_stack/bond.c 17  ~ 18  ~"tsx.h " 19 r_ma_t ifm ; 20 ut8_t ifm_debug ; 21  USE_RTM_LOCKS ; 22 e_rwlock_t rwlock ; 24  $ifm_bd_pt_ (cڡ * me ,  mode , pt_cfig_t * ptcf ) 26  pt_id ; 27 l2_phy_r_t * bd_pt ; 28 i( ifm_debug && IFM_DEBUG_CONFIG ) 29 `RTE_LOG ( INFO , IFM , "%s: i/m%p, mod%d\n\r", __FUNCTION__ , 30 me , mode ); 31 i( me = NULL ) { 32 `RTE_LOG ( ERR , IFM , "%s: Paramame cannot be NULL\n\r", 33 __FUNCTION__ ); 34  IFM_FAILURE ; 36 i( mode < 0 || mode > 6) { 37 `RTE_LOG ( ERR , IFM , "%s: Param mode should be withing 0o 6\n\r", 38 __FUNCTION__ ); 39  IFM_FAILURE ; 41 i( ptcf = NULL ) { 42 `RTE_LOG ( ERR , IFM , "%s: Paramortconf cannot be NULL\n\r", 43 __FUNCTION__ ); 44  IFM_FAILURE ; 46 bd_pt = `ifm_g_pt_by_me ( me ); 47 i( bd_pt = NULL ) { 48 i( ifm_debug && IFM_DEBUG_CONFIG ) 49 `RTE_LOG ( INFO , IFM , "Cifm_pt_tu%s\n\r", me ); 50 pt_id = `e_h_bd_ ( me , mode , 0); 51 i( pt_id < 0) { 52 `RTE_LOG ( ERR , IFM , 54 __FUNCTION__ , me , mode ); 55  IFM_FAILURE ; 57 `RTE_LOG ( INFO , IFM , 59 "mod%u.\n\r", __FUNCTION__ , me , pt_id , 60 `e_h_dev_sock_id ( pt_id ), mode ); 62 bd_pt = ( l2_phy_r_t * `e_zmloc ( NULL , 64 ( l2_phy_r_t ), 65 RTE_CACHE_LINE_SIZE ); 66 bd_pt -> pmdid = pt_id ; 67 `y ( bd_pt -> iame , me , IFM_IFNAME_LEN ); 68 `memy (& bd_pt -> pt_cfig , ptcf , 69 ( pt_cfig_t )); 70 bd_pt -> ags | IFM_MASTER ; 71  bd_pt * bd_fo ; 72 bd_fo = ( bd_pt *) `e_zmloc ( NULL , 74 bd_pt ), 75 RTE_CACHE_LINE_SIZE ); 76 bd_fo -> sock_id = `e_h_dev_sock_id ( pt_id ); 77 bd_fo -> mode = mode; 78 bd_fo -> bd_ptid = pt_id ; 79 bd_pt -> bd_cfig = bd_fo ; 80 i( mode = IFM_BONDING_MODE_8023AD ) 81 bd_pt -> tx_buf_n = 82 (2 * `RTE_ETH_TX_BUFFER_SIZE ( IFM_BURST_SIZE )) * 83 RTE_MAX_ETHPORTS ; 85 ifm . pt_li [ pt_id ] = bd_pt ; 86 i( ifm_debug && IFM_DEBUG_CONFIG ) 87 `RTE_LOG ( INFO , IFM , 89 __FUNCTION__ , me , pt_id ); 91 `RTE_LOG ( INFO , IFM , "%s: Port %slreadyxists inhe" 92 "܈li\n\r", __FUNCTION__ , me ); 93 i( ifm_debug & IFM_DEBUG_LOCKS ) 94 `RTE_LOG ( INFO , IFM , "%s: Acquiringock @ %d\n\r", 95 __FUNCTION__ , __LINE__ ); 96 i( USE_RTM_LOCKS ) 97 `m_lock (); 99 `e_rwlock_wre_lock (& rwlock ); 101 i(!( bd_pt -> ags & IFM_MASTER )) { 102 `RTE_LOG ( ERR , IFM , "%s: Previouslyort %s wasot " 103 "cfigudBdt\n\r", __FUNCTION__ , 104 me ); 105 i( ifm_debug & IFM_DEBUG_LOCKS ) 106 `RTE_LOG ( INFO , IFM , 108 __FUNCTION__ , __LINE__ ); 109 i( USE_RTM_LOCKS ) 110 `m_uock (); 112 `e_rwlock_wre_uock (& rwlock ); 113  IFM_FAILURE ; 115 i( bd_pt -> bd_cfig -> mode != mode) { 116 i( `e_h_bd_mode_t ( bd_pt -> pmdid , mode ) < 0) { 117 `RTE_LOG ( ERR , IFM , "%s:te_eth_bond_mode_set " 118 "ed\n\r", __FUNCTION__ ); 119 i( ifm_debug & IFM_DEBUG_LOCKS ) 120 `RTE_LOG ( INFO , IFM , 122 __FUNCTION__ , __LINE__ ); 123 i( USE_RTM_LOCKS ) 124 `m_uock (); 126 `e_rwlock_wre_uock (& rwlock ); 127  IFM_FAILURE ; 130 bd_pt -> bd_cfig -> mode = 131 `e_h_bd_mode_g ( bd_pt -> pmdid ); 133 bd_pt -> bd_cfig -> xm_picy = 134 `e_h_bd_xm_picy_g ( bd_pt -> pmdid ); 135 i( ifm_debug && IFM_DEBUG_CONFIG ) 136 `RTE_LOG ( INFO , IFM , 138 "\n\r", __FUNCTION__ , bd_pt -> pmdid , 139 bd_pt -> bd_cfig -> mode , 140 bd_pt -> bd_cfig -> xm_picy ); 142 pt_id = bd_pt -> pmdid ; 143 i( ifm_debug & IFM_DEBUG_LOCKS ) 144 `RTE_LOG ( INFO , IFM , "%s: Acquiringock @ %d\n\r", 145 __FUNCTION__ , __LINE__ ); 146 i( USE_RTM_LOCKS ) 147 `m_uock (); 149 `e_rwlock_wre_uock (& rwlock ); 151  pt_id ; 152 } } 154  $ifm_bd_pt_de (cڡ * me ) 156 l2_phy_r_t * bd_pt ; 157 i( me = NULL ) { 158 `RTE_LOG ( ERR , IFM , "%s: Paramame cannot be NULL\n\r", 159 __FUNCTION__ ); 160  IFM_FAILURE ; 162 bd_pt = `ifm_g_pt_by_me ( me ); 163 i( ifm_debug & IFM_DEBUG_LOCKS ) 164 `RTE_LOG ( INFO , IFM , "%s: Acquiring WRock @ %d\n\r", 165 __FUNCTION__ , __LINE__ ); 166 i( USE_RTM_LOCKS ) 167 `m_lock (); 169 `e_rwlock_wre_lock (& rwlock ); 170 i( bd_pt = NULL ) { 171 `RTE_LOG ( ERR , IFM , "%s: Given bondort withame %sot" 172 " found ithli\n\r", __FUNCTION__ , me ); 173  IFM_FAILURE ; 175 i(!( bd_pt -> ags & IFM_MASTER )) { 176 `RTE_LOG ( ERR , IFM , "%s: Given bondort %s isot " 177 "cfigud in bdt\n\r", __FUNCTION__ , me ); 178 i( ifm_debug & IFM_DEBUG_LOCKS ) 179 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 180 __FUNCTION__ , __LINE__ ); 181 i( USE_RTM_LOCKS ) { 182 `m_uock (); 184 `e_rwlock_wre_uock (& rwlock ); 186  IFM_FAILURE ; 188 i( bd_pt -> bd_cfig && bd_pt->bd_cfig-> ave_cou > 0) { 189 `RTE_LOG ( ERR , IFM , "%s: First unbindll slave " 190 "ptomhbd܈%s\n\r", __FUNCTION__ , me ); 191 i( ifm_debug & IFM_DEBUG_LOCKS ) 192 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 193 __FUNCTION__ , __LINE__ ); 194 i( USE_RTM_LOCKS ) { 195 `m_uock (); 197 `e_rwlock_wre_uock (& rwlock ); 199  IFM_FAILURE ; 201  t ; 202 t = `e_h_bd_ ( me ); 203 i( t < 0) { 204 `RTE_LOG ( ERR , IFM , "%s: Failedo delete " 205 "bd܈%s\n\r", __FUNCTION__ , me ); 206 i( ifm_debug & IFM_DEBUG_LOCKS ) 207 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 208 __FUNCTION__ , __LINE__ ); 209 i( USE_RTM_LOCKS ) { 210 `m_uock (); 212 `e_rwlock_wre_uock (& rwlock ); 214  IFM_FAILURE ; 216 i( ifm_debug & IFM_DEBUG_CONFIG ) 217 `RTE_LOG ( INFO , IFM , "%s: Bondort %s deleted successfully\n\r", 218 __FUNCTION__ , me ); 220 i( bd_pt && bd_pt-> bd_cfig ! NULL ) { 221 `e_ ( bd_pt -> bd_cfig ); 222 bd_pt -> bd_cfig = NULL ; 224 i( ifm_debug & IFM_DEBUG_LOCKS ) 225 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 226 __FUNCTION__ , __LINE__ ); 227 i( USE_RTM_LOCKS ) 228 `m_uock (); 230 `e_rwlock_wre_uock (& rwlock ); 231 `ifm_move_pt_das ( bd_pt -> pmdid ); 233  IFM_SUCCESS ; 234 } } 236  $ifm_add_ave_pt ( ut8_t bded_pt_id , ut8_ ave_pt_id ) 238 l2_phy_r_t * bd_pt , * ave_pt ; 239 bd_pt = `ifm_g_pt ( bded_pt_id ); 241 ave_pt = `ifm_g_pt ( ave_pt_id ); 243 i( ifm_debug & IFM_DEBUG ) 244 `RTE_LOG ( INFO , IFM , "%s: i/p bond id %u, slave id %u\n\r", 245 __FUNCTION__ , bded_pt_id , ave_pt_id ); 246 i( ifm_debug & IFM_DEBUG_LOCKS ) 247 `RTE_LOG ( INFO , IFM , "%s: Acquiring WRock @ %d\n\r", 248 __FUNCTION__ , __LINE__ ); 249 i( USE_RTM_LOCKS ) { 250 `m_lock (); 252 `e_rwlock_wre_lock (& rwlock ); 254 i( bd_pt = NULL ) { 255 `RTE_LOG ( ERR , IFM , "%s: Given bondort %u isotvailable in" 256 "܈li.\n\r", __FUNCTION__ , bded_pt_id ); 257 i( ifm_debug & IFM_DEBUG_LOCKS ) 258 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 259 __FUNCTION__ , __LINE__ ); 260 i( USE_RTM_LOCKS ) { 261 `m_uock (); 263 `e_rwlock_wre_uock (& rwlock ); 265  IFM_FAILURE ; 267 i( ave_pt = NULL ) { 268 `RTE_LOG ( ERR , IFM , "%s: Given slaveort %u isotvailable in " 269 "p܈li.\n\r", __FUNCTION__ , ave_pt_id ); 270 i( ifm_debug & IFM_DEBUG_LOCKS ) 271 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 272 __FUNCTION__ , __LINE__ ); 273 i( USE_RTM_LOCKS ) { 274 `m_uock (); 276 `e_rwlock_wre_uock (& rwlock ); 278  IFM_FAILURE ; 280 i( bd_pt && !(bd_pt-> ags & IFM_MASTER )) { 281 `RTE_LOG ( ERR , IFM , "%s: Given bondort %u isot configured " 282 "aMat. %u\n\r", __FUNCTION__ , bded_pt_id , 283 bd_pt -> ags & IFM_MASTER ); 284 i( ifm_debug & IFM_DEBUG_LOCKS ) 285 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 286 __FUNCTION__ , __LINE__ ); 287 i( USE_RTM_LOCKS ) { 288 `m_uock (); 290 `e_rwlock_wre_uock (& rwlock ); 292  IFM_FAILURE ; 294 i( bd_pt && bd_pt-> bd_cfig 295 && bd_pt -> bd_cfig -> ave_cou = RTE_MAX_ETHPORTS ) { 296 `RTE_LOG ( ERR , IFM , 298 __FUNCTION__ , RTE_MAX_ETHPORTS ); 299 i( ifm_debug & IFM_DEBUG_LOCKS ) 300 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 301 __FUNCTION__ , __LINE__ ); 302 i( USE_RTM_LOCKS ) { 303 `m_uock (); 305 `e_rwlock_wre_uock (& rwlock ); 307  IFM_FAILURE ; 309 i( ave_pt && sve_pt-> ags & IFM_SLAVE ) { 311 i( ave_pt -> bd_cfig ! NULL ) { 312 i( bded_pt_id != 313 ave_pt -> bd_cfig -> bd_ptid ) { 314 `RTE_LOG ( ERR , IFM , 317 __FUNCTION__ , ave_pt_id , 318 ave_pt -> bd_cfig -> bd_ptid ); 319 i( ifm_debug & IFM_DEBUG_LOCKS ) 320 `RTE_LOG ( INFO , IFM , 322 __FUNCTION__ , __LINE__ ); 323 i( USE_RTM_LOCKS ) { 324 `m_uock (); 326 `e_rwlock_wre_uock (& rwlock ); 328  IFM_FAILURE ; 330 i( ifm_debug & IFM_DEBUG ) 331 `RTE_LOG ( INFO , IFM , 333 __FUNCTION__ , ave_pt_id , 334 bded_pt_id ); 335 i( ifm_debug & IFM_DEBUG_LOCKS ) 336 `RTE_LOG ( INFO , IFM , 338 __FUNCTION__ , __LINE__ ); 339 i( USE_RTM_LOCKS ) { 340 `m_uock (); 342 `e_rwlock_wre_uock (& rwlock ); 344  IFM_SUCCESS ; 348 i( bd_pt -> bd_cfig && bd_pt->bd_cfig-> ave_cou && 349 bd_pt -> lk_d ! ave_pt ->link_speed 350 && bd_pt -> lk_duex ! ave_pt ->link_duplex) { 351 `RTE_LOG ( ERR , IFM , 353 __FUNCTION__ ); 354 i( ifm_debug & IFM_DEBUG_LOCKS ) 355 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 356 __FUNCTION__ , __LINE__ ); 357 i( USE_RTM_LOCKS ) { 358 `m_uock (); 360 `e_rwlock_wre_uock (& rwlock ); 362  IFM_FAILURE ; 364 i( ifm_debug & IFM_DEBUG ) 365 `RTE_LOG ( INFO , IFM , "%s: Slaveort %u Masterort %u\n\r", 366 __FUNCTION__ , ave_pt_id , bded_pt_id ); 367  t ; 368 t = `e_h_bd_ave_add ( bd_pt -> pmdid , ave_pt ->pmdid); 369 i( t < 0) { 370 `RTE_LOG ( ERR , IFM , "%s: Failedodd slaveort %uo bond " 371 "p܈%u.\n\r", __FUNCTION__ , ave_pt -> pmdid , 372 bd_pt -> pmdid ); 373 i( ifm_debug & IFM_DEBUG_LOCKS ) 374 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 375 __FUNCTION__ , __LINE__ ); 376 i( USE_RTM_LOCKS ) { 377 `m_uock (); 379 `e_rwlock_wre_uock (& rwlock ); 381  IFM_FAILURE ; 383 ave_pt -> ags | IFM_SLAVE ; 385 i( bd_pt -> bd_cfig ) { 386 bd_pt -> bd_cfig -> xm_picy = 387 `e_h_bd_xm_picy_g ( bd_pt -> pmdid ); 388 bd_pt -> bd_cfig -> _ms = 389 `e_h_bd_lk_mڙܚg_g ( bd_pt -> pmdid ); 390 bd_pt -> bd_cfig -> lk_up_day_ms = 391 `e_h_bd_lk_up__day_g ( bd_pt -> pmdid ); 392 bd_pt -> bd_cfig -> lk_down_day_ms = 393 `e_h_bd_lk_down__day_g ( bd_pt -> pmdid ); 394 bd_pt -> bd_cfig -> imy = 395 `e_h_bd_imy_g ( bd_pt -> pmdid ); 396 bd_pt -> bd_cfig -> ave_cou = 397 `e_h_bd_aves_g ( bd_pt -> pmdid , 398 bd_pt -> bd_cfig -> aves , 399 RTE_MAX_ETHPORTS ); 400 bd_pt -> bd_cfig -> aive_ave_cou = 401 `e_h_bd_aive_aves_g ( bd_pt -> pmdid , 402 bd_pt -> bd_cfig -> 403 aive_aves , 404 RTE_MAX_ETHPORTS ); 405 ave_pt -> bd_cfig = bd_pt ->bond_config; 406 i( ifm_debug & IFM_DEBUG ) 407 `RTE_LOG ( INFO , IFM , "%s: Slave count is %u\n\r", 408 __FUNCTION__ , 409 bd_pt -> bd_cfig -> ave_cou ); 410 i( bd_pt -> bd_cfig -> ave_cou == 1) { 411 t = 412 `ifm_pt_tup ( bd_pt -> pmdid , 413 &( bd_pt -> pt_cfig )); 414 i( t < 0) { 415 `RTE_LOG ( ERR , IFM , 417 __FUNCTION__ , bd_pt -> pmdid ); 418 i( ifm_debug & IFM_DEBUG_LOCKS ) 419 `RTE_LOG ( INFO , IFM , 421 __FUNCTION__ , __LINE__ ); 422 i( USE_RTM_LOCKS ) { 423 `m_uock (); 425 `e_rwlock_wre_uock (& rwlock ); 427  IFM_FAILURE ; 430 i( ifm_debug & IFM_DEBUG ) 431 `RTE_LOG ( INFO , IFM , "%s: Skipping" 432 "܈tup\n\r", __FUNCTION__ ); 435 i( ifm_debug & IFM_DEBUG_LOCKS ) 436 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 437 __FUNCTION__ , __LINE__ ); 438 i( USE_RTM_LOCKS ) { 439 `m_uock (); 441 `e_rwlock_wre_uock (& rwlock ); 443  IFM_SUCCESS ; 444 } } 446  $ifm_move_ave_pt ( ut8_t bded_pt_id , ut8_ ave_pt_id ) 448 l2_phy_r_t * bd_pt , * ave_pt ; 450 bd_pt = `ifm_g_pt ( bded_pt_id ); 452 ave_pt = `ifm_g_pt ( ave_pt_id ); 455 i( ifm_debug & IFM_DEBUG_LOCKS ) 456 `RTE_LOG ( INFO , IFM , "%s: Acquiring WRock @ %d\n\r", 457 __FUNCTION__ , __LINE__ ); 458 i( USE_RTM_LOCKS ) { 459 `m_lock (); 461 `e_rwlock_wre_lock (& rwlock ); 463 i( bd_pt = NULL ) { 464 `RTE_LOG ( ERR , IFM , "%s: Given bondort %u isotvailable " 465 "܈li.\n\r", __FUNCTION__ , bded_pt_id ); 466 i( ifm_debug & IFM_DEBUG_LOCKS ) 467 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 468 __FUNCTION__ , __LINE__ ); 469 i( USE_RTM_LOCKS ) 470 `m_uock (); 472 `e_rwlock_wre_uock (& rwlock ); 473  IFM_FAILURE ; 475 i( ave_pt = NULL ) { 476 `RTE_LOG ( ERR , IFM , "%s: Given slaveort %u isotvailable " 477 "܈li.\n\r", __FUNCTION__ , ave_pt_id ); 478 i( ifm_debug & IFM_DEBUG_LOCKS ) 479 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 480 __FUNCTION__ , __LINE__ ); 481 i( USE_RTM_LOCKS ) 482 `m_uock (); 484 `e_rwlock_wre_uock (& rwlock ); 485  IFM_FAILURE ; 487 i( bd_pt && !(bd_pt-> ags & IFM_MASTER )) { 488 `RTE_LOG ( ERR , IFM , "%s: Given bondort %u isot configured " 489 "aMat.\n\r", __FUNCTION__ , bded_pt_id ); 490 i( ifm_debug & IFM_DEBUG_LOCKS ) 491 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 492 __FUNCTION__ , __LINE__ ); 493 i( USE_RTM_LOCKS ) 494 `m_uock (); 496 `e_rwlock_wre_uock (& rwlock ); 497  IFM_FAILURE ; 499 i( ave_pt && !(ave_pt-> ags & IFM_SLAVE )) { 500 `RTE_LOG ( ERR , IFM , "%s: Given slaveort %u isot configured" 501 "avpt.\n\r", __FUNCTION__ , ave_pt_id ); 502 i( ifm_debug & IFM_DEBUG_LOCKS ) 503 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 504 __FUNCTION__ , __LINE__ ); 505 i( USE_RTM_LOCKS ) 506 `m_uock (); 508 `e_rwlock_wre_uock (& rwlock ); 509  IFM_FAILURE ; 511  i ; 512  found = 0; 513  i = 0; i < bd_pt -> bd_cfig -> ave_cou ; i++) { 514 i( ave_pt_id = bd_pt -> bd_cfig -> aves [ i ]) { 515 found = 1; 519 i(! found ) { 520 `RTE_LOG ( ERR , IFM , "%s: Given slaveort %u isot binded " 521 "wh bd܈%u\n\r", __FUNCTION__ , ave_pt_id , 522 bded_pt_id ); 523 i( ifm_debug & IFM_DEBUG_LOCKS ) 524 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 525 __FUNCTION__ , __LINE__ ); 526 i( USE_RTM_LOCKS ) 527 `m_uock (); 529 `e_rwlock_wre_uock (& rwlock ); 530  IFM_FAILURE ; 532 i( `e_h_bd_ave_move ( bded_pt_id , ave_pt_id ) < 0) { 533 `RTE_LOG ( ERR , IFM , "%s: Failedo unbind slaveort %u" 534 " from bd܈%u\n\r", __FUNCTION__ , ave_pt_id , 535 bded_pt_id ); 536 i( ifm_debug & IFM_DEBUG_LOCKS ) 537 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 538 __FUNCTION__ , __LINE__ ); 539 i( USE_RTM_LOCKS ) 540 `m_uock (); 542 `e_rwlock_wre_uock (& rwlock ); 543  IFM_FAILURE ; 545 ave_pt -> ags &~ IFM_SLAVE ; 546 ave_pt -> bd_cfig = NULL ; 547 bd_pt -> bd_cfig -> imy = 548 `e_h_bd_imy_g ( bd_pt -> pmdid ); 549 bd_pt -> bd_cfig -> ave_cou = 550 `e_h_bd_aves_g ( bd_pt -> pmdid , 551 bd_pt -> bd_cfig -> aves , 552 RTE_MAX_ETHPORTS ); 553 bd_pt -> bd_cfig -> aive_ave_cou = 554 `e_h_bd_aive_aves_g ( bd_pt -> pmdid , 555 bd_pt -> bd_cfig -> 556 aive_aves , RTE_MAX_ETHPORTS ); 558 i( ifm_debug & IFM_DEBUG ) 559 `RTE_LOG ( ERR , IFM , "%s: Unbinded slaveort %u fromhe bond " 560 "p܈%u %d\n\r", __FUNCTION__ , ave_pt_id , 561 bded_pt_id , 562 `e_h_bd_imy_g ( bd_pt -> pmdid )); 563 i( ifm_debug & IFM_DEBUG_LOCKS ) 564 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 565 __FUNCTION__ , __LINE__ ); 566 i( USE_RTM_LOCKS ) 567 `m_uock (); 569 `e_rwlock_wre_uock (& rwlock ); 570  IFM_SUCCESS ; 571 } } 573  $t_bd_mode ( ut8_t bded_pt_id , ut8_ mode ) 575 l2_phy_r_t * bd_pt ; 576 bd_pt = `ifm_g_pt ( bded_pt_id ); 579 i( ifm_debug & IFM_DEBUG_LOCKS ) 580 `RTE_LOG ( INFO , IFM , "%s: Acquiring WRock @ %d\n\r", 581 __FUNCTION__ , __LINE__ ); 582 i( USE_RTM_LOCKS ) 583 `m_lock (); 585 `e_rwlock_wre_lock (& rwlock ); 586 if( bd_pt ) 587 `ifm_move_pt_das ( bd_pt -> pmdid ); 588 i( bd_pt = NULL ) { 589 `RTE_LOG ( ERR , IFM , "%s: Given bondort %u isotvailable in" 590 "܈li.\n\r", __FUNCTION__ , bded_pt_id ); 591  IFM_FAILURE ; 593 i( bd_pt && bd_pt-> bd_cfig -> mode == mode) { 594 i( ifm_debug & IFM_DEBUG ) 595 `RTE_LOG ( INFO , IFM , 597 " mod%u\n\r.", __FUNCTION__ , mode ); 598 i( ifm_debug & IFM_DEBUG_LOCKS ) 599 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 600 __FUNCTION__ , __LINE__ ); 601 i( USE_RTM_LOCKS ) 602 `m_uock (); 604 `e_rwlock_wre_uock (& rwlock ); 605 `ifm_move_pt_das ( bd_pt -> pmdid ); 606  IFM_SUCCESS ; 609 i( `e_h_bd_mode_t ( bd_pt -> pmdid , mode ) < 0) { 610 `RTE_LOG ( ERR , IFM , 612 __FUNCTION__ , mode , bd_pt -> pmdid ); 613 i( ifm_debug & IFM_DEBUG_LOCKS ) 614 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 615 __FUNCTION__ , __LINE__ ); 616 i( USE_RTM_LOCKS ) 617 `m_uock (); 619 `e_rwlock_wre_uock (& rwlock ); 620 `ifm_move_pt_das ( bd_pt -> pmdid ); 621  IFM_FAILURE ; 624 bd_pt -> bd_cfig -> mode = `e_h_bd_mode_g (bd_pt-> pmdid ); 626 bd_pt -> bd_cfig -> xm_picy = 627 `e_h_bd_xm_picy_g ( bd_pt -> pmdid ); 628 i( ifm_debug & IFM_DEBUG ) 629 `RTE_LOG ( INFO , IFM , 631 "\n\r.", __FUNCTION__ , bd_pt -> pmdid , 632 bd_pt -> bd_cfig -> mode , 633 bd_pt -> bd_cfig -> xm_picy ); 634 i( ifm_debug & IFM_DEBUG_LOCKS ) 635 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 636 __FUNCTION__ , __LINE__ ); 637 i( USE_RTM_LOCKS ) 638 `m_uock (); 640 `e_rwlock_wre_uock (& rwlock ); 641 `ifm_move_pt_das ( bd_pt -> pmdid ); 642  IFM_SUCCESS ; 643 } } 645  $g_bd_mode ( ut8_t bded_pt_id ) 647 l2_phy_r_t * bd_pt ; 648 bd_pt = `ifm_g_pt ( bded_pt_id ); 651 i( ifm_debug & IFM_DEBUG_LOCKS ) 652 `RTE_LOG ( INFO , IFM , "%s: Acquiring RDock @ %d\n\r", 653 __FUNCTION__ , __LINE__ ); 654 i( USE_RTM_LOCKS ) { 655 `m_lock (); 657 `e_rwlock_ad_lock (& rwlock ); 659 i( bd_pt = NULL ) { 660 `RTE_LOG ( ERR , IFM , "%s: Given bondort %u isotvailable in" 661 "܈li.\n\r", __FUNCTION__ , bded_pt_id ); 662 i( ifm_debug & IFM_DEBUG_LOCKS ) 663 `RTE_LOG ( INFO , IFM , "%s: Releasing RDock @ %d\n\r", 664 __FUNCTION__ , __LINE__ ); 665 i( USE_RTM_LOCKS ) { 666 `m_uock (); 668 `e_rwlock_ad_uock (& rwlock ); 670  IFM_FAILURE ; 672 ut8_t mode = bd_pt -> bd_cfig ->mode; 673 i( ifm_debug & IFM_DEBUG_LOCKS ) 674 `RTE_LOG ( INFO , IFM , "%s: Releasing RDock @ %d\n\r", 675 __FUNCTION__ , __LINE__ ); 676 i( USE_RTM_LOCKS ) { 677 `m_uock (); 679 `e_rwlock_ad_uock (& rwlock ); 681  mode ; 682 } } 684  $t_bd_imy ( ut8_t bded_pt_id , ut8_ ave_pt_id ) 686 l2_phy_r_t * bd_pt ; 687 l2_phy_r_t * ave_pt ; 688 bd_pt = `ifm_g_pt ( bded_pt_id ); 690 ave_pt = `ifm_g_pt ( ave_pt_id ); 693 i( ifm_debug & IFM_DEBUG_LOCKS ) 694 `RTE_LOG ( INFO , IFM , "%s: Acquiring WRock @ %d\n\r", 695 __FUNCTION__ , __LINE__ ); 696 i( USE_RTM_LOCKS ) 697 `m_lock (); 699 `e_rwlock_wre_lock (& rwlock ); 700 i( bd_pt = NULL ) { 701 `RTE_LOG ( ERR , IFM , "%s: Given bondort %u isotvailable in" 702 "܈li.\n\r", __FUNCTION__ , bded_pt_id ); 703 i( ifm_debug & IFM_DEBUG_LOCKS ) 704 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 705 __FUNCTION__ , __LINE__ ); 706 i( USE_RTM_LOCKS ) 707 `m_uock (); 709 `e_rwlock_wre_uock (& rwlock ); 710  IFM_FAILURE ; 712 i( ave_pt = NULL ) { 713 `RTE_LOG ( ERR , IFM , "%s: Given slaveort %u isotvailable in" 714 "܈li.\n\r", __FUNCTION__ , bded_pt_id ); 715 i( ifm_debug & IFM_DEBUG_LOCKS ) 716 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 717 __FUNCTION__ , __LINE__ ); 718 i( USE_RTM_LOCKS ) 719 `m_uock (); 721 `e_rwlock_wre_uock (& rwlock ); 722  IFM_FAILURE ; 724  i ; 725  found = 0; 726  i = 0; i < bd_pt -> bd_cfig -> ave_cou ; i++) { 727 i( ave_pt_id = bd_pt -> bd_cfig -> aves [ i ]) { 728 found = 1; 732 i(! found ) { 733 `RTE_LOG ( ERR , IFM , "%s: Slaveort %u isot binded " 735 __FUNCTION__ , ave_pt_id , bded_pt_id ); 736 i( ifm_debug & IFM_DEBUG_LOCKS ) 737 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 738 __FUNCTION__ , __LINE__ ); 739 i( USE_RTM_LOCKS ) 740 `m_uock (); 742 `e_rwlock_wre_uock (& rwlock ); 743  IFM_FAILURE ; 746 i( bd_pt -> bd_cfig -> imy = ave_pt_id ) { 747 i( ifm_debug & IFM_DEBUG ) 748 `RTE_LOG ( INFO , IFM , 750 "%u\n\r.", __FUNCTION__ , bded_pt_id , 751 ave_pt_id ); 752 i( ifm_debug & IFM_DEBUG_LOCKS ) 753 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 754 __FUNCTION__ , __LINE__ ); 755 i( USE_RTM_LOCKS ) 756 `m_uock (); 758 `e_rwlock_wre_uock (& rwlock ); 759  IFM_SUCCESS ; 762 i( `e_h_bd_imy_t ( bd_pt -> pmdid , ave_pt ->pmdid) < 0) { 763 `RTE_LOG ( ERR , IFM , 765 __FUNCTION__ , ave_pt -> pmdid , bd_pt ->pmdid); 766 i( ifm_debug & IFM_DEBUG_LOCKS ) 767 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 768 __FUNCTION__ , __LINE__ ); 769 i( USE_RTM_LOCKS ) 770 `m_uock (); 772 `e_rwlock_wre_uock (& rwlock ); 773  IFM_FAILURE ; 776 bd_pt -> bd_cfig -> imy = 777 `e_h_bd_imy_g ( bd_pt -> pmdid ); 778 i( ifm_debug & IFM_DEBUG ) 779 `RTE_LOG ( INFO , IFM , 781 __FUNCTION__ , bd_pt -> bd_cfig -> imy , 782 bd_pt -> pmdid ); 783 i( ifm_debug & IFM_DEBUG_LOCKS ) 784 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 785 __FUNCTION__ , __LINE__ ); 786 i( USE_RTM_LOCKS ) 787 `m_uock (); 789 `e_rwlock_wre_uock (& rwlock ); 790  IFM_SUCCESS ; 791 } } 793  $g_bd_imy_pt ( ut8_t bded_pt_id ) 795 l2_phy_r_t * bd_pt ; 796 bd_pt = `ifm_g_pt ( bded_pt_id ); 799 i( ifm_debug & IFM_DEBUG_LOCKS ) 800 `RTE_LOG ( INFO , IFM , "%s: Acquiring RDock @ %d\n\r", 801 __FUNCTION__ , __LINE__ ); 802 i( USE_RTM_LOCKS ) { 803 `m_lock (); 805 `e_rwlock_ad_lock (& rwlock ); 807 i( bd_pt = NULL ) { 808 `RTE_LOG ( ERR , IFM , "%s: Given bondort %u isotvailable in" 809 "܈li.\n\r", __FUNCTION__ , bded_pt_id ); 810 i( ifm_debug & IFM_DEBUG_LOCKS ) 811 `RTE_LOG ( INFO , IFM , "%s: Releasing RDock @ %d\n\r", 812 __FUNCTION__ , __LINE__ ); 813 i( USE_RTM_LOCKS ) { 814 `m_uock (); 816 `e_rwlock_ad_uock (& rwlock ); 818  IFM_FAILURE ; 820 ut8_t imy = bd_pt -> bd_cfig ->primary; 821 i( ifm_debug & IFM_DEBUG_LOCKS ) 822 `RTE_LOG ( INFO , IFM , "%s: Releasing RDock @ %d\n\r", 823 __FUNCTION__ , __LINE__ ); 824 i( USE_RTM_LOCKS ) { 825 `m_uock (); 827 `e_rwlock_ad_uock (& rwlock ); 829  imy ; 830 } } 832  $g_bd_ave_cou ( ut8_t bded_pt_id ) 834 l2_phy_r_t * bd_pt ; 835 bd_pt = `ifm_g_pt ( bded_pt_id ); 838 i( ifm_debug & IFM_DEBUG_LOCKS ) 839 `RTE_LOG ( INFO , IFM , "%s: Acquiring RDock @ %d\n\r", 840 __FUNCTION__ , __LINE__ ); 841 i( USE_RTM_LOCKS ) { 842 `m_lock (); 844 `e_rwlock_ad_lock (& rwlock ); 846 i( bd_pt = NULL ) { 847 `RTE_LOG ( ERR , IFM , "%s: Given bondort %u isotvailable in" 848 "܈li.\n\r", __FUNCTION__ , bded_pt_id ); 849 i( ifm_debug & IFM_DEBUG_LOCKS ) 850 `RTE_LOG ( INFO , IFM , "%s: Releasing RDock @ %d\n\r", 851 __FUNCTION__ , __LINE__ ); 852 i( USE_RTM_LOCKS ) { 853 `m_uock (); 855 `e_rwlock_ad_uock (& rwlock ); 857  IFM_FAILURE ; 859 ut32_t ave_cou = bd_pt -> bd_cfig ->slave_count; 860 i( ifm_debug & IFM_DEBUG_LOCKS ) 861 `RTE_LOG ( INFO , IFM , "%s: Releasing RDock @ %d\n\r", 862 __FUNCTION__ , __LINE__ ); 863 i( USE_RTM_LOCKS ) { 864 `m_uock (); 866 `e_rwlock_ad_uock (& rwlock ); 868  ave_cou ; 869 } } 871  $g_bd_aive_ave_cou ( ut8_t bded_pt_id ) 873 l2_phy_r_t * bd_pt ; 874 bd_pt = `ifm_g_pt ( bded_pt_id ); 877 i( ifm_debug & IFM_DEBUG_LOCKS ) 878 `RTE_LOG ( INFO , IFM , "%s: Acquiring RDock @ %d\n\r", 879 __FUNCTION__ , __LINE__ ); 880 i( USE_RTM_LOCKS ) { 881 `m_lock (); 883 `e_rwlock_ad_lock (& rwlock ); 885 i( bd_pt = NULL ) { 886 `RTE_LOG ( ERR , IFM , "%s: Given bondort %u isotvailable in" 887 "܈li.\n\r", __FUNCTION__ , bded_pt_id ); 888 i( ifm_debug & IFM_DEBUG_LOCKS ) 889 `RTE_LOG ( INFO , IFM , "%s: Releasing RDock @ %d\n\r", 890 __FUNCTION__ , __LINE__ ); 891 i( USE_RTM_LOCKS ) { 892 `m_uock (); 894 `e_rwlock_ad_uock (& rwlock ); 896  IFM_FAILURE ; 898 ut32_t ave_cou = bd_pt -> bd_cfig -> aive_ave_cou ; 899 i( ifm_debug & IFM_DEBUG_LOCKS ) 900 `RTE_LOG ( INFO , IFM , "%s: Releasing RDock @ %d\n\r", 901 __FUNCTION__ , __LINE__ ); 902 i( USE_RTM_LOCKS ) { 903 `m_uock (); 905 `e_rwlock_ad_uock (& rwlock ); 907  ave_cou ; 908 } } 910  $g_bd_aves ( ut8_t bded_pt_id , ut8_ aves [ RTE_MAX_ETHPORTS ]) 912 l2_phy_r_t * bd_pt ; 913 bd_pt = `ifm_g_pt ( bded_pt_id ); 916 i( ifm_debug & IFM_DEBUG_LOCKS ) 917 `RTE_LOG ( INFO , IFM , "%s: Acquiring RDock @ %d\n\r", 918 __FUNCTION__ , __LINE__ ); 919 i( USE_RTM_LOCKS ) { 920 `m_lock (); 922 `e_rwlock_ad_lock (& rwlock ); 924 i( bd_pt = NULL ) { 925 `RTE_LOG ( ERR , IFM , "%s: Given bondort %u isotvailable in" 926 "܈li.\n\r", __FUNCTION__ , bded_pt_id ); 927  IFM_FAILURE ; 929 `memy ( aves , bd_pt -> bd_cfig ->slaves, 930 bd_pt -> bd_cfig -> ave_cou ); 931 i( ifm_debug & IFM_DEBUG_LOCKS ) 932 `RTE_LOG ( INFO , IFM , "%s: Releasing RDock @ %d\n\r", 933 __FUNCTION__ , __LINE__ ); 934 i( USE_RTM_LOCKS ) { 935 `m_uock (); 937 `e_rwlock_ad_uock (& rwlock ); 939  IFM_SUCCESS ; 940 } } 942  $g_bd_aive_aves ( ut8_t bded_pt_id , 943 ut8_t aive_aves [ RTE_MAX_ETHPORTS ]) 945 l2_phy_r_t * bd_pt ; 946 bd_pt = `ifm_g_pt ( bded_pt_id ); 949 i( ifm_debug & IFM_DEBUG_LOCKS ) 950 `RTE_LOG ( INFO , IFM , "%s: Acquiring RDock @ %d\n\r", 951 __FUNCTION__ , __LINE__ ); 952 i( USE_RTM_LOCKS ) { 953 `m_lock (); 955 `e_rwlock_ad_lock (& rwlock ); 957 i( bd_pt = NULL ) { 958 `RTE_LOG ( ERR , IFM , "%s: Given bondort %u isotvailable in" 959 "܈li.\n\r", __FUNCTION__ , bded_pt_id ); 960  IFM_FAILURE ; 962 `memy ( aive_aves , bd_pt -> bd_cfig ->active_slaves, 963 bd_pt -> bd_cfig -> aive_ave_cou ); 964 i( ifm_debug & IFM_DEBUG_LOCKS ) 965 `RTE_LOG ( INFO , IFM , "%s: Releasing RDock @ %d\n\r", 966 __FUNCTION__ , __LINE__ ); 967 i( USE_RTM_LOCKS ) { 968 `m_uock (); 970 `e_rwlock_ad_uock (& rwlock ); 972  IFM_SUCCESS ; 973 } } 975  $t_bd_mac_addss ( ut8_t bded_pt_id ,  h_addr * mac_addr ) 977 l2_phy_r_t * bd_pt ; 978 bd_pt = `ifm_g_pt ( bded_pt_id ); 981 i( ifm_debug & IFM_DEBUG_LOCKS ) 982 `RTE_LOG ( INFO , IFM , "%s: Acquiring WRock @ %d\n\r", 983 __FUNCTION__ , __LINE__ ); 984 i( USE_RTM_LOCKS ) { 985 `m_lock (); 987 `e_rwlock_wre_lock (& rwlock ); 989 i( mac_addr = NULL ) { 990 `RTE_LOG ( ERR , IFM , "%s: MACddress cannot be NULL.\n\r", 991 __FUNCTION__ ); 992 i( ifm_debug & IFM_DEBUG_LOCKS ) 993 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 994 __FUNCTION__ , __LINE__ ); 995 i( USE_RTM_LOCKS ) { 996 `m_uock (); 998 `e_rwlock_wre_uock (& rwlock ); 1000  IFM_FAILURE ; 1003 i( bd_pt = NULL ) { 1004 `RTE_LOG ( ERR , IFM , "%s: Given bondort %u isotvailable in" 1005 "܈li.\n\r", __FUNCTION__ , bded_pt_id ); 1006 i( ifm_debug & IFM_DEBUG_LOCKS ) 1007 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 1008 __FUNCTION__ , __LINE__ ); 1009 i( USE_RTM_LOCKS ) { 1010 `m_uock (); 1012 `e_rwlock_wre_uock (& rwlock ); 1014  IFM_FAILURE ; 1016 i( `e_h_bd_mac_addss_t ( bd_pt -> pmdid , mac_addr ) < 0) { 1017 `RTE_LOG ( ERR , IFM , "%s: Failedo set MACddr forort %u\n\r", 1018 __FUNCTION__ , bd_pt -> pmdid ); 1019 i( ifm_debug & IFM_DEBUG_LOCKS ) 1020 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 1021 __FUNCTION__ , __LINE__ ); 1022 i( USE_RTM_LOCKS ) { 1023 `m_uock (); 1025 `e_rwlock_wre_uock (& rwlock ); 1027  IFM_FAILURE ; 1029 `e_h_maddr_g ( bd_pt -> pmdid , 1030 ( h_addr *) bd_pt -> maddr ); 1031 i( ifm_debug & IFM_DEBUG_LOCKS ) 1032 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 1033 __FUNCTION__ , __LINE__ ); 1034 i( USE_RTM_LOCKS ) { 1035 `m_uock (); 1037 `e_rwlock_wre_uock (& rwlock ); 1039  IFM_SUCCESS ; 1040 } } 1042  $t_bd_mac_addr ( ut8_t bded_pt_id ) 1044 l2_phy_r_t * bd_pt ; 1045 bd_pt = `ifm_g_pt ( bded_pt_id ); 1048 i( ifm_debug & IFM_DEBUG_LOCKS ) 1049 `RTE_LOG ( INFO , IFM , "%s: Acquiring WRock @ %d\n\r", 1050 __FUNCTION__ , __LINE__ ); 1051 i( USE_RTM_LOCKS ) { 1052 `m_lock (); 1054 `e_rwlock_wre_lock (& rwlock ); 1056 i( bd_pt = NULL ) { 1057 `RTE_LOG ( ERR , IFM , "%s: Given bondort %u isotvailable in" 1058 "܈li.\n\r", __FUNCTION__ , bded_pt_id ); 1059 i( ifm_debug & IFM_DEBUG_LOCKS ) 1060 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 1061 __FUNCTION__ , __LINE__ ); 1062 i( USE_RTM_LOCKS ) { 1063 `m_uock (); 1065 `e_rwlock_wre_uock (& rwlock ); 1067  IFM_FAILURE ; 1069 i( `e_h_bd_mac_addss_t ( bd_pt -> pmdid ) < 0) { 1070 `RTE_LOG ( ERR , IFM , 1072 __FUNCTION__ , bd_pt -> pmdid ); 1073 i( ifm_debug & IFM_DEBUG_LOCKS ) 1074 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 1075 __FUNCTION__ , __LINE__ ); 1076 i( USE_RTM_LOCKS ) { 1077 `m_uock (); 1079 `e_rwlock_wre_uock (& rwlock ); 1081  IFM_FAILURE ; 1083 `e_h_maddr_g ( bd_pt -> pmdid , 1084 ( h_addr *) bd_pt -> maddr ); 1085 i( ifm_debug & IFM_DEBUG_LOCKS ) 1086 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 1087 __FUNCTION__ , __LINE__ ); 1088 i( USE_RTM_LOCKS ) { 1089 `m_uock (); 1091 `e_rwlock_wre_uock (& rwlock ); 1093  IFM_FAILURE ; 1094 } } 1096  $t_bd_xmpicy ( ut8_t bded_pt_id , ut8_ picy ) 1099 l2_phy_r_t * bd_pt ; 1100 bd_pt = `ifm_g_pt ( bded_pt_id ); 1102  t = 0; 1104 i( ifm_debug & IFM_DEBUG_LOCKS ) 1105 `RTE_LOG ( INFO , IFM , "%s: Acquiring WRock @ %d\n\r", 1106 __FUNCTION__ , __LINE__ ); 1107 i( USE_RTM_LOCKS ) { 1108 `m_lock (); 1110 `e_rwlock_wre_lock (& rwlock ); 1112 i( bd_pt = NULL ) { 1113 `RTE_LOG ( ERR , IFM , "%s: Given bondort %u isotvailable in" 1114 "܈li.\n\r", __FUNCTION__ , bded_pt_id ); 1115 i( ifm_debug & IFM_DEBUG_LOCKS ) 1116 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 1117 __FUNCTION__ , __LINE__ ); 1118 i( USE_RTM_LOCKS ) { 1119 `m_uock (); 1121 `e_rwlock_wre_uock (& rwlock ); 1123  IFM_FAILURE ; 1125 i( bd_pt -> bd_cfig -> xm_picy = picy ) { 1126 i( ifm_debug & IFM_DEBUG ) 1127 `RTE_LOG ( INFO , IFM , 1129 __FUNCTION__ , bded_pt_id ); 1130 i( ifm_debug & IFM_DEBUG_LOCKS ) 1131 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 1132 __FUNCTION__ , __LINE__ ); 1133 i( USE_RTM_LOCKS ) { 1134 `m_uock (); 1136 `e_rwlock_wre_uock (& rwlock ); 1138  IFM_SUCCESS ; 1140 i( `e_h_bd_xm_picy_t ( bd_pt -> pmdid , picy ) < 0) { 1141 `RTE_LOG ( ERR , IFM , "%s: Failedo setolicy forort %u\n\r", 1142 __FUNCTION__ , bd_pt -> pmdid ); 1143 i( ifm_debug & IFM_DEBUG_LOCKS ) 1144 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 1145 __FUNCTION__ , __LINE__ ); 1146 i( USE_RTM_LOCKS ) { 1147 `m_uock (); 1149 `e_rwlock_wre_uock (& rwlock ); 1151  IFM_FAILURE ; 1153 t = `e_h_bd_xm_picy_g ( bd_pt -> pmdid ); 1154 i( t < 0) { 1155 i( ifm_debug & IFM_DEBUG ) 1156 `RTE_LOG ( INFO , IFM , 1158 __FUNCTION__ ); 1159 i( ifm_debug & IFM_DEBUG_LOCKS ) 1160 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 1161 __FUNCTION__ , __LINE__ ); 1162 i( USE_RTM_LOCKS ) { 1163 `m_uock (); 1165 `e_rwlock_wre_uock (& rwlock ); 1167  IFM_FAILURE ; 1169 bd_pt -> bd_cfig -> xm_picy = picy ; 1170 i( ifm_debug & IFM_DEBUG_LOCKS ) 1171 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 1172 __FUNCTION__ , __LINE__ ); 1173 i( USE_RTM_LOCKS ) { 1174 `m_uock (); 1176 `e_rwlock_wre_uock (& rwlock ); 1178  IFM_SUCCESS ; 1179 } } 1181  $g_bd_xmpicy ( ut8_t bded_pt_id ) 1183 l2_phy_r_t * bd_pt ; 1185 bd_pt = `ifm_g_pt ( bded_pt_id ); 1187 i( ifm_debug & IFM_DEBUG_LOCKS ) 1188 `RTE_LOG ( INFO , IFM , "%s: RD Acquiringock @ %d\n\r", 1189 __FUNCTION__ , __LINE__ ); 1190 i( USE_RTM_LOCKS ) { 1191 `m_lock (); 1193 `e_rwlock_ad_lock (& rwlock ); 1195 i( bd_pt = NULL ) { 1196 `RTE_LOG ( ERR , IFM , "%s: Given bondort %u isotvailable in" 1197 "܈li.\n\r", __FUNCTION__ , bded_pt_id ); 1198 i( ifm_debug & IFM_DEBUG_LOCKS ) 1199 `RTE_LOG ( INFO , IFM , "%s:Releasing RDock @ %d\n\r", 1200 __FUNCTION__ , __LINE__ ); 1201 i( USE_RTM_LOCKS ) { 1202 `m_uock (); 1204 `e_rwlock_ad_uock (& rwlock ); 1206  IFM_FAILURE ; 1208 ut8_t picy = bd_pt -> bd_cfig -> xm_picy ; 1209 i( ifm_debug & IFM_DEBUG_LOCKS ) 1210 `RTE_LOG ( INFO , IFM , "%s:Releasing RDock @ %d\n\r", 1211 __FUNCTION__ , __LINE__ ); 1212 i( USE_RTM_LOCKS ) { 1213 `m_uock (); 1215 `e_rwlock_ad_uock (& rwlock ); 1217  picy ; 1218 } } 1220  $t_bd_lk_mt_equcy ( ut8_t bded_pt_id , 1221 ut32_t _ms ) 1223 l2_phy_r_t * bd_pt ; 1224 i( ifm_debug & IFM_DEBUG_LOCKS ) 1225 `RTE_LOG ( INFO , IFM , "%s: Acquiring WRock @ %d\n\r", 1226 __FUNCTION__ , __LINE__ ); 1227 i( USE_RTM_LOCKS ) { 1228 `m_lock (); 1230 `e_rwlock_wre_lock (& rwlock ); 1233 bd_pt = `ifm_g_pt ( bded_pt_id ); 1234  t = 0; 1236 i( bd_pt = NULL ) { 1237 `RTE_LOG ( ERR , IFM , "%s: Given bondort %u isotvailable in" 1238 "܈li.\n\r", __FUNCTION__ , bded_pt_id ); 1239 i( ifm_debug & IFM_DEBUG_LOCKS ) 1240 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 1241 __FUNCTION__ , __LINE__ ); 1242 i( USE_RTM_LOCKS ) { 1243 `m_uock (); 1245 `e_rwlock_wre_uock (& rwlock ); 1247  IFM_FAILURE ; 1249 i( bd_pt -> bd_cfig -> _ms == internal_ms) { 1250 i( ifm_debug & IFM_DEBUG ) 1251 `RTE_LOG ( INFO , IFM , 1253 __FUNCTION__ , bded_pt_id ); 1254 i( ifm_debug & IFM_DEBUG_LOCKS ) 1255 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 1256 __FUNCTION__ , __LINE__ ); 1257 i( USE_RTM_LOCKS ) { 1258 `m_uock (); 1260 `e_rwlock_wre_uock (& rwlock ); 1262  IFM_SUCCESS ; 1264 i( `e_h_bd_lk_mڙܚg_t ( bd_pt -> pmdid , _ms ) < 0) { 1265 `RTE_LOG ( ERR , IFM , 1267 __FUNCTION__ , bd_pt -> pmdid ); 1268 i( ifm_debug & IFM_DEBUG_LOCKS ) 1269 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 1270 __FUNCTION__ , __LINE__ ); 1271 i( USE_RTM_LOCKS ) { 1272 `m_uock (); 1274 `e_rwlock_wre_uock (& rwlock ); 1276  IFM_FAILURE ; 1278 t = `e_h_bd_lk_mڙܚg_g ( bd_pt -> pmdid ); 1279 i( t < 0) { 1280 i( ifm_debug & IFM_DEBUG ) 1281 `RTE_LOG ( INFO , IFM , 1283 __FUNCTION__ ); 1284 i( ifm_debug & IFM_DEBUG_LOCKS ) 1285 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 1286 __FUNCTION__ , __LINE__ ); 1287 i( USE_RTM_LOCKS ) { 1288 `m_uock (); 1290 `e_rwlock_wre_uock (& rwlock ); 1292  IFM_FAILURE ; 1294 bd_pt -> bd_cfig -> _ms = internal_ms; 1295 i( ifm_debug & IFM_DEBUG_LOCKS ) 1296 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 1297 __FUNCTION__ , __LINE__ ); 1298 i( USE_RTM_LOCKS ) { 1299 `m_uock (); 1301 `e_rwlock_wre_uock (& rwlock ); 1303  IFM_SUCCESS ; 1304 } } 1306  $g_bd_lk_mڙ_equcy ( ut8_t bded_pt_id ) 1308 l2_phy_r_t * bd_pt ; 1310 bd_pt = `ifm_g_pt ( bded_pt_id ); 1312 i( ifm_debug & IFM_DEBUG_LOCKS ) 1313 `RTE_LOG ( INFO , IFM , "%s: Acquiring RDock @ %d\n\r", 1314 __FUNCTION__ , __LINE__ ); 1315 i( USE_RTM_LOCKS ) { 1316 `m_lock (); 1318 `e_rwlock_ad_lock (& rwlock ); 1320 i( bd_pt = NULL ) { 1321 `RTE_LOG ( ERR , IFM , "%s: Given bondort %u isotvailable in" 1322 "܈li.\n\r", __FUNCTION__ , bded_pt_id ); 1323 i( ifm_debug & IFM_DEBUG_LOCKS ) 1324 `RTE_LOG ( INFO , IFM , "%s: Releasing RDock @ %d\n\r", 1325 __FUNCTION__ , __LINE__ ); 1326 i( USE_RTM_LOCKS ) { 1327 `m_uock (); 1329 `e_rwlock_ad_uock (& rwlock ); 1331  IFM_FAILURE ; 1333 ut32_t _ms = bd_pt -> bd_cfig ->internal_ms; 1334 i( ifm_debug & IFM_DEBUG_LOCKS ) 1335 `RTE_LOG ( INFO , IFM , "%s: Releasing RDock @ %d\n\r", 1336 __FUNCTION__ , __LINE__ ); 1337 i( USE_RTM_LOCKS ) { 1338 `m_uock (); 1340 `e_rwlock_ad_uock (& rwlock ); 1342  _ms ; 1343 } } 1345  $t_bd_lkdown_day ( ut8_t bded_pt_id , ut32_t day_ms ) 1347 l2_phy_r_t * bd_pt ; 1348 i( ifm_debug & IFM_DEBUG_LOCKS ) 1349 `RTE_LOG ( INFO , IFM , "%s: Acquiring WRock @ %d\n\r", 1350 __FUNCTION__ , __LINE__ ); 1352 i( USE_RTM_LOCKS ) { 1353 `m_lock (); 1355 `e_rwlock_wre_lock (& rwlock ); 1358 bd_pt = `ifm_g_pt ( bded_pt_id ); 1359  day = 0; 1361 i( bd_pt = NULL ) { 1362 `RTE_LOG ( ERR , IFM , "%s: Given bondort %u isotvailable in" 1363 "܈li.\n\r", __FUNCTION__ , bded_pt_id ); 1364 i( ifm_debug & IFM_DEBUG_LOCKS ) 1365 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 1366 __FUNCTION__ , __LINE__ ); 1368 i( USE_RTM_LOCKS ) { 1369 `m_uock (); 1371 `e_rwlock_wre_uock (& rwlock ); 1373  IFM_FAILURE ; 1375 i( bd_pt -> bd_cfig -> lk_down_day_ms = day_ms ) { 1376 i( ifm_debug & IFM_DEBUG ) 1377 `RTE_LOG ( INFO , IFM , 1379 __FUNCTION__ , bded_pt_id ); 1380 i( ifm_debug & IFM_DEBUG_LOCKS ) 1381 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 1382 __FUNCTION__ , __LINE__ ); 1384 i( USE_RTM_LOCKS ) { 1385 `m_uock (); 1387 `e_rwlock_wre_uock (& rwlock ); 1389  IFM_SUCCESS ; 1391 i( `e_h_bd_lk_down__day_t ( bd_pt -> pmdid , day_ms ) < 1393 `RTE_LOG ( ERR , IFM , "%s: Failedo set delay forort %u\n\r", 1394 __FUNCTION__ , bd_pt -> pmdid ); 1395 i( ifm_debug & IFM_DEBUG_LOCKS ) 1396 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 1397 __FUNCTION__ , __LINE__ ); 1399 i( USE_RTM_LOCKS ) { 1400 `m_uock (); 1402 `e_rwlock_wre_uock (& rwlock ); 1404  IFM_FAILURE ; 1406 day = `e_h_bd_lk_down__day_g ( bd_pt -> pmdid ); 1407 i( day < 0) { 1408 i( ifm_debug & IFM_DEBUG ) 1409 `RTE_LOG ( INFO , IFM , 1411 __FUNCTION__ ); 1412 i( ifm_debug & IFM_DEBUG_LOCKS ) 1413 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 1414 __FUNCTION__ , __LINE__ ); 1416 i( USE_RTM_LOCKS ) { 1417 `m_uock (); 1419 `e_rwlock_wre_uock (& rwlock ); 1421  IFM_FAILURE ; 1423 bd_pt -> bd_cfig -> lk_down_day_ms = day ; 1424 i( ifm_debug & IFM_DEBUG_LOCKS ) 1425 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 1426 __FUNCTION__ , __LINE__ ); 1428 i( USE_RTM_LOCKS ) { 1429 `m_uock (); 1431 `e_rwlock_wre_uock (& rwlock ); 1433  IFM_SUCCESS ; 1434 } } 1436  $g_bd_lk_down_day ( ut8_t bded_pt_id ) 1438 l2_phy_r_t * bd_pt ; 1440 bd_pt = `ifm_g_pt ( bded_pt_id ); 1441 i( ifm_debug & IFM_DEBUG_LOCKS ) 1442 `RTE_LOG ( INFO , IFM , "%s: Acquiring RDock @ %d\n\r", 1443 __FUNCTION__ , __LINE__ ); 1444 i( USE_RTM_LOCKS ) 1445 `m_lock (); 1447 `e_rwlock_ad_lock (& rwlock ); 1449 i( bd_pt = NULL ) { 1450 `RTE_LOG ( ERR , IFM , "%s: Given bondort %u isotvailable in" 1451 "܈li.\n\r", __FUNCTION__ , bded_pt_id ); 1452 i( ifm_debug & IFM_DEBUG_LOCKS ) 1453 `RTE_LOG ( INFO , IFM , "%s: Releasing RDock @ %d\n\r", 1454 __FUNCTION__ , __LINE__ ); 1455 i( USE_RTM_LOCKS ) { 1456 `m_uock (); 1458 `e_rwlock_ad_uock (& rwlock ); 1460  IFM_FAILURE ; 1462 ut32_t day_ms = bd_pt -> bd_cfig -> lk_down_day_ms ; 1463 i( ifm_debug & IFM_DEBUG_LOCKS ) 1464 `RTE_LOG ( INFO , IFM , "%s: Releasing RDock @ %d\n\r", 1465 __FUNCTION__ , __LINE__ ); 1466 i( USE_RTM_LOCKS ) { 1467 `m_uock (); 1469 `e_rwlock_ad_uock (& rwlock ); 1471  day_ms ; 1473 } } 1475  $t_bd_lkup_day ( ut8_t bded_pt_id , ut32_t day_ms ) 1477 l2_phy_r_t * bd_pt ; 1478  day = 0; 1479 bd_pt = `ifm_g_pt ( bded_pt_id ); 1481 i( ifm_debug & IFM_DEBUG_LOCKS ) 1482 `RTE_LOG ( INFO , IFM , "%s: Acquiring WRock @ %d\n\r", 1483 __FUNCTION__ , __LINE__ ); 1484 i( USE_RTM_LOCKS ) 1485 `m_uock (); 1487 `e_rwlock_wre_uock (& rwlock ); 1489 i( bd_pt = NULL ) { 1490 `RTE_LOG ( ERR , IFM , "%s: Given bondort %u isotvailable in" 1491 "܈li.\n\r", __FUNCTION__ , bded_pt_id ); 1492 i( ifm_debug & IFM_DEBUG_LOCKS ) 1493 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 1494 __FUNCTION__ , __LINE__ ); 1495 i( USE_RTM_LOCKS ) 1496 `m_uock (); 1498 `e_rwlock_wre_uock (& rwlock ); 1499  IFM_FAILURE ; 1501 i( bd_pt -> bd_cfig -> lk_up_day_ms = day_ms ) { 1502 i( ifm_debug & IFM_DEBUG ) 1503 `RTE_LOG ( INFO , IFM , 1505 __FUNCTION__ , bded_pt_id ); 1506 i( ifm_debug & IFM_DEBUG_LOCKS ) 1507 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 1508 __FUNCTION__ , __LINE__ ); 1509 i( USE_RTM_LOCKS ) 1510 `m_uock (); 1512 `e_rwlock_wre_uock (& rwlock ); 1513  IFM_SUCCESS ; 1515 i( `e_h_bd_lk_up__day_t ( bd_pt -> pmdid , day_ms ) < 0) { 1516 `RTE_LOG ( ERR , IFM , "%s: Failedo set delay forort %u\n\r", 1517 __FUNCTION__ , bd_pt -> pmdid ); 1518 i( ifm_debug & IFM_DEBUG_LOCKS ) 1519 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 1520 __FUNCTION__ , __LINE__ ); 1522 i( USE_RTM_LOCKS ) 1523 `m_uock (); 1525 `e_rwlock_wre_uock (& rwlock ); 1526  IFM_FAILURE ; 1528 day = `e_h_bd_lk_up__day_g ( bd_pt -> pmdid ); 1529 i( day < 0) { 1530 `RTE_LOG ( INFO , IFM , 1532 __FUNCTION__ ); 1533 i( ifm_debug & IFM_DEBUG_LOCKS ) 1534 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 1535 __FUNCTION__ , __LINE__ ); 1537 i( USE_RTM_LOCKS ) 1538 `m_uock (); 1540 `e_rwlock_wre_uock (& rwlock ); 1541  IFM_FAILURE ; 1543 bd_pt -> bd_cfig -> lk_up_day_ms = day ; 1544 i( ifm_debug & IFM_DEBUG_LOCKS ) 1545 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 1546 __FUNCTION__ , __LINE__ ); 1548 i( USE_RTM_LOCKS ) 1549 `m_uock (); 1551 `e_rwlock_wre_uock (& rwlock ); 1552  IFM_SUCCESS ; 1553 } } 1555  $g_bd_lk_up_day ( ut8_t bded_pt_id ) 1557 l2_phy_r_t * bd_pt ; 1558 ut32_t day_ms ; 1560 bd_pt = `ifm_g_pt ( bded_pt_id ); 1562 i( ifm_debug & IFM_DEBUG_LOCKS ) 1563 `RTE_LOG ( INFO , IFM , "%s: Acquiring RDock @ %d\n\r", 1564 __FUNCTION__ , __LINE__ ); 1565 i( USE_RTM_LOCKS ) 1566 `m_lock (); 1568 `e_rwlock_ad_lock (& rwlock ); 1569 i( bd_pt = NULL ) { 1570 i( ifm_debug & IFM_DEBUG ) { 1571 `RTE_LOG ( ERR , IFM , 1573 "܈li.\n\r", __FUNCTION__ , 1574 bded_pt_id ); 1576 i( ifm_debug & IFM_DEBUG_LOCKS ) 1577 `RTE_LOG ( INFO , IFM , "%s: Releasing RDock @ %d\n\r", 1578 __FUNCTION__ , __LINE__ ); 1579 i( USE_RTM_LOCKS ) 1580 `m_uock (); 1582 `e_rwlock_ad_uock (& rwlock ); 1583  IFM_FAILURE ; 1585 day_ms = bd_pt -> bd_cfig -> lk_up_day_ms ; 1587 i( ifm_debug & IFM_DEBUG_LOCKS ) 1588 `RTE_LOG ( INFO , IFM , "%s: Releasing RDock @ %d\n\r", 1589 __FUNCTION__ , __LINE__ ); 1590 i( USE_RTM_LOCKS ) 1591 `m_uock (); 1593 `e_rwlock_ad_uock (& rwlock ); 1594  day_ms ; 1595 } } @VIL/l2l3_stack/hle.c 16  ~"tsx.h " 18  ~ 20  $h_ () 22 mux_v = 0; 23 } } 25  $h_lock () 27  __omic_exchge_n 28 (& mux_v , 1, __ATOMIC_ACQUIRE | __ATOMIC_HLE_ACQUIRE )) 29 `_mm_u (); 30  TRUE ; 31 } } 33  $h_a () 35 `__omic_e_n (& mux_v , 0, 36 __ATOMIC_RELEASE | __ATOMIC_HLE_RELEASE ); 37  TRUE ; 38 } } 40  $is_h_locked () 42  ( mux_v =0? FALSE : TRUE ; 43 } } @VIL/l2l3_stack/hle.h 17  #HLE_TRUE 1 ) 18  #HLE_FALSE 0 ) 20 vީ gmux_v ; 25  h_mux (); 30  h_lock (); 35  h_a (); 40  is_locked (); @VIL/l2l3_stack/interface.c 16  ~ 17  ~ 18  ~ 19  ~ 21 r_ma_t gifm ; 22  gUSE_RTM_LOCKS = 0; 23 e_rwlock_t grwlock ; 24 ut8_t gifm_debug ; 25  gev_e ; 27  $cfig_ifm_debug ( dbg ,  ag ) 29  dbg ) { 30  IFM_DEBUG_CONFIG : 31 i( ag ) { 32 ifm_debug | IFM_DEBUG_CONFIG ; 34 ifm_debug &~ IFM_DEBUG_CONFIG ; 37  IFM_DEBUG_RXTX : 38 i( ag ) { 39 ifm_debug | IFM_DEBUG_RXTX ; 41 ifm_debug &~ IFM_DEBUG_RXTX ; 44  IFM_DEBUG_LOCKS : 45 i( ag ) { 46 ifm_debug | IFM_DEBUG_LOCKS ; 48 ifm_debug &~ IFM_DEBUG_LOCKS ; 51  IFM_DEBUG : 52 i( ag ) { 53 ifm_debug | IFM_DEBUG ; 55 ifm_debug &~ IFM_DEBUG ; 59 } } 61  $ifm_ () 63  i = 0; 64 `cfig_ifm_debug ( IFM_DEBUG_CONFIG , 1); 65 i( `n_u_l_ce_4th_g_us ()) { 66 i( ifm_debug & IFM_DEBUG_CONFIG ) 67 `RTE_LOG ( INFO , IFM , "TSXot currently supported...\n\r"); 68 USE_RTM_LOCKS = 0; 70 i( ifm_debug & IFM_DEBUG_CONFIG ) 71 `RTE_LOG ( INFO , IFM , "TSXot supported\n\r"); 72 USE_RTM_LOCKS = 0; 74 i( USE_RTM_LOCKS ) 75 `m_ (); 77 `e_rwlock_ (& rwlock ); 79  i = 0; i < IFM_MAX_PORTARR_SZ ; i++) { 80 i( ifm_debug & IFM_DEBUG_LOCKS ) 81 `RTE_LOG ( INFO , IFM , "%s: Acquiring WRock @ %d\n\r", 82 __FUNCTION__ , __LINE__ ); 83 i( USE_RTM_LOCKS ) 84 `m_lock (); 86 `e_rwlock_wre_lock (& rwlock ); 88 ifm . pt_li [ i ] = NULL ; 89 i( ifm_debug & IFM_DEBUG_LOCKS ) 90 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 91 __FUNCTION__ , __LINE__ ); 92 i( USE_RTM_LOCKS ) 93 `m_uock (); 95 `e_rwlock_wre_uock (& rwlock ); 97 ifm . t_tlized = `e_h_dev_cou (); 98 ifm . t_cfigud = 0; 99 `RTE_LOG ( INFO , IFM , "IFM_INIT: Number oforts initialized during " 100 "PCIrobg %u.\n\r", ifm . t_tlized ); 101 } } 103  $ifm_move_pt_das ( ut8_t ptid ) 105 i( ifm . pt_li [ ptid ] ! NULL ) { 106 i( ifm_debug & IFM_DEBUG_LOCKS ) 107 `RTE_LOG ( INFO , IFM , "%s: Acquiringock %d\n\r", 108 __FUNCTION__ , __LINE__ ); 109 i( USE_RTM_LOCKS ) 110 `m_lock (); 112 `e_rwlock_wre_lock (& rwlock ); 113 l2_phy_r_t * pt = ifm . pt_li [ ptid ]; 114 ifm . pt_li [ ptid ] = NULL ; 115 i( ifm_debug & IFM_DEBUG_CONFIG ) 116 `RTE_LOG ( INFO , IFM , "%s: NULL set forort %u\n\r", 117 __FUNCTION__ , ptid ); 118 `e_ ( pt ); 119 i( ifm_debug & IFM_DEBUG_LOCKS ) 120 `RTE_LOG ( INFO , IFM , "%s: Releasingock @ %d\n\r", 121 __FUNCTION__ , __LINE__ ); 123 i( USE_RTM_LOCKS ) 124 `m_uock (); 126 `e_rwlock_wre_uock (& rwlock ); 128 i( ifm_debug & IFM_DEBUG_LOCKS ) 129 `RTE_LOG ( INFO , IFM , 131 " iady Nu.\n\r", __FUNCTION__ , ptid ); 133 } } 135 l2_phy_r_t * $ifm_g_pt ( ut8_t pt_id ) 137 l2_phy_r_t * pt = NULL ; 138 i( ifm_debug & IFM_DEBUG_LOCKS ) 139 `RTE_LOG ( INFO , IFM , "%s: Acqugock @ %d\n\r", __FUNCTION__ , 140 __LINE__ ); 142 i( USE_RTM_LOCKS ) 143 `m_lock (); 145 `e_rwlock_ad_lock (& rwlock ); 147 pt = ifm . pt_li [ pt_id ]; 149 i( pt = NULL ) { 153 i( ifm_debug & IFM_DEBUG_LOCKS ) 154 `RTE_LOG ( INFO , IFM , "%s: Releasing RDock @ %d\n\r", 155 __FUNCTION__ , __LINE__ ); 156 i( USE_RTM_LOCKS ) 157 `m_uock (); 159 `e_rwlock_ad_uock (& rwlock ); 160  NULL ; 162 i( pt -> pmdid = pt_id ) { 165 i( ifm_debug & IFM_DEBUG_LOCKS ) 166 `RTE_LOG ( INFO , IFM , "%s: Releasingock @ %d\n\r", 167 __FUNCTION__ , __LINE__ ); 169 i( USE_RTM_LOCKS ) 170 `m_uock (); 172 `e_rwlock_ad_uock (& rwlock ); 173  pt ; 180 i( ifm_debug & IFM_DEBUG_LOCKS ) 181 `RTE_LOG ( INFO , IFM , "%s: Rsgock @ %d\n\r", __FUNCTION__ , 182 __LINE__ ); 183 i( USE_RTM_LOCKS ) 184 `m_uock (); 186 `e_rwlock_ad_uock (& rwlock ); 187  NULL ; 188 } } 190 l2_phy_r_t * $ifm_g_f_pt () 192 l2_phy_r_t * pt = NULL ; 193 i( ifm_debug & IFM_DEBUG_LOCKS ) 194 `RTE_LOG ( INFO , IFM , "%s: Acqugock @ %d\n\r", __FUNCTION__ , 195 __LINE__ ); 197 i( USE_RTM_LOCKS ) 198 `m_lock (); 200 `e_rwlock_ad_lock (& rwlock ); 201 pt = ifm . pt_li [0]; 202 i( pt = NULL ) { 205 i( ifm_debug & IFM_DEBUG_LOCKS ) 206 `RTE_LOG ( INFO , IFM , "%s: Releasingock @ %d\n\r", 207 __FUNCTION__ , __LINE__ ); 208 i( USE_RTM_LOCKS ) 209 `m_uock (); 211 `e_rwlock_ad_uock (& rwlock ); 212  NULL ; 216 i( ifm_debug & IFM_DEBUG_LOCKS ) 217 `RTE_LOG ( INFO , IFM , "%s: Rsgock @ %d\n\r", __FUNCTION__ , 218 __LINE__ ); 219 i( USE_RTM_LOCKS ) 220 `m_uock (); 222 `e_rwlock_ad_uock (& rwlock ); 223  pt ; 224 } } 226 l2_phy_r_t * $ifm_g_xt_pt ( ut8_t pt_id ) 228 l2_phy_r_t * pt = NULL ; 229 i( ifm_debug & IFM_DEBUG_LOCKS ) 230 `RTE_LOG ( INFO , IFM , "%s: Acqugock @ %d\n\r", __FUNCTION__ , 231 __LINE__ ); 232 i( USE_RTM_LOCKS ) 233 `m_lock (); 235 `e_rwlock_ad_lock (& rwlock ); 236 pt = ifm . pt_li [ pt_id + 1]; 237 i( pt = NULL ) { 238 i( ifm_debug & IFM_DEBUG_LOCKS ) 239 `RTE_LOG ( INFO , IFM , "%s: Releasingock @ %d\n\r", 240 __FUNCTION__ , __LINE__ ); 241 i( USE_RTM_LOCKS ) 242 `m_uock (); 244 `e_rwlock_ad_uock (& rwlock ); 245  NULL ; 249 i( ifm_debug & IFM_DEBUG_LOCKS ) 250 `RTE_LOG ( INFO , IFM , "%s: Rsgock @ %d\n\r", __FUNCTION__ , 251 __LINE__ ); 253 i( USE_RTM_LOCKS ) 254 `m_uock (); 256 `e_rwlock_ad_uock (& rwlock ); 257  pt ; 258 } } 260 l2_phy_r_t * $ifm_g_pt_by_me (cڡ * me ) 262 l2_phy_r_t * pt = NULL ; 263  i ; 264 i( ifm_debug & IFM_DEBUG_LOCKS ) 265 `RTE_LOG ( INFO , IFM , "%s: Acqugock @ %d\n\r", __FUNCTION__ , 266 __LINE__ ); 268 i( USE_RTM_LOCKS ) 269 `m_lock (); 271 `e_rwlock_ad_lock (& rwlock ); 272  i = 0; i < RTE_MAX_ETHPORTS && ifm . pt_li [i]; i++) { 273 pt = ifm . pt_li [ i ]; 274 i( `rcmp ( me , pt -> iame ) == 0) { 275 i( ifm_debug & IFM_DEBUG_CONFIG ) 276 `RTE_LOG ( INFO , IFM , "FOUND!ort %u %s\n\r", 277 pt -> pmdid ,t-> iame ); 278 i( ifm_debug & IFM_DEBUG_LOCKS ) 279 `RTE_LOG ( INFO , IFM , 281 __FUNCTION__ , __LINE__ ); 282 i( USE_RTM_LOCKS ) 283 `m_uock (); 285 `e_rwlock_ad_uock (& rwlock ); 286  pt ; 289 i( ifm_debug & IFM_DEBUG_LOCKS ) 290 `RTE_LOG ( INFO , IFM , "%s: Rsgock @ %d\n\r", __FUNCTION__ , 291 __LINE__ ); 292 i( USE_RTM_LOCKS ) 293 `m_uock (); 295 `e_rwlock_ad_uock (& rwlock ); 296  NULL ; 297 } } 299  $lsi_evt_back ( ut8_t pt_id , e_h_evt_ty ty , 300 * m ) 302  e_h_lk lk ; 303 l2_phy_r_t * pt ; 304  ns = ifm . n ; 305  i ; 307 `RTE_SET_USED ( m ); 308 `RTE_SET_USED ( ty ); 310 i( ifm_debug & IFM_DEBUG_LOCKS ) 311 `RTE_LOG ( INFO , IFM , "%s: Acquiring WRock @ %d\n\r", 312 __FUNCTION__ , __LINE__ ); 313 i( USE_RTM_LOCKS ) { 314 `m_lock (); 316 `e_rwlock_wre_lock (& rwlock ); 318 `e_h_lk_g ( pt_id , & lk ); 319  i = 0; i < ns ; i++) 320 ifm . if_ [ i ]. `cb_lkupde ( pt_id , lk . lk_us ); 321 pt = ifm . pt_li [ pt_id ]; 322 i( pt = NULL ) { 323 `RTE_LOG ( ERR , IFM , 325 __FUNCTION__ , pt_id ); 327 i( pt ! NULL &&t-> pmdid = pt_id ) { 328 i( lk . lk_us ) { 329 pt -> lk_us = IFM_ETH_LINK_UP ; 330 pt -> lk_d = lk .link_speed; 331 pt -> lk_duex = lk .link_duplex; 332 `RTE_LOG ( INFO , IFM , 334 pt_id , () lk . lk_d , 335 ( lk . lk_duex == 336 ETH_LINK_FULL_DUPLEX ) ? ("full-duplex") 338 i( pt -> ags & IFM_MASTER ) { 339 pt -> ags | IFM_BONDED ; 340 pt -> bd_cfig -> aive_ave_cou = 341 `e_h_bd_aive_aves_g ( pt -> pmdid , 342 pt -> 343 bd_cfig -> 344 aive_aves , 345 RTE_MAX_ETHPORTS ); 346  h_addr w_mac ; 347 `e_h_maddr_g ( pt -> pmdid , 348 ( h_addr *) 349 & w_mac ); 350 i( memcmp 351 (& w_mac , pt -> maddr , 352 ( h_addr ))) { 353 `RTE_LOG ( INFO , IFM , 355 pt -> pmdid ); 357 `RTE_LOG ( INFO , IFM , 359 pt -> pmdid ); 362 i( pt -> ags & IFM_SLAVE ) { 363 ut8_t ma_ptid = 364 pt -> bd_cfig -> bd_ptid ; 365  e_h_lk lkus ; 366 `e_h_lk_g ( ma_ptid , & lkus ); 367 `RTE_LOG ( INFO , IFM , "P܈%u 'Ma(%u衩ui%u\n\r", pt_id , 368 ma_ptid , lkus . lk_us ); 370 i( ifm_debug & IFM_DEBUG_LOCKS ) 371 `RTE_LOG ( INFO , IFM , 373 __FUNCTION__ , __LINE__ ); 375 i( USE_RTM_LOCKS ) { 376 `m_uock (); 378 `e_rwlock_wre_uock (& rwlock ); 380 i( pt -> v4_li ! NULL ) { 381 i( ifm_debug & IFM_DEBUG_CONFIG ) 382 `RTE_LOG ( INFO , IFM , 384 pt -> pmdid ); 385 i(! ev_e ) { 386 `nd_gtuous_p ( pt ); 387 ev_e = 1; 392 i( ifm_debug & IFM_DEBUG_CONFIG ) 393 `RTE_LOG ( INFO , IFM , 395 pt -> pmdid ); 399 i( pt -> ags & IFM_MASTER ) { 400 pt -> ags &~ IFM_BONDED ; 403 pt -> lk_us = IFM_ETH_LINK_DOWN ; 404 `RTE_LOG ( INFO , IFM , "EVENT-- PORT %u is Link DOWN.\n", 405 pt_id ); 406 i( pt -> ags & IFM_SLAVE ) { 407  e_h_lk lkus ; 408 ut8_t ma_ptid = 409 pt -> bd_cfig -> bd_ptid ; 410 `e_h_lk_g_nowa ( ma_ptid , 411 & lkus ); 412 `RTE_LOG ( INFO , IFM , 414 pt_id , ma_ptid , 415 lkus . lk_us ); 417 i( ifm_debug & IFM_DEBUG_LOCKS ) 418 `RTE_LOG ( INFO , IFM , 420 __FUNCTION__ , __LINE__ ); 421 i( USE_RTM_LOCKS ) { 422 `m_uock (); 424 `e_rwlock_wre_uock (& rwlock ); 426 ev_e = 0; 430 } } 432  $ifm_upde_lkus ( ut8_t pt_id , ut16_t lkus ) 434  e_h_lk lk ; 435 l2_phy_r_t * pt ; 436 i( ifm_debug & IFM_DEBUG_LOCKS ) 437 `RTE_LOG ( INFO , IFM , "%s: Acqugock @ %d\n\r", __FUNCTION__ , 438 __LINE__ ); 440 i( USE_RTM_LOCKS ) { 441 `m_lock (); 443 `e_rwlock_wre_lock (& rwlock ); 445 pt = ifm . pt_li [ pt_id ]; 447 i( pt = NULL ) { 448 `RTE_LOG ( ERR , IFM , 450 __FUNCTION__ , pt_id ); 452 i( pt ! NULL &&t-> pmdid = pt_id ) { 453 `e_h_lk_g ( pt_id , & lk ); 454 i( lkus = IFM_ETH_LINK_UP ) { 455 pt -> adm_us = IFM_ETH_LINK_UP ; 456 if(! lk . lk_us ) { 457 i( `e_h_dev_t_lk_up ( pt_id ) < 0) { 458 `RTE_LOG ( INFO , IFM , 460 __FUNCTION__ , pt -> pmdid ); 462 i( ifm_debug & IFM_DEBUG_LOCKS ) 463 `RTE_LOG ( INFO , IFM , 465 __FUNCTION__ , __LINE__ ); 467 i( USE_RTM_LOCKS ) { 468 `m_uock (); 470 `e_rwlock_wre_uock (& rwlock ); 472 i( ifm_debug & IFM_DEBUG_CONFIG ) 473 `RTE_LOG ( INFO , IFM , 475 __FUNCTION__ , pt -> pmdid ); 476 `nd_gtuous_p ( pt ); 480 } i( lkus = IFM_ETH_LINK_DOWN ) 482  us ; 483 pt -> adm_us = IFM_ETH_LINK_DOWN ; 485 if( lk . lk_us ) { 486 us = `e_h_dev_t_lk_down ( pt_id ); 487 i( us < 0) 489 `tf ("(%" PRIu32 "): PMD setink down... continuing...%" 490 PRId32 "\n", pt_id , us ); 495 i( ifm_debug & IFM_DEBUG_LOCKS ) 496 `RTE_LOG ( INFO , IFM , "%s: Rsgock @ %d\n\r", __FUNCTION__ , 497 __LINE__ ); 499 i( USE_RTM_LOCKS ) { 500 `m_uock (); 502 `e_rwlock_wre_uock (& rwlock ); 504 } } 506  $ifm_t_l2_r_mtu ( ut8_t pt_id , ut16_t mtu ) 508  t ; 509 l2_phy_r_t * pt ; 510 pt = ifm . pt_li [ pt_id ]; 511 i( pt = NULL ) { 512 `RTE_LOG ( ERR , IFM , 514 __FUNCTION__ , pt_id ); 517 i( pt ! NULL &&t-> pmdid = pt_id ) { 518 t = `e_h_dev_t_mtu ( pt_id , mtu ); 519 i( t != 0) 520 `RTE_LOG ( INFO , IFM , 522 t ); 524 i( ifm_debug & IFM_DEBUG_LOCKS ) 525 `RTE_LOG ( INFO , IFM , 527 __FUNCTION__ , __LINE__ ); 529 i( USE_RTM_LOCKS ) { 530 `m_lock (); 532 `e_rwlock_wre_lock (& rwlock ); 534 pt -> mtu = mtu; 535 i( ifm_debug & IFM_DEBUG_LOCKS ) 536 `RTE_LOG ( INFO , IFM , 538 __FUNCTION__ , __LINE__ ); 540 i( USE_RTM_LOCKS ) { 541 `m_uock (); 543 `e_rwlock_wre_uock (& rwlock ); 548 } } 550  $ifm_t_pt_omisc ( ut8_t pt_id , ut8_ ab ) 552 l2_phy_r_t * pt ; 553 i( ifm_debug & IFM_DEBUG_LOCKS ) 554 `RTE_LOG ( INFO , IFM , "%s: Acquiring WRock @ %d\n\r", 555 __FUNCTION__ , __LINE__ ); 556 i( USE_RTM_LOCKS ) { 557 `m_lock (); 559 `e_rwlock_wre_lock (& rwlock ); 561 pt = ifm . pt_li [ pt_id ]; 562 i( pt = NULL ) { 563 `RTE_LOG ( ERR , IFM , 565 __FUNCTION__ , pt_id ); 567 i( pt ! NULL &&t-> pmdid = pt_id ) { 568 i( ab == 1) { 569 `e_h_omiscuous_ab ( pt_id ); 570 pt -> omisc = 1; 572 `e_h_omiscuous_dib ( pt_id ); 573 pt -> omisc = 0; 576 i( ifm_debug & IFM_DEBUG_LOCKS ) 577 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 578 __FUNCTION__ , __LINE__ ); 579 i( USE_RTM_LOCKS ) { 580 `m_uock (); 582 `e_rwlock_wre_uock (& rwlock ); 584 } } 586 t32_t $ifm_g_ive_pts () 588  ifm . t_cfigud ; 589 } } 591 t32_t $ifm_g_ts_lized () 593  ifm . t_tlized ; 594 } } 596 ut16_t $ifm_ive_bulk_pkts ( ut8_t pt_id , ut16_t qid , 597  e_mbuf ** rx_pkts ) 599 ut64_t no_of_rcvd_pkt ; 600 no_of_rcvd_pkt = 601 `e_h_rx_bur ( pt_id , qid , rx_pkts , IFM_BURST_SIZE ); 602 i( ifm_debug & IFM_DEBUG_RXTX ) 603 `RTE_LOG ( INFO , IFM , 605 pt_id , no_of_rcvd_pkt ); 606  no_of_rcvd_pkt ; 607 } } 609 ut16_t $ifm_sm_bulk_pkts ( l2_phy_r_t * pt , 610  e_mbuf ** tx_pkts , ut64_t kts ) 612 ut32_t bur_tx_day_time = IFM_BURST_TX_WAIT_US ; 613 ut32_t bur_tx_y_num = IFM_BURST_TX_RETRIES ; 614 ut32_t y ; 615 ut32_t no_of_tx_pkt ; 616 i( ifm_debug & IFM_DEBUG_LOCKS ) 617 `RTE_LOG ( INFO , IFM , "%s: Acquiring RDock @ %d\n\r", 618 __FUNCTION__ , __LINE__ ); 619 i( USE_RTM_LOCKS ) { 620 `m_lock (); 622 `e_rwlock_ad_lock (& rwlock ); 624 no_of_tx_pkt = `e_h_tx_bur ( pt -> pmdid , IFM_TX_DEFAULT_Q , tx_pkts , 625 kts ); 626 i( `uiky ( no_of_tx_pkt < kts )) { 627 y = 0; 628  no_of_tx_pkt < IFM_BURST_SIZE 629 && y ++ < bur_tx_y_num ) { 630 `e_day_us ( bur_tx_day_time ); 631 no_of_tx_pkt = 632 `e_h_tx_bur ( pt -> pmdid , IFM_TX_DEFAULT_Q , 633 & tx_pkts [ no_of_tx_pkt ], 634 IFM_BURST_SIZE - no_of_tx_pkt ); 637 i( ifm_debug & IFM_DEBUG_RXTX ) 638 `RTE_LOG ( INFO , IFM , 640 no_of_tx_pkt ); 641 i( ifm_debug & IFM_DEBUG_LOCKS ) 642 `RTE_LOG ( INFO , IFM , "%s: Releasing RDock @ %d\n\r", 643 __FUNCTION__ , __LINE__ ); 644 i( USE_RTM_LOCKS ) { 645 `m_uock (); 647 `e_rwlock_ad_uock (& rwlock ); 649  no_of_tx_pkt ; 650 } } 652  $ifm_sm_sg_pkt ( l2_phy_r_t * pt ,  e_mbuf * tx_pkts ) 654 ut64_t tx_kts = 0; 655 i( tx_pkts = NULL || pt == NULL) { 656 `RTE_LOG ( INFO , IFM , 658  IFM_FAILURE ; 660 i( ifm_debug & IFM_DEBUG_RXTX ) 661 `RTE_LOG ( INFO , IFM , 663 pt -> pmdid ); 664 i( ifm_debug & IFM_DEBUG_LOCKS ) 665 `RTE_LOG ( INFO , IFM , "%s: Acquiring RDock @ %d\n\r", 666 __FUNCTION__ , __LINE__ ); 668 i( USE_RTM_LOCKS ) { 669 `m_lock (); 671 `e_rwlock_ad_lock (& rwlock ); 673 tx_kts = 674 `e_h_tx_bufr ( pt -> pmdid , IFM_TX_DEFAULT_Q ,t-> tx_bufr , 675 tx_pkts ); 676 i( ifm_debug & IFM_DEBUG_RXTX ) 677 `RTE_LOG ( INFO , IFM , 679 pt -> pmdid , tx_kts ); 680 i( ifm_debug & IFM_DEBUG_LOCKS ) 681 `RTE_LOG ( INFO , IFM , "%s: Releasing RWock @ %d\n\r", 682 __FUNCTION__ , __LINE__ ); 684 i( USE_RTM_LOCKS ) { 685 `m_uock (); 687 `e_rwlock_ad_uock (& rwlock ); 689 i( ifm_debug & IFM_DEBUG_LOCKS ) 690 `RTE_LOG ( INFO , IFM , "%s: Acquiring WRock @ %d\n\r", 691 __FUNCTION__ , __LINE__ ); 693 i( USE_RTM_LOCKS ) { 694 `m_lock (); 696 `e_rwlock_wre_lock (& rwlock ); 698 pt -> n_txpkts += 699 `e_h_tx_bufr_ush ( pt -> pmdid , IFM_TX_DEFAULT_Q , 700 pt -> tx_bufr ); 701 i( ifm_debug & IFM_DEBUG_LOCKS ) 702 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock @ %d\n\r", 703 __FUNCTION__ , __LINE__ ); 705 i( USE_RTM_LOCKS ) { 706 `m_uock (); 708 `e_rwlock_wre_uock (& rwlock ); 710 i( ifm_debug & IFM_DEBUG_RXTX ) 711 `RTE_LOG ( INFO , IFM , 713 pt -> n_txpkts ); 714  tx_kts ; 715 } } 717 t16_t $ifm_add_v4_pt ( ut8_t pt_id , ut32_t addr , ut32_ add ) 719 l2_phy_r_t * pt ; 720 v4li_t * cf ; 721 i( ifm_debug & IFM_DEBUG_LOCKS ) 722 `RTE_LOG ( INFO , IFM , "%s: Acqugock @ %d\n\r", __FUNCTION__ , 723 __LINE__ ); 725 i( USE_RTM_LOCKS ) { 726 `m_lock (); 728 `e_rwlock_wre_lock (& rwlock ); 730 pt = ifm . pt_li [ pt_id ]; 731 i( pt = NULL ) { 732 `RTE_LOG ( ERR , IFM , 734 __FUNCTION__ , pt_id ); 736 i( pt ! NULL &&t-> pmdid = pt_id ) { 737 cf = ( v4li_t * `e_zmloc ( NULL , (ipv4list_t), 738 RTE_CACHE_LINE_SIZE ); 739 i( cf ! NULL ) { 740 cf -> xt = NULL ; 742 cf -> addr = ipaddr; 743 cf -> pt =ort; 744 cf -> add =ddrlen; 745 i( pt -> v4_li = NULL ) 746 pt -> ags | IFM_IPV4_ENABLED ; 747 cf -> xt = ( v4li_t * pt -> v4_li ; 748 pt -> v4_li = ( v4li_t * cf ; 749 i( ifm_debug & IFM_DEBUG_LOCKS ) 750 `RTE_LOG ( INFO , IFM , 752 __FUNCTION__ , __LINE__ ); 754 i( USE_RTM_LOCKS ) { 755 `m_uock (); 757 `e_rwlock_wre_uock (& rwlock ); 762 i( ifm_debug & IFM_DEBUG_LOCKS ) 763 `RTE_LOG ( INFO , IFM , "%s: Rsgock @ %d\n\r", __FUNCTION__ , 764 __LINE__ ); 766 i( USE_RTM_LOCKS ) { 767 `m_uock (); 769 `e_rwlock_wre_uock (& rwlock ); 772 } } 774 t16_t $ifm_move_v4_pt ( ut8_t pt_id , ut32_t addr , 775 ut32_t add ) 777 l2_phy_r_t * pt ; 778 v4li_t * li , * evli = NULL ; 779 i( ifm_debug & IFM_DEBUG_LOCKS ) 780 `RTE_LOG ( INFO , IFM , "%s: Acqugock @ %d\n\r", __FUNCTION__ , 781 __LINE__ ); 783 i( USE_RTM_LOCKS ) { 784 `m_lock (); 786 `e_rwlock_wre_lock (& rwlock ); 788 pt = ifm . pt_li [ pt_id ]; 789 i( pt = NULL ) { 790 `RTE_LOG ( ERR , IFM , 792 __FUNCTION__ , pt_id ); 794 i( pt ! NULL &&t-> pmdid = pt_id ) { 795 i( pt -> v4_li = NULL ) { 796 i( ifm_debug & IFM_DEBUG_LOCKS ) 797 `RTE_LOG ( INFO , IFM , 799 __FUNCTION__ , __LINE__ ); 801 i( USE_RTM_LOCKS ) { 802 `m_uock (); 804 `e_rwlock_wre_uock (& rwlock ); 808 li = ( v4li_t * pt -> v4_li ; 809  li ! NULL ) { 810 i( add = li ->addrlen && 811 `memy (& li -> addr , &addr, add )) { 812 i( li = pt -> v4_li ) { 813 pt -> v4_li = li -> xt ; 815 i( evli ! NULL ) 816 evli -> xt = li ->next; 818 pt -> ags &~ IFM_IPV4_ENABLED ; 819 `e_ ( li ); 820 i( ifm_debug & IFM_DEBUG_LOCKS ) 821 `RTE_LOG ( INFO , IFM , 823 __FUNCTION__ , __LINE__ ); 825 i( USE_RTM_LOCKS ) { 826 `m_uock (); 828 `e_rwlock_wre_uock (& rwlock ); 832 evli = li ; 833 li = ii-> xt ; 837 i( ifm_debug & IFM_DEBUG_LOCKS ) 838 `RTE_LOG ( INFO , IFM , "%s: Rsgock @ %d\n\r", __FUNCTION__ , 839 __LINE__ ); 841 i( USE_RTM_LOCKS ) { 842 `m_uock (); 844 `e_rwlock_wre_uock (& rwlock ); 847 } } 849 t8_t $ifm_add_v6_pt ( ut8_t pt_id , ut8_ 6addr [], ut32_t add ) 851 l2_phy_r_t * pt ; 852 v6li_t * 6cf ; 853 i( ifm_debug & IFM_DEBUG_LOCKS ) 854 `RTE_LOG ( INFO , IFM , "%s: Acqugock @ %d\n\r", __FUNCTION__ , 855 __LINE__ ); 857 i( USE_RTM_LOCKS ) { 858 `m_lock (); 860 `e_rwlock_wre_lock (& rwlock ); 862 pt = ifm . pt_li [ pt_id ]; 863 i( pt = NULL ) { 864 `RTE_LOG ( ERR , IFM , 866 __FUNCTION__ , pt_id ); 868 i( pt ! NULL &&t-> pmdid = pt_id ) { 869 6cf = ( v6li_t * `e_zmloc ( NULL , (ipv6list_t), 870 RTE_CACHE_LINE_SIZE ); 871 i( 6cf ! NULL ) { 872 6cf -> xt = NULL ; 873 `memy ( 6cf -> addr , 6addr , IFM_IPV6_ADDR_SIZE ); 874 6cf -> pt =ort; 875 6cf -> add =ddrlen; 877 i( pt -> v6_li = NULL ) { 878 pt -> ags | IFM_IPV6_ENABLED ; 880 6cf -> xt = ( v6li_t * pt -> v6_li ; 881 pt -> v6_li = ( v6li_t * 6cf ; 882 i( ifm_debug & IFM_DEBUG_LOCKS ) 883 `RTE_LOG ( INFO , IFM , 885 __FUNCTION__ , __LINE__ ); 887 i( USE_RTM_LOCKS ) { 888 `m_uock (); 890 `e_rwlock_wre_uock (& rwlock ); 895 i( ifm_debug & IFM_DEBUG_LOCKS ) 896 `RTE_LOG ( INFO , IFM , "%s: Rsgock @ %d\n\r", __FUNCTION__ , 897 __LINE__ ); 899 i( USE_RTM_LOCKS ) { 900 `m_uock (); 902 `e_rwlock_wre_uock (& rwlock ); 905 } } 907 t16_t $ifm_move_v6_pt ( ut8_t pt_id , ut32_t 6addr , 908 ut32_t add ) 910 l2_phy_r_t * pt ; 911 v6li_t * 6li , * ev6li = NULL ; 913 i( ifm_debug & IFM_DEBUG_LOCKS ) 914 `RTE_LOG ( INFO , IFM , "%s: Acqugock @ %d\n\r", __FUNCTION__ , 915 __LINE__ ); 916 i( USE_RTM_LOCKS ) 917 `m_lock (); 919 `e_rwlock_wre_lock (& rwlock ); 920 pt = ifm . pt_li [ pt_id ]; 921 i( pt = NULL ) { 922 i( ifm_debug & IFM_DEBUG_LOCKS ) 923 `RTE_LOG ( INFO , IFM , "%s: Releasingock @ %d\n\r", 924 __FUNCTION__ , __LINE__ ); 925 i( USE_RTM_LOCKS ) { 926 `m_uock (); 928 `e_rwlock_wre_uock (& rwlock ); 930 `RTE_LOG ( ERR , IFM , 932 __FUNCTION__ , pt_id ); 934 i( pt ! NULL &&t-> pmdid = pt_id ) { 935 i( pt -> v6_li = NULL ) { 936 i( ifm_debug & IFM_DEBUG_LOCKS ) 937 `RTE_LOG ( INFO , IFM , 939 __FUNCTION__ , __LINE__ ); 941 i( USE_RTM_LOCKS ) { 942 `m_uock (); 944 `e_rwlock_wre_uock (& rwlock ); 948 6li = ( v6li_t * pt -> v6_li ; 949  6li ! NULL ) { 950 i( add = 6li ->addrlen && 951 `memy (& 6li -> addr , & 6addr , add )) { 952 i( 6li = pt -> v6_li ) { 953 pt -> v6_li = 6li -> xt ; 955 i( ev6li ! NULL ) 956 ev6li -> xt = 957 6li -> xt ; 959 pt -> ags &~ IFM_IPV6_ENABLED ; 960 `e_ ( 6li ); 961 i( ifm_debug & IFM_DEBUG_LOCKS ) 962 `RTE_LOG ( INFO , IFM , 964 __FUNCTION__ , __LINE__ ); 966 i( USE_RTM_LOCKS ) { 967 `m_uock (); 969 `e_rwlock_wre_uock (& rwlock ); 973 ev6li = 6li ; 974 6li = ip6li-> xt ; 978 i( ifm_debug & IFM_DEBUG_LOCKS ) 979 `RTE_LOG ( INFO , IFM , "%s: Rsgock @ %d\n\r", __FUNCTION__ , 980 __LINE__ ); 981 i( USE_RTM_LOCKS ) 982 `m_uock (); 984 `e_rwlock_wre_uock (& rwlock ); 986 } } 988 t32_t $ifm_chk_pt_v4_abd ( ut8_t pt_id ) 990 l2_phy_r_t * pt ; 992 i( ifm_debug & IFM_DEBUG_LOCKS ) 993 `RTE_LOG ( INFO , IFM , "%s: Acquiring RDock @ %d\n\r", 994 __FUNCTION__ , __LINE__ ); 995 i( USE_RTM_LOCKS ) 996 `m_lock (); 998 `e_rwlock_ad_lock (& rwlock ); 999 pt = ifm . pt_li [ pt_id ]; 1000 i( pt = NULL ) { 1001 `RTE_LOG ( ERR , IFM , 1003 __FUNCTION__ , pt_id ); 1004 i( ifm_debug & IFM_DEBUG_LOCKS ) 1005 `RTE_LOG ( INFO , IFM , "%s: Releasingock @ %d\n\r", 1006 __FUNCTION__ , __LINE__ ); 1007 i( USE_RTM_LOCKS ) 1008 `m_uock (); 1010 `e_rwlock_ad_uock (& rwlock ); 1011  IFM_FAILURE ; 1013 i(( pt -> ags & IFM_IPV4_ENABLED ) == 0) { 1014 i( ifm_debug & IFM_DEBUG_LOCKS ) 1015 `RTE_LOG ( INFO , IFM , "%s: Releasingock @ %d\n\r", 1016 __FUNCTION__ , __LINE__ ); 1017 i( USE_RTM_LOCKS ) 1018 `m_uock (); 1020 `e_rwlock_ad_uock (& rwlock ); 1023 i( ifm_debug & IFM_DEBUG_LOCKS ) 1024 `RTE_LOG ( INFO , IFM , "%s: Releasingock @ %d\n\r", 1025 __FUNCTION__ , __LINE__ ); 1026 i( USE_RTM_LOCKS ) 1027 `m_uock (); 1029 `e_rwlock_ad_uock (& rwlock ); 1032 } } 1034 t32_t $ifm_chk_pt_v6_abd ( ut8_t pt_id ) 1036 l2_phy_r_t * pt ; 1038 i( ifm_debug & IFM_DEBUG_LOCKS ) 1039 `RTE_LOG ( INFO , IFM , "%s: Acquiring RDock @ %d\n\r", 1040 __FUNCTION__ , __LINE__ ); 1041 i( USE_RTM_LOCKS ) 1042 `m_lock (); 1044 `e_rwlock_ad_lock (& rwlock ); 1046 pt = ifm . pt_li [ pt_id ]; 1047 i( pt = NULL ) { 1048 i( ifm_debug & IFM_DEBUG ) 1049 `RTE_LOG ( ERR , IFM , "%s: Port %u infoot found..." 1051 __FUNCTION__ , pt_id ); 1052 i( ifm_debug & IFM_DEBUG_LOCKS ) 1053 `RTE_LOG ( INFO , IFM , "%s: Releasing RDock @ %d\n\r", 1054 __FUNCTION__ , __LINE__ ); 1055 i( USE_RTM_LOCKS ) 1056 `m_uock (); 1058 `e_rwlock_ad_uock (& rwlock ); 1059  IFM_FAILURE ; 1061 i(( pt -> ags & IFM_IPV6_ENABLED ) == 0) { 1062 i( ifm_debug & IFM_DEBUG_LOCKS ) 1063 `RTE_LOG ( INFO , IFM , "%s: Releasing RDock @ %d\n\r", 1064 __FUNCTION__ , __LINE__ ); 1065 i( USE_RTM_LOCKS ) 1066 `m_uock (); 1068 `e_rwlock_ad_uock (& rwlock ); 1071 i( ifm_debug & IFM_DEBUG_LOCKS ) 1072 `RTE_LOG ( INFO , IFM , "%s: Releasing RDock @ %d\n\r", 1073 __FUNCTION__ , __LINE__ ); 1074 i( USE_RTM_LOCKS ) 1075 `m_uock (); 1077 `e_rwlock_ad_uock (& rwlock ); 1080 } } 1082  $ifm_gi_f_lkupde ( ut32_t id , 1083 (* cb_lkupde ( ut8_t , )) 1085 ifm . if_ [ifm. n ]. cb_lkupde = cb_linkupdate; 1086 ifm . if_ [ifm. n ]. id = clientid; 1087 ifm . n ++; 1088 } } 1090  $ifm_pt_tup ( ut8_t pt_id , pt_cfig_t * pcfig ) 1092  us , sock ; 1093  buf [12]; 1094  e_h_dev_fo dev_fo ; 1095  e_h_lk lkus ; 1096 l2_phy_r_t * pt = NULL ; 1098 i(! ifm . t_tlized ) { 1099 `RTE_LOG ( ERR , IFM , "%s: Failedo configureort %u. 0orts" 1101 __FUNCTION__ , pt_id ); 1102  IFM_FAILURE ; 1104 i( ifm_debug & IFM_DEBUG_CONFIG ) 1105 `RTE_LOG ( INFO , IFM , "%s: Configuringort %u with " 1106 "xq: %u,txq: %u\n\r", __FUNCTION__ , 1107 pt_id , pcfig -> x_queue ,cfig-> x_queue ); 1108 i( ifm_debug & IFM_DEBUG_LOCKS ) 1109 `RTE_LOG ( INFO , IFM , "%s: Acquiring WRock1 @ %d\n\r", 1110 __FUNCTION__ , __LINE__ ); 1111 i( USE_RTM_LOCKS ) 1112 `m_lock (); 1114 `e_rwlock_wre_lock (& rwlock ); 1116 i( ifm . pt_li [ pt_id ] = NULL ) { 1117 ifm . pt_li [ pt_id ] = 1118 ( l2_phy_r_t * `e_zmloc ( NULL , 1120 ( l2_phy_r_t ), 1121 RTE_CACHE_LINE_SIZE ); 1122 ifm . pt_li [ pt_id ]-> pmdid =ort_id; 1124 i( ifm_debug & IFM_DEBUG_LOCKS ) 1125 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock1 @ %d\n\r", 1126 __FUNCTION__ , __LINE__ ); 1127 i( USE_RTM_LOCKS ) 1128 `m_uock (); 1130 `e_rwlock_wre_uock (& rwlock ); 1132 `e_h_lk_g ( pt_id , & lkus ); 1133 i( lkus . lk_us ) { 1134 i( ifm_debug & IFM_DEBUG_CONFIG ) { 1135 `RTE_LOG ( INFO , IFM , "%s: %u is up.Stop it before" 1136 "ecfigurg.\n\r", __FUNCTION__ , pt_id ); 1138 `e_h_dev_ ( pt_id ); 1141 us = `e_h_dev_cfigu ( pt_id , pcfig -> x_queue , 1142 pcfig -> x_queue , &pcfig-> pt_cf ); 1143 i( us < 0) { 1144 `ifm_move_pt_das ( pt_id ); 1145 `RTE_LOG ( ERR , IFM , "%s:te_eth_dev_configure is failed" 1146 "f܅܈%u.\n\r", __FUNCTION__ , pt_id ); 1147  IFM_FAILURE ; 1149 us = `e_h_dev_back_gi ( pt_id , 1150 RTE_ETH_EVENT_INTR_LSC , 1151 lsi_evt_back , NULL ); 1152 i( us < 0) { 1153 `ifm_move_pt_das ( pt_id ); 1154 `RTE_LOG ( ERR , IFM , "%s:te_eth_dev_callback_register()" 1155 " faed f܅܈%u.\n\r", __FUNCTION__ , pt_id ); 1156  IFM_FAILURE ; 1159 i( pcfig -> omisc ) 1160 `e_h_omiscuous_ab ( pt_id ); 1162 sock = `e_h_dev_sock_id ( pt_id ); 1163 i( sock == -1) 1164 `RTE_LOG ( ERR , IFM , "%s: Warning:te_eth_dev_socket_id," 1166 "ouong%u\n\r", __FUNCTION__ , pt_id ); 1168  xqs ; 1169  xqs = 0;txq< pcfig -> x_queue ;txqs++) { 1170 us = `e_h_tx_queue_tup ( pt_id , xqs , 1171 IFM_TX_DESC_DEFAULT , sock , 1172 &( pcfig -> tx_cf )); 1173 i( us < 0) { 1174 `ifm_move_pt_das ( pt_id ); 1175 `RTE_LOG ( ERR , IFM , "%s:te_eth_tx_queue_setup failed" 1176 " f܅܈%u\n\r", __FUNCTION__ , pt_id ); 1177  IFM_FAILURE ; 1180 pt = `ifm_g_pt ( pt_id ); 1181 i( pt = NULL ) { 1182 `RTE_LOG ( INFO , IFM , "%s: P܈iNULL @ %d\n\r", __FUNCTION__ , 1183 __LINE__ ); 1184  IFM_FAILURE ; 1187 i( ifm_debug & IFM_DEBUG_LOCKS ) 1188 `RTE_LOG ( INFO , IFM , "%s: Acquiring WRock 2 @ %d\n\r", 1189 __FUNCTION__ , __LINE__ ); 1190 i( USE_RTM_LOCKS ) 1191 `m_lock (); 1193 `e_rwlock_wre_lock (& rwlock ); 1195 i( pt -> tx_buf_n == 0) { 1196 pt -> tx_buf_n = `RTE_ETH_TX_BUFFER_SIZE ( IFM_BURST_SIZE ); 1198 pt -> tx_bufr = `e_zmloc_sock ("tx_bufr",t-> tx_buf_n , 0, 1199 `e_h_dev_sock_id ( pt_id )); 1201 i( pt -> tx_bufr = NULL ) { 1202 `ifm_move_pt_das ( pt_id ); 1203 `RTE_LOG ( ERR , IFM , "%s: Failedollocatex buffers for" 1204 "܈%u\n\r", __FUNCTION__ , pt_id ); 1205 i( ifm_debug & IFM_DEBUG_LOCKS ) 1206 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock2 %d\n\r", 1207 __FUNCTION__ , __LINE__ ); 1208 i( USE_RTM_LOCKS ) 1209 `m_uock (); 1211 `e_rwlock_wre_uock (& rwlock ); 1212  IFM_FAILURE ; 1214 `e_h_tx_bufr_ ( pt -> tx_bufr , IFM_BURST_SIZE ); 1216 `rtf ( buf , "MEMPOOL%d", pt_id ); 1217 pt -> mempo = `e_mempo_ ( buf , 1218 pcfig -> mempo . po_size , 1219 pcfig -> mempo . bufr_size , 1220 pcfig -> mempo . che_size , 1222 e_pktmbuf_po_ive ), 1223 e_pktmbuf_po_ , NULL , 1224 e_pktmbuf_ , NULL , sock , 0); 1225 i( pt -> mempo = NULL ) { 1226 `ifm_move_pt_das ( pt_id ); 1227 `RTE_LOG ( ERR , IFM , "%s:te_mempool_create is failed forort" 1229 __FUNCTION__ , pt_id , `e_ ( e_o )); 1230 i( ifm_debug & IFM_DEBUG_LOCKS ) 1231 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock2 %d\n\r", 1232 __FUNCTION__ , __LINE__ ); 1233 i( USE_RTM_LOCKS ) 1234 `m_uock (); 1236 `e_rwlock_wre_uock (& rwlock ); 1237  IFM_FAILURE ; 1239  xqs ; 1240  xqs = 0;rxq< pcfig -> x_queue ;rxqs++) { 1241 us = `e_h_rx_queue_tup ( pt_id , xqs , 1242 IFM_RX_DESC_DEFAULT , sock , 1243 &( pcfig -> rx_cf ), 1244 pt -> mempo ); 1245 i( us < 0) { 1246 `ifm_move_pt_das ( pt_id ); 1247 `RTE_LOG ( ERR , IFM , 1250 __FUNCTION__ , pt_id , xqs , 1251 `e_ ( e_o )); 1252 i( ifm_debug & IFM_DEBUG_LOCKS ) 1253 `RTE_LOG ( INFO , IFM , 1255 __FUNCTION__ , __LINE__ ); 1256 i( USE_RTM_LOCKS ) 1257 `m_uock (); 1259 `e_rwlock_wre_uock (& rwlock ); 1260  IFM_FAILURE ; 1264 i( ifm_debug & IFM_DEBUG_LOCKS ) 1265 `RTE_LOG ( INFO , IFM , "%s: Releasing WRock2 @ %d\n\r", 1266 __FUNCTION__ , __LINE__ ); 1267 i( USE_RTM_LOCKS ) 1268 `m_uock (); 1270 `e_rwlock_wre_uock (& rwlock ); 1271 us = `e_h_dev_t ( pt_id ); 1272 i( us < 0) { 1273 `ifm_move_pt_das ( pt_id ); 1274 `RTE_LOG ( ERR , IFM , "%s:te_eth_dev_start is failed for" 1275 "܈%u.\n\r", __FUNCTION__ , pt_id ); 1276  IFM_FAILURE ; 1278 `e_day_ms (5000); 1280 i( ifm_debug & IFM_DEBUG_LOCKS ) 1281 `RTE_LOG ( INFO , IFM , "%s: Acquiring WRock3 @ %d\n\r", 1282 __FUNCTION__ , __LINE__ ); 1283 i( USE_RTM_LOCKS ) 1284 `m_lock (); 1286 `e_rwlock_wre_lock (& rwlock ); 1287 `e_h_maddr_g ( pt_id , ( h_addr *) pt -> maddr ); 1288 i( pcfig -> omisc ) 1289 pt -> omisc = 1; 1290 `e_h_lk_g ( pt_id , & lkus ); 1292 pt -> lk_duex = lkus .link_duplex; 1293 pt -> lk_auteg = lkus .link_autoneg; 1294 pt -> lk_d = lkus .link_speed; 1295 pt -> adm_us = pcfig -> e ; 1298 `memt (& dev_fo , 0, (dev_info)); 1299 `e_h_dev_fo_g ( pt_id , & dev_fo ); 1300 pt -> m_rx_bufsize = dev_fo .min_rx_bufsize; 1301 pt -> max_rx_pk = dev_fo .max_rx_pktlen; 1302 pt -> max_rx_queues = dev_fo .max_rx_queues; 1303 pt -> max_tx_queues = dev_fo .max_tx_queues; 1304 `e_h_dev_g_mtu ( pt_id , &( pt -> mtu )); 1307 pt -> ve_bulk_pkts = & ifm_ive_bulk_pkts ; 1308 pt -> sm_bulk_pkts = & ifm_sm_bulk_pkts ; 1309 pt -> sm_sg_pkt = & ifm_sm_sg_pkt ; 1310 i( ifm_debug & IFM_DEBUG_LOCKS ) 1311 `RTE_LOG ( INFO , IFM , "%s: Releasing WR3ock @ %d\n\r", 1312 __FUNCTION__ , __LINE__ ); 1313 i( USE_RTM_LOCKS ) 1314 `m_uock (); 1316 `e_rwlock_wre_uock (& rwlock ); 1317 `RTE_LOG ( INFO , IFM , "%s: Port %u is successfully configured.\n\r", 1318 __FUNCTION__ , pt_id ); 1319  IFM_SUCCESS ; 1320 } } 1322  $ifm_cfigu_pts ( pt_cfig_t * pcfig ) 1324 ut8_t pt_id ; 1325  us = 0; 1326 i(! ifm . t_tlized ) { 1327 `RTE_LOG ( ERR , IFM , "%s, Configuringorts failed. Zeroorts " 1328 "tlized durg PCIrobe", __FUNCTION__ ); 1329  IFM_FAILURE ; 1331 i( pcfig = NULL ) { 1332 `RTE_LOG ( ERR , IFM , "%s, Configuringorts failed. " 1333 "Pamcfig iNULL\n\r", __FUNCTION__ ); 1334  IFM_FAILURE ; 1338  pt_id = 0;t_id < ifm . t_tlized ;ort_id++) { 1339 i( ifm_debug & IFM_DEBUG_CONFIG ) 1340 `RTE_LOG ( INFO , IFM , "Call ifm_port_setup %u\n\r", 1341 pt_id ); 1342 us = 1343 `ifm_pt_tup ( pcfig [ pt_id ].port_id, &pconfig[port_id]); 1344 i( us = IFM_SUCCESS ) 1345 ifm . t_cfigud ++; 1347 i(! ifm . t_cfigud ) { 1348 `RTE_LOG ( ERR , IFM , "%s: Zeroortsre configured\n\r", 1349 __FUNCTION__ ); 1350  IFM_FAILURE ; 1352 `RTE_LOG ( INFO , IFM , "%s: Number oforts sucessfully configured:" 1353 " %d\n\r", __FUNCTION__ , ifm . t_cfigud ); 1354  IFM_SUCCESS ; 1355 } } 1357  $t_r_das () 1359 l2_phy_r_t * pt ; 1360  i = 0; 1361  sockaddr_ ; 1362 `tf ("\n\r"); 1364 i( ifm_debug & IFM_DEBUG_LOCKS ) 1365 `RTE_LOG ( INFO , IFM , "%s: Acquiring RWock @ %d\n\r", 1366 __FUNCTION__ , __LINE__ ); 1367 i( USE_RTM_LOCKS ) 1368 `m_lock (); 1370 `e_rwlock_ad_lock (& rwlock ); 1372  i = 0; i < RTE_MAX_ETHPORTS && ifm . pt_li [i]; i++) { 1373 pt = ifm . pt_li [ i ]; 1374 `tf (" %u", pt -> pmdid ); 1375 i( pt -> iame && ` (port->ifname)) { 1376 `tf (" (%s)\t", pt -> iame ); 1378 `tf ("\t\t"); 1379 `tf ("MAC:%02x:%02x:%02x:%02x:%02x:%02x Adminstate:%s" 1381 pt -> maddr [0],ort->macaddr[1], 1382 pt -> maddr [2],ort->macaddr[3], 1383 pt -> maddr [4],ort->macaddr[5], 1384 pt -> adm_us ? "UP" : "DOWN", 1385 pt -> lk_us ? "UP" : "DOWN"); 1386 `tf ("\t\t"); 1387 `tf ("Sed: %u, %s-duex\n\r", pt -> lk_d , 1388 pt -> lk_duex ? "full" : "half"); 1389 `tf ("\t\t"); 1391 i( pt -> v4_li ! NULL ) { 1392 . s_addr . s_addr = 1393 ()(( v4li_t *( pt -> v4_li ))-> 1394 addr ; 1395 `tf ("IP: %s/%d", `_ ( . s_addr ), 1396 (( v4li_t *( pt -> v4_li ))-> add ); 1398 `tf ("IP: NA"); 1401 `tf ("\r\n"); 1402 `tf ("\t\t"); 1403 i( pt -> v6_li ! NULL ) { 1404 ut8_t * addr = 1405 (( v6li_t *( pt -> v6_li ))-> addr ; 1406 tf 1408 addr [0],ddr[1],ddr[2],ddr[3],ddr[4], 1409 addr [5],ddr[6],ddr[7],ddr[8],ddr[9], 1410 addr [10],ddr[11],ddr[12],ddr[13],ddr[14], 1411 addr [15]); 1413 `tf ("IPv6: NA"); 1416 i( pt -> ags & IFM_SLAVE ) { 1417 `tf (" IFM_SLAVE "); 1418 `tf (" MasterPort: %u", 1419 pt -> bd_cfig -> bd_ptid ); 1421 i( pt -> ags & IFM_MASTER ) { 1422 `tf (" IFM_MASTER "); 1423 `tf (" Mode: %u", pt -> bd_cfig -> mode ); 1424 `tf (" PrimyPt: %u", pt -> bd_cfig -> imy ); 1425 `tf ("\n\r"); 1426 `tf ("\t\tSlavePortCount: %u", 1427 pt -> bd_cfig -> ave_cou ); 1428 `tf (" SlavePorts:"); 1429  i ; 1430  i = 0; i < pt -> bd_cfig -> ave_cou ; i++) { 1431 `tf (" %u ", pt -> bd_cfig -> aves [ i ]); 1433 `tf (" ActivePortCount: %u", 1434 pt -> bd_cfig -> aive_ave_cou ); 1435 `tf (" ActivePorts:"); 1436  i = 0; i < pt -> bd_cfig -> aive_ave_cou ; 1437 i ++) { 1438 `tf (" %u ", 1439 pt -> bd_cfig -> aive_aves [ i ]); 1441 `tf ("\n\r"); 1442 `tf ("\t\t"); 1443 `tf ("Link_monitor_freq: %u ms ", 1444 pt -> bd_cfig -> _ms ); 1445 `tf (" Link_up_prop_delay: %u ms ", 1446 pt -> bd_cfig -> lk_up_day_ms ); 1447 `tf (" Link_down_prop_delay: %u ms ", 1448 pt -> bd_cfig -> lk_down_day_ms ); 1449 `tf ("\n\r"); 1450 `tf ("\t\t"); 1451 `tf ("Xmit_policy: %u", 1452 pt -> bd_cfig -> xm_picy ); 1454 `tf ("\n\r"); 1455 `tf ("\t\t"); 1456 `tf ("n_rxpkts: %" PRIu64 " ,n_txpkts: %" PRIu64 " ,", 1457 pt -> n_rxpkts ,t-> n_txpkts ); 1458  e_h_s h_s ; 1459 `e_h_s_g ( pt -> pmdid , & h_s ); 1460 `tf ("pkts_: %" PRIu64 " ,", h_s . acks ); 1461 `tf ("pkts_out: %" PRIu64 " ", h_s . acks ); 1462 `tf ("\n\r"); 1463 `tf ("\t\t"); 1464 `tf ("_rs: %" PRIu64 " ,", h_s . s ); 1465 `tf ("_misd: %" PRIu64 " ,", h_s . imisd ); 1466 `tf ("out_rs: %" PRIu64 " ,", h_s . ۼs ); 1467 `tf ("mbuf_rs: %" PRIu64 " ", h_s . rx_nombuf ); 1468 `tf ("\n\r"); 1469 `tf ("\n\r"); 1471 i( ifm_debug & IFM_DEBUG_LOCKS ) 1472 `RTE_LOG ( INFO , IFM , "%s: Releasing RWock @ %d\n\r", 1473 __FUNCTION__ , __LINE__ ); 1474 i( USE_RTM_LOCKS ) 1475 `m_uock (); 1477 `e_rwlock_ad_uock (& rwlock ); 1478 } } @VIL/l2l3_stack/interface.h 16 #ide INTERFACE_H 17  #INTERFACE_H ) 19  ~ 20  ~ 21  ~ 22  ~ 23  ~ 24  ~ 25  ~ 26  ~ 27  ~ 28  ~ 29  ~ 30  ~ 31  ~ 32  ~ 33  ~ 34  ~ 35  ~ 36  ~ 37  ~ 38  ~ 39  ~ 40  ~ 41  ~ 42  ~ 43  ~ 44  ~ 45  ~ 46  ~ 47  ~ 48  ~ 49  ~ 50  ~ 51  ~ 52  ~ 53  ~ 54  ~ 55  ~ 56  ~ 57  ~ 58  ~ 59  ~ 60  ~ 61  ~ 62  ~ 63  ~ 64  ~ 65  ~ 67  #RTE_LOGTYPE_IFM RTE_LOGTYPE_USER1 ) 68  #IFM_SUCCESS 0 ) 69  #IFM_FAILURE -1 ) 73  #IFM_ETH_LINK_HALF_DUPLEX 0 ) 74  #IFM_ETH_LINK_FULL_DUPLEX 1 ) 75  #IFM_ETH_LINK_DOWN 0 ) 76  #IFM_ETH_LINK_UP 1 ) 77  #IFM_ETH_LINK_FIXED 0 ) 82  #IFM_SLAVE (1<<0) ) 83  #IFM_MASTER (1<<1) ) 84  #IFM_BONDED (1<<2) ) 85  #IFM_IPV4_ENABLED (1<<3) ) 86  #IFM_IPV6_ENABLED (1<<4) ) 88  #IFM_BONDING_MODE_ROUND_ROBIN 0 ) 89  #IFM_BONDING_MODE_ACTIVE_BACKUP 1 ) 90  #IFM_BONDING_MODE_BALANCE 2 ) 91  #IFM_BONDING_MODE_BROADCAST 3 ) 92  #IFM_BONDING_MODE_8023AD 4 ) 93  #IFM_BONDING_MODE_TLB 5 ) 94  #IFM_BONDING_MODE_ALB 6 ) 96  #IFM_BALANCE_XMIT_POLICY_LAYER2 0 ) 97  #IFM_BALANCE_XMIT_POLICY_LAYER23 1 ) 98  #IFM_BALANCE_XMIT_POLICY_LAYER34 2 ) 102  #IFM_QUEUE_STAT_CNTRS 16 ) 103  #IFM_TX_DEFAULT_Q 0 ) 104  #IFM_RX_DEFAULT_Q 0 ) 105  #IFM_RX_DESC_DEFAULT 128 ) 106  #IFM_TX_DESC_DEFAULT 512 ) 107  #IFM_BURST_SIZE 32 ) 108  #IFM_BURST_TX_WAIT_US 1 ) 109  #IFM_BURST_TX_RETRIES 64 ) 110  #BURST_TX_DRAIN_US 100 ) 115  #IFM_IFNAME_LEN 16 ) 116  #IFM_CLIENT_NAME 20 ) 117  #IFM_MAX_CLIENT 10 ) 119  #IFM_ETHER_ADDR_SIZE 6 ) 120  #IFM_IPV6_ADDR_SIZE 16 ) 122  #IFM_DEBUG_CONFIG (1<<0) ) 123  #IFM_DEBUG_RXTX (1<<1) ) 124  #IFM_DEBUG_LOCKS (1<<2) ) 125  #IFM_DEBUG (1<<4) ) 126  #IFM_MAX_PORTARR_SZ 64 ) 127  #IFM_MAX_PORTARR_SZ 64 ) 132  smempo_cfig { 133 ut32_t mpo_size ; 134 ut32_t mbufr_size ; 136 ut32_t mche_size ; 138 ut32_t mu_sock_id ; 140 } g__e_che_igd ; 147  s_pt_cfig_ { 148 ut8_t mpt_id ; 149  mx_queue ; 150  mx_queue ; 151 ut32_t mtx_buf_size ; 152 ut32_t me ; 153 ut32_t momisc ; 154  mempo_cfig mmempo ; 156  e_h_cf mpt_cf ; 158  e_h_rxcf mrx_cf ; 160  e_h_txcf mtx_cf ; 162 } tpt_cfig_t ; 169  s_if_s_ { 170 ut64_t mrx_kts ; 171 ut64_t mtx_kts ; 172 ut64_t mrx_bys ; 173 ut64_t mtx_bys ; 174 ut64_t mrx_misd_pkts ; 176 ut64_t mrx_r_pkts ; 177 ut64_t mrx_nobuf_ ; 178 ut64_t mtx_ed_pkts ; 179 ut64_t mq_rxpkts [ IFM_QUEUE_STAT_CNTRS ]; 180 ut64_t mq_txpkts [ IFM_QUEUE_STAT_CNTRS ]; 181 ut64_t mq_rx_bys [ IFM_QUEUE_STAT_CNTRS ]; 183 ut64_t mq_tx_bys [ IFM_QUEUE_STAT_CNTRS ]; 185 ut64_t mq_rx_pkt_dr [ IFM_QUEUE_STAT_CNTRS ]; 187 } t__e_che_igd tif_s ; 191  sbd_pt { 192 ut8_t mbd_ptid ; 194 ut8_t msock_id ; 196 ut8_t mmode ; 198 ut8_t mxm_picy ; 200 ut32_t m_ms ; 202 ut32_t mlk_up_day_ms ; 204 ut32_t mlk_down_day_ms ; 206 ut8_t mimy ; 208 ut8_t maves [ RTE_MAX_ETHPORTS ]; 210  mave_cou ; 212 ut8_t maive_aves [ RTE_MAX_ETHPORTS ]; 214  maive_ave_cou ; 216 } g__e_che_igd ; 224  s_l2_phy_r_ { 225  _l2_phy_r_ * mxt ; 226 ut8_t mpmdid ; 227  mif_dex ; 228  miame [ IFM_IFNAME_LEN ]; 229 ut16_t mmtu ; 230 ut8_t mmaddr [ IFM_ETHER_ADDR_SIZE ]; 231 ut32_t momisc ; 232 ut32_t mags ; 234 ut32_t mlk_d ; 235 ut16_t mlk_duex :1; 236 ut16_t mlk_auteg :1; 237 ut16_t mlk_us :1; 238 ut16_t madm_us :1; 240  e_mempo * mmempo ; 241 ut32_t mm_rx_bufsize ; 242 ut32_t mmax_rx_pk ; 243 ut16_t mmax_rx_queues ; 244 ut16_t mmax_tx_queues ; 245 ut64_t mn_rxpkts ; 246 ut64_t mn_txpkts ; 247 if_s ms ; 248 ut16_t (* ve_bulk_pkts ( mut8_t , mut16_t ,  me_mbuf **); 250 ut16_t (* sm_bulk_pkts ( m_l2_phy_r_ *,  me_mbuf **, mut64_t ); 252 (* msm_sg_pkt ( m_l2_phy_r_ *,  me_mbuf *); 254  e_h_dev_tx_bufr * mtx_bufr ; 255 ut64_t mtx_buf_n ; 256 * mv4_li ; 257 * mv6_li ; 258  bd_pt * mbd_cfig ; 259 pt_cfig_t mpt_cfig ; 260 } t__e_che_igd tl2_phy_r_t ; 266  s_v4li_ { 267  _v4li_ * mxt ; 268 ut32_t maddr ; 269  madd ; 270  mmtu ; 271 l2_phy_r_t * mpt ; 273 } tv4li_t ; 279  s_v6li_ { 280  _v6li_ * mxt ; 281 ut8_t maddr [ IFM_IPV6_ADDR_SIZE ]; 282  madd ; 283  mmtu ; 284 l2_phy_r_t * mpt ; 285 } tv6li_t ; 292  s_ifm__ { 293 ut32_t mid ; 294 (* mcb_lkupde ( mut8_t , ); 296 } t__e_che_igd tifm_ ; 302  s_r_ma_ { 303 l2_phy_r_t * mpt_li [ IFM_MAX_PORTARR_SZ ]; 304 ut32_t mt_cfigud ; 305 ut32_t mt_tlized ; 306 ut8_t mn ; 307 ifm_ mif_ [ IFM_MAX_CLIENT ]; 308 } t__e_che_igd tr_ma_t ; 320  ifm_cfigu_pts ( pt_cfig_t * pcfig ); 333 l2_phy_r_t * ifm_g_f_pt (); 347 l2_phy_r_t * ifm_g_xt_pt ( ut8_t pt_id ); 359 l2_phy_r_t * ifm_g_pt ( ut8_t ); 371 l2_phy_r_t * ifm_g_pt_by_me (cڡ * me ); 380  ifm_move_pt_das ( ut8_t ptid ); 390  ifm_add_pt_to_pt_li ( l2_phy_r_t *); 399  is_pt_li_nu (); 412  ifm_pt_tup ( ut8_t pt_id , pt_cfig_t *); 421  ifm_ (); 433 t32_t ifm_g_ts_lized (); 445 t32_t ifm_g_ive_pts (); 457 t32_t ifm_chk_pt_v4_abd ( ut8_t pt_id ); 469 t32_t ifm_chk_pt_v6_abd ( ut8_t pt_id ); 485 t16_t ifm_move_v4_pt ( ut8_t pt_id , ut32_t addr , 486 ut32_t add ); 502 t16_t ifm_move_v6_pt ( ut8_t pt_id , ut32_t 6addr , 503 ut32_t add ); 519 t16_t ifm_add_v4_pt ( ut8_t pt_id , ut32_t addr , ut32_ add ); 535 t8_t ifm_add_v6_pt ( ut8_t pt_id , ut8_ 6addr [], ut32_t add ); 548  ifm_sm_sg_pkt ( l2_phy_r_t * pt , 549  e_mbuf * tx_pkts ); 564 ut16_t ifm_sm_bulk_pkts ( l2_phy_r_t *,  e_mbuf ** tx_pkts , 565 ut64_t kts ); 580 ut16_t ifm_ive_bulk_pkts ( ut8_t pt_id , ut16_ qid , 581  e_mbuf ** rx_pkts ); 594  ifm_t_pt_omisc ( ut8_t pt_id , ut8_ ab ); 607  ifm_t_l2_r_mtu ( ut8_t pt_id , ut16_t mtu ); 620  ifm_upde_lkus ( ut8_t pt_id , ut16_t lkus ); 633  ifm_gi_f_lkupde ( ut32_t id , 634 (* cb_lkupde ( ut8_t , )); 650  `lsi_evt_back ( ut8_t pt_id , e_h_evt_ty ty , 651 * m ); 656  `t_r_das (); 667  `ifm_bd_pt_ (cڡ * me ,  mode , pt_cfig_t * ptcf ); 674  `ifm_bd_pt_de (cڡ * me ); 683  `ifm_add_ave_pt ( ut8_t bded_pt_id , ut8_ ave_pt_id ); 692  `ifm_move_ave_pt ( ut8_t bded_pt_id , ut8_ ave_pt_id ); 701  `t_bd_mode ( ut8_t bded_pt_id , ut8_ mode ); 708  `g_bd_mode ( ut8_t bded_pt_id ); 717  `t_bd_imy ( ut8_t bded_pt_id , ut8_ ave_pt_id ); 724  `g_bd_imy_pt ( ut8_t bded_pt_id ); 731  `g_bd_ave_cou ( ut8_t bded_pt_id ); 738  `g_bd_aive_ave_cou ( ut8_t bded_pt_id ); 747  `g_bd_aves ( ut8_t bded_pt_id , ut8_ aves [ RTE_MAX_ETHPORTS ]); 756  `g_bd_aive_aves ( ut8_t bded_pt_id , 757 ut8_t aves [ RTE_MAX_ETHPORTS ]); 766  `t_bd_mac_addss ( ut8_t bded_pt_id ,  h_addr * mac_addr ); 773  `t_bd_mac_addr ( ut8_t bded_pt_id ); 774  `g_bd_mac ( ut8_t bded_pt_id ,  h_addr * maddr ); 783  `t_bd_xmpicy ( ut8_t bded_pt_id , ut8_ picy ); 790  `g_bd_xmpicy ( ut8_t bded_pt_id ); 799  `t_bd_lk_mt_equcy ( ut8_t bded_pt_id , 800 ut32_t _ms ); 807  `g_bd_lk_mڙ_equcy ( ut8_t bded_pt_id ); 816  `t_bd_lkdown_day ( ut8_t bded_pt_id , ut32_t day_ms ); 823  `g_bd_lk_down_day ( ut8_t bded_pt_id ); 832  `t_bd_lkup_day ( ut8_t bded_pt_id , ut32_t day_ms ); 839  `g_bd_lk_up_day ( ut8_t bded_pt_id ); 845  `t_s (); 854  `ifm_g_pt_fo ( ut8_t pt_id , l2_phy_r_t * pt_fo ); 863  `ifm_g_xt_pt_fo ( ut8_t pt_id , l2_phy_r_t * pt_fo ); 872  `cfig_ifm_debug ( dbg ,  ag ); @VIL/l2l3_stack/l2_proto.c 22  ~"l2_o.h " 24  o_ck_ty * go_li [3]; 29 $li_add_ty ( ut16_t ty , 30 (* func ( e_mbuf **, ut16_t , ut64_t , 31 l2_phy_r_t *)) 33 i( ty = ETHER_TYPE_IPv4 ) { 34 o_li [ IPv4_VAL ] = 35 `e_mloc ( NULL , ( o_ck_ty ), 36 RTE_CACHE_LINE_SIZE ); 37 o_li [ IPv4_VAL ]-> ty =ype; 38 o_li [ IPv4_VAL ]-> func = func; 41 i( ty = ETHER_TYPE_ARP ) { 42 o_li [ ARP_VAL ] = 43 `e_mloc ( NULL , ( o_ck_ty ), 44 RTE_CACHE_LINE_SIZE ); 45 o_li [ ARP_VAL ]-> ty =ype; 46 o_li [ ARP_VAL ]-> func = func; 47 } i( ty = ETHER_TYPE_IPv6 ) { 48 o_li [ IPv6_VAL ] = 49 `e_mloc ( NULL , ( o_ck_ty ), 50 RTE_CACHE_LINE_SIZE ); 51 o_li [ IPv6_VAL ]-> ty =ype; 52 o_li [ IPv6_VAL ]-> func = func; 55 } } 64 $l2_check_mac ( e_mbuf * m [ IFM_BURST_SIZE ], l2_phy_r_t * pt , 65 ut8_t i , ut64_t * pkts_mask , ut64_* p_pkts_mask , 66 ut64_t * v4_pkts_mask , ut64_* v6_pkts_mask ) 68  h_hdr * h = NULL ; 69 ut16_t me_mac =0; 70 ut16_t hty = 0; 72 i( m [ i ] ! NULL ) { 73 h = `e_pktmbuf_mtod ( m [ i ],  h_hdr *); 74 if( h ) 75 hty = `e_be_to_u_16 ( h -> h_ty ); 76 i( h = NULL ) { 78 `tf ("l2_check_mac: Ethernet Dest Addr NULL !!!\n"); 81 hty = `e_be_to_u_16 ( h -> h_ty ); 82 #i L2_PROTO_DBG 83 `tf ("%s => mbufkt dest macddr: %x:%x:%x:%x:%x:%x\n", 84 __FUNCTION__ , h -> d_addr . addr_bys [0], 85 h -> d_addr . addr_bys [1],th->d_addr.addr_bytes[2], 86 h -> d_addr . addr_bys [3],th->d_addr.addr_bytes[4], 87 h -> d_addr . addr_bys [5]); 88 `tf ("%=>܈maaddr: %x:%x:%x:%x:%x:%x\n", __FUNCTION__ , 89 pt -> maddr [0],ort->macaddr[1],ort->macaddr[2], 90 pt -> maddr [3],ort->macaddr[4],ort->macaddr[5]); 94 me_mac = 95 ( is_me_h_addr 96 (& h -> d_addr , ( h_addr *) pt -> maddr ) 98 (( is_brd_h_addr 99 (( h_addr *)& h -> d_addr ) 100 && ( hty = ETHER_TYPE_ARP ))) 101 || ( hty = ETHER_TYPE_IPv6 102 && h -> d_addr . addr_bys [0] == 0x33 103 && h -> d_addr . addr_bys [1] == 0x33)); 105 i(! me_mac ) { 106 ut64_t mp_mask = 1LLU << i ; 107 * pkts_mask ^ mp_mask ; 108 `e_pktmbuf_ ( m [ i ]); 109 m [ i ] = NULL ; 110 } i(( hty = ETHER_TYPE_IPv4 && me_mac ) { 111 ut64_t mp_mask = 1LLU << i ; 112 * v4_pkts_mask ^ mp_mask ; 113 } i(( hty = ETHER_TYPE_ARP && me_mac ) { 114 ut64_t mp_mask = 1LLU << i ; 115 * p_pkts_mask ^ mp_mask ; 116 } i(( hty = ETHER_TYPE_IPv6 && me_mac ) { 117 ut64_t mp_mask = 1LLU << i ; 118 * v6_pkts_mask ^ mp_mask ; 121 `tf ("\n%s:_pkts_mask = %" PRIu64 ", ipv4_pkts_mask = %" PRIu64 122 ", ipv6_pkts_mask =%" PRIu64 ",kt-type = %x, sam_mac = %d\n", 123 __FUNCTION__ , * p_pkts_mask , * v4_pkts_mask , * v6_pkts_mask , 124 hty , me_mac ); 125 } } 128 $oc_hdr_cv ( e_mbuf ** pkts_bur , ut16_t nb_rx , 129 l2_phy_r_t * pt ) 131 ut8_t i ; 132 ut64_t pkts_mask = 0; 133 ut64_t p_pkts_mask = 0; 134 ut64_t v4_pkts_mask = 0; 135 ut64_t v6_pkts_mask = 0; 140  i = 0; i < nb_rx ; i++) { 141 `l2_check_mac ( pkts_bur , pt , i , & pkts_mask , & p_pkts_mask , 142 & v4_pkts_mask , & v6_pkts_mask ); 144 i( nb_rx ) { 145 i( p_pkts_mask ) { 146 o_li [ ARP_VAL ]-> `func ( pkts_bur , nb_rx , 147 p_pkts_mask , pt ); 148 tf 151 i( v4_pkts_mask ) { 152 tf 154 `tf ("===b_rx:%u, ipv4_pkts_mask: %lu\n\n", nb_rx , 155 v4_pkts_mask ); 156 o_li [ IPv4_VAL ]-> `func ( pkts_bur , nb_rx , 157 v4_pkts_mask , pt ); 159 i( v6_pkts_mask ) { 160 tf 162 `tf ("===b_rx:%u, ipv6_pkts_mask: %lu\n\n", nb_rx , 163 v6_pkts_mask ); 164 o_li [ IPv6_VAL ]-> `func ( pkts_bur , nb_rx , 165 v6_pkts_mask , pt ); 168 } } 171  qid ) { 175 tf 177  cur -> ty ! ETHER_TYPE_ARP && cu! NULL ) { 178 cur = cur-> xt ; 180 i( cur ! NULL ) { 182 tf 184 cur -> `func ( pkts_bur , nb_rx , pkts_mask , ptid ); 187 o_li [ ARP_VAL ]-> `func ( pkts_bur , nb_rx , p_pkts_mask , 188 ptid ); 194  cur -> ty ! ETHER_TYPE_IPv4 && cu! NULL ) { 195 cur = cur-> xt ; 197 i( cur ! NULL ) { 200 cur -> `func ( pkts_bur , nb_rx , v4_pkts_mask , ptid ); 205 o_li [ IPv4_VAL ]-> `func ( pkts_bur , nb_rx , v4_pkts_mask , 206 ptid ); 223 `e_ex ( EXIT_FAILURE , "Ethertypeot found \n"); 226 } } @VIL/l2l3_stack/l2_proto.h 26 #ide L2_PROTO_H 27  #L2_PROTO_H ) 29  ~ 30  ~ 31  ~ 32  ~ 33  ~ 34  ~ 35  ~ 36  ~ 37  ~ 38  ~ 39  ~ 40  ~ 41  ~ 42  ~ 43  ~ 45  ~ 46  ~ 47  ~ 48  ~ 49  ~ 50  ~ 51  ~ 52  ~ 53  ~ 54  ~ 55  ~ 56  ~ 57  ~ 58  ~ 59  ~ 60  ~ 61  ~ 62  ~ 63  ~ 64  ~ 65  ~ 66  ~ 67  ~ 68  ~ 69  ~ 70  ~ 71  ~ 74  #IPv4_VAL 0 ) 75  #ARP_VAL 1 ) 76  #IPv6_VAL 2 ) 79  #L2_PROTO_DBG 1 ) 84  so_ck_ty { 85 ut16_t mty ; 86 (* mfunc ( e_mbuf ** mm , ut16_t mnb_pkts , ut64_t mpkt_mask , l2_phy_r_t * mpt ); 87 } g__e_che_igd ; 98 li_add_ty ( ut16_t ty , 99 (* func ( e_mbuf **, ut16_t , ut64_t , 100 l2_phy_r_t *)); 130 `l2_check_mac ( e_mbuf * m [ IFM_BURST_SIZE ], l2_phy_r_t * pt , 131 ut8_t pos , ut64_t * pkts_mask , ut64_* p_pkts_mask , 132 ut64_t * v4_pkts_mask , ut64_* v6_pkts_mask ); 147 `oc_hdr_cv ( e_mbuf * m [ IFM_BURST_SIZE ], ut16_t nb_rx , 148 l2_phy_r_t * pt ); @VIL/l2l3_stack/l3fwd_common.h 22 #ide L3FWD_COMMON_H 23  #L3FWD_COMMON_H ) 26  ~ 27  ~ 28  ~ 29  ~ 30  ~ 31  ~ 32  ~ 33  ~ 34  ~ 35  ~ 36  ~ 37  ~ 38  ~ 39  ~ 42  ~ 43  ~ 44  ~ 45  ~ 46  ~ 47  ~ 48  ~ 49  ~ 50  ~ 51  ~ 52  ~ 53  ~ 54  ~ 55  ~ 56  ~ 57  ~ 58  ~ 59  ~ 60  ~ 61  ~ 62  ~ 63  ~ 64  ~ 65  ~ 66  ~ 67  ~ 68  ~ 69  ~ 70  ~ 71  ~ 72  ~ 73  ~ 74  ~ 75  ~ 76  ~ 77  ~ 78  ~ 79  ~ 80  ~ 85  #MAX_ROUTES 4 ) 86  #L3FWD_DEBUG 1 ) 87  #MULTIPATH_FEAT 1 ) 94  l3fwd_ (); 99  puϋ_m4_b_rous (); 104  puϋ_m6_b_rous (); 109  puϋ_m_rous (); @VIL/l2l3_stack/l3fwd_lpm4.c 17  ~"l3fwd_comm.h " 18  ~"r.h " 19  ~"l2_o.h " 20  ~"l3fwd_m4.h " 21  ~"l3fwd_m6.h " 22  ~"lib_p.h " 23  ~"lib_icmpv6.h " 24  ~ 29 * gm4_b ; 32  e_hash * gl2_adj_hash_hd ; 33  e_hash * gfib_th_hash_hd ; 35 l3_s_t gs ; 38 ut8_t gnh_lks [ MAX_SUPPORTED_FIB_PATHS ][ HASH_BUCKET_SIZE ] = 87  #META_DATA_OFFSET 128 ) 89  #RTE_PKTMBUF_HEADROOM 128 ) 90  #ETHERNET_START ( META_DATA_OFFSET + RTE_PKTMBUF_HEADROOM ) ) 91  #ETH_HDR_SIZE 14 ) 92  #IP_START ( ETHERNET_START + ETH_HDR_SIZE ) ) 93  #TCP_START ( IP_START + 20) ) 95  $t_pkt ( e_mbuf * pkt ) 97  i ; 98  size = 14; 99 ut8_t * rd = `RTE_MBUF_METADATA_UINT8_PTR ( pkt , ETHERNET_START ); 101 `tf ("Meta-data:\n"); 102  i = 0; i < size ; i++) { 103 `tf ("%02x ", rd [ i ]); 104 i(( i & 3) == 3) 105 `tf ("\n"); 107 `tf ("\n"); 108 `tf ("IPnd TCP/UDP headers:\n"); 109 rd = `RTE_MBUF_METADATA_UINT8_PTR ( pkt , IP_START ); 110  i = 0; i < 40; i++) { 111 `tf ("%02x ", rd [ i ]); 112 i(( i & 3) == 3) 113 `tf ("\n"); 116 } } 118  _oc_ty * go_ty [2]; 119  $m_ () 123  e_b_m_ms m_ms = { 124 . me = "LPMv4", 125 . n_rus = IPV4_L3FWD_LPM_MAX_RULES , 126 . numb_tbl8s = IPV4_L3FWD_LPM_NUMBER_TBL8S , 127 . ags = 0, 128 . y_unique_size = ( fib_fo ), 129 . offt = 128, 133 m4_b = 134 e_b_m_s . `f_ (& m_ms , `e_sock_id (), 135 ( fib_fo )); 136 i( m4_b = NULL ) { 137 `tf ("Failedo create LPM IPV4able\n"); 142  e_hash_ms l2_adj_v4_ms = { 143 . me = "l2_ADJ_HASH", 144 . s = 64, 145 . key_n = ( l2_adj_key_v4 ), 146 . hash_func = e_jhash , 147 . hash_func__v = 0, 151 l2_adj_hash_hd = `e_hash_ (& l2_adj_v4_ms ); 153 i( l2_adj_hash_hd = NULL ) { 154 `tf ("L2 ADJte_hash_create failed\n"); 157 `tf ("l2_adj_hash_hd %p\n\n", (*) l2_adj_hash_hd ); 161  e_hash_ms fib_th_v4_ms = { 162 . me = "FIB_PATH_HASH", 163 . s = 64, 164 . key_n = ( fib_th_key_v4 ), 165 . hash_func = e_jhash , 166 . hash_func__v = 0, 170 fib_th_hash_hd = `e_hash_ (& fib_th_v4_ms ); 172 i( fib_th_hash_hd = NULL ) { 173 `tf ("FIBathte_hash_create failed\n"); 177 } } 179  $m4_b_rou_add ( routg_fo * da ) 182  routg_fo * fib = da ; 183  e_b_m_key m_key = { 184 . = fib -> d__addr , 185 . dth = fib ->depth, 187 ut8_t i ; 188  Tٮ_rou_cou ; 189  fib_fo y ; 190 y . d__addr = `e_bsw32 ( fib ->dst_ip_addr); 191 y . dth = fib ->depth; 192 y . fib_nh_size = fib ->fib_nh_size; 194 #i MULTIPATH_FEAT 195 i( y . fib_nh_size =0 ||ry.fib_nh_siz> MAX_FIB_PATHS ) 197 i( y . fib_nh_size != 1) 200 `tf ("Route can't be configured!!,ntry.fib_nh_size = %d\n", 201 y . fib_nh_size ); 205 #i MULTIPATH_FEAT 206  i = 0; i < y . fib_nh_size ; i++) 208  i = 0; i < 1; i++) 211  fib_th * fib_th_addr = NULL ; 213 fib_th_addr = 214 `puϋ_fib_th ( fib -> nh__addr [ i ], fib-> out_pt [i]); 215 i( fib_th_addr ) { 217 y . th [ i ] = fib_th_addr ; 218 `tf ("Fib info forhe Dest IP"); 219 `tf (" : %" PRIu32 ".%" PRIu32 ".%" PRIu32 ".%" PRIu32 220 "/%" PRIu8 222 ( fib -> d__addr & 0xFF000000) >> 24, 223 ( fib -> d__addr & 0x00FF0000) >> 16, 224 ( fib -> d__addr & 0x0000FF00) >> 8, 225 ( fib -> d__addr & 0x000000FF), fib-> dth , 226 fib_th_addr , 227 (*) y . th [ i ]-> l2_adj_r ); 229 `tf ("Fib inff܁hDe IP :\ %" PRIu32 ".%" PRIu32 ".%" PRIu32 ".%" PRIu32 "/%" PRIu8 " => fib_th Addr: NULL \n", ( fib -> d__addr & 0xFF000000>> 24, (fib->d__add& 0x00FF0000>> 16, (fib->d__add& 0x0000FF00>> 8, (fib->d__add& 0x000000FF), fib-> dth ); 231 y . th [ i ] = NULL ; 235  key_found , t ; 236 * y_r ; 237 t = 238 e_b_m_s . `f_add ( m4_b , (*)& m_key , & y , 239 & key_found , & y_r ); 241 i( t != 0) { 242 `tf ("Failedo Add IPoute\n"); 245 Tٮ_rou_cou ++; 246 `tf ("Tٮ Roud Added : %u, Key_found: %d\n", Tٮ_rou_cou , 247 key_found ); 248 `tf ("Adding Routeo LPMable...\n"); 250 `tf ("Iterate with Cuckoo Hashable\n"); 251 `e_cuckoo_hash_b (); 253 } } 255  $m4_b_rou_de ( ut32_t d_ , ut8_t dth ) 258  e_b_m_key m_key = { 259 . = d_ , 260 . dth = depth, 263  key_found , t ; 264 * y = NULL ; 266 y = `e_zmloc ( NULL , 512, RTE_CACHE_LINE_SIZE ); 269 t = 270 e_b_m_s . `f_de ( m4_b , & m_key , & key_found , y ); 272 i( t ) { 273 `tf ("Failedo Delete IPoute from LPMv4able\n"); 277 `tf ("Deletedoute from LPMable (IPv4 Address = %" 278 PRIu32 ".%" PRIu32 ".%" PRIu32 ".%" PRIu32 279 "/%u , key_found = %d\n", ( m_key . & 0xFF000000) >> 24, 280 ( m_key . & 0x00FF0000) >> 16, (lpm_key.ip & 0x0000FF00) >> 8, 281 ( m_key . & 0x000000FF),pm_key. dth , key_found ); 284 `move_fib_l2_adj_y ( y ); 285 `e_ ( y ); 286 `tf ("Iterate with Cuckoo Hashable\n"); 287 `e_cuckoo_hash_b (); 289 } } 292 $m4_b_lookup ( e_mbuf ** pkts_bur , ut16_t nb_pkts , 293 ut64_t pkts_mask , 294 l2_phy_r_t * pt_r [ RTE_PORT_IN_BURST_SIZE_MAX ], 295 ut64_t * h_mask ) 298  routg_b_y * v4_s [ RTE_PORT_IN_BURST_SIZE_MAX ]; 299 ut64_t lookup_h_mask_v4 = 0; 300  us ; 301 ut64_t pkts_key_mask = pkts_mask ; 302 ut64_t lookup_miss_mask_v4 = pkts_mask ; 304  ut64_t _cou ; 305  ut64_t rcvd_cou ; 306 rcvd_cou + nb_pkts ; 307 i( L3FWD_DEBUG ) { 308 tf 310 nb_pkts , rcvd_cou , (*) pkts_mask ); 312 ut32_t d_addr_offt = 313 MBUF_HDR_ROOM + ETH_HDR_SIZE + IP_HDR_DST_ADR_OFST ; 315 ; pkts_key_mask ;) { 317 ut8_t pos = (ut8_t `__but_z ( pkts_key_mask ); 318 ut64_t pkt_mask = 1LLU << pos ; 319 pkts_key_mask &~ pkt_mask ; 320  e_mbuf * mbuf = pkts_bur [ pos ]; 321 ut32_t * m_key = NULL ; 322 ut32_t * d_addr = NULL ; 323 m_key = ( ut32_t * `RTE_MBUF_METADATA_UINT8_PTR ( mbuf , 128); 324 d_addr = 325 ( ut32_t * `RTE_MBUF_METADATA_UINT8_PTR ( mbuf , 326 d_addr_offt ); 327 * m_key = * d_addr ; 328 i( L3FWD_DEBUG ) { 330 `tf ("Rcvd Pakt (IPv4 Address = %" 331 PRIu32 ".%" PRIu32 ".%" PRIu32 ".%" PRIu32 ")\n", 332 ( `e_u_to_be_32 (* m_key ) & 0xFF000000) >> 24, 333 ( `e_u_to_be_32 (* m_key ) & 0x00FF0000) >> 16, 334 ( `e_u_to_be_32 (* m_key ) & 0x0000FF00) >> 8, 335 ( `e_u_to_be_32 (* m_key ) & 0x000000FF)); 340 i( L3FWD_DEBUG ) 341 `tf ("\nIPV4 Lookup Mask Before = %p\n", 342 (*) lookup_h_mask_v4 ); 343 us = 344 e_b_m_s . `f_lookup ( m4_b , pkts_bur , pkts_mask , 345 & lookup_h_mask_v4 , 346 (**) v4_s ); 348 i( us ) { 349 `tf ("LPM Lookup failed for IPoute\n"); 353 lookup_miss_mask_v4 =ookup_miss_mask_v4 & (~ lookup_h_mask_v4 ); 354 i( L3FWD_DEBUG ) { 355 tf 357 (*) lookup_h_mask_v4 , 358 (*) lookup_miss_mask_v4 ); 361 ; lookup_miss_mask_v4 ;) { 363 ut8_t pos = (ut8_t `__but_z ( lookup_miss_mask_v4 ); 364 ut64_t pkt_mask = 1LLU << pos ; 365 lookup_miss_mask_v4 &~ pkt_mask ; 366 `e_pktmbuf_ ( pkts_bur [ pos ]); 367 pkts_bur [ pos ] = NULL ; 368 s . nb_l3_dr_pkt ++; 369 i( L3FWD_DEBUG ) 370 `tf ("\n DROP PKT IPV4 Lookup_miss_Mask = %p\n", 371 (*) lookup_miss_mask_v4 ); 374 * h_mask = lookup_h_mask_v4 ; 375 ; lookup_h_mask_v4 ;) { 377 ut8_t pos = (ut8_t `__but_z ( lookup_h_mask_v4 ); 378 ut64_t pkt_mask = 1LLU << pos ; 379 lookup_h_mask_v4 &~ pkt_mask ; 380  e_mbuf * pkt = pkts_bur [ pos ]; 382  fib_fo * y = (fib_f*) v4_s [ pos ]; 384 #i MULTIPATH_FEAT 386 ut8_t ecmp_th = 0; 387 ecmp_th = `_hash_ld_b ( pkts_bur [ pos ]); 388 ut8_t ed_th = 0; 389  fib_th *fib_th = NULL ; 390 i((( y -> fib_nh_size != 0) 391 && ( y -> fib_nh_size - 1< MAX_SUPPORTED_FIB_PATHS ) 392 && (( ecmp_th !0&& (ecmp_th - 1< HASH_BUCKET_SIZE )) 393 ed_th = 394 nh_lks [ y -> fib_nh_size - 1][ ecmp_th - 1]; 395 i( ed_th < MAX_FIB_PATHS ) 396 fib_th = y -> th [ ed_th ]; 397 i( L3FWD_DEBUG ) { 398 tf 400 y -> fib_nh_size , ecmp_th , ed_th ); 403  fib_th *fib_th = y -> th [0]; 406 i( fib_th = NULL ) { 407 `e_pktmbuf_ ( pkt ); 408 pkts_bur [ pos ] = NULL ; 409 s . nb_l3_dr_pkt ++; 410 * h_mask &~ pkt_mask ; 411 i( L3FWD_DEBUG ) 412 tf 417 i( fib_th -> l2_adj_r -> ags = L2_ADJ_UNRESOLVED ) { 418 i( fib_th -> l2_adj_r -> phy_pt -> v4_li ! NULL ) 419 `que_p ( fib_th -> l2_adj_r -> phy_pt -> 420 pmdid , fib_th -> nh_ ); 422 `e_pktmbuf_ ( pkts_bur [ pos ]); 423 pkts_bur [ pos ] = NULL ; 424 * h_mask &~ pkt_mask ; 425 i( L3FWD_DEBUG ) 426 tf 432 ut8_t * h_de = 433 `RTE_MBUF_METADATA_UINT8_PTR ( pkt , MBUF_HDR_ROOM ); 434 ut8_t * h_c = 435 `RTE_MBUF_METADATA_UINT8_PTR ( pkt , MBUF_HDR_ROOM + 6); 436 i( L3FWD_DEBUG ) { 437 tf 440 h_de [0],th_de[1],th_de[2],th_de[3],th_de[4],th_de[5], h_c [0],th_src[1], 441 h_c [2],th_src[3],th_src[4],th_src[5]); 444 `memy ( h_de , fib_th -> l2_adj_r -> l2_rg , ( h_addr ) * 2); 445 i( L3FWD_DEBUG ) { 446  k = 0; 447  k = 0; k < 14; k++) { 448 `tf ("%02x ", 449 fib_th -> l2_adj_r -> l2_rg [ k ]); 450 `tf ("\n"); 452 tf 453 ("MAC AFTER DST MAC %02x:%02x:%02x:%02x:%02x:%02x, \ MAC %02x:%02x:%02x:%02x:%02x:%02x\n", h_de [0],th_de[1],th_de[2],th_de[3],th_de[4],th_de[5], h_c [0],th_src[1],th_src[2],th_src[3],th_src[4],th_src[5]); 456 pt_r [ pos ] = fib_th -> l2_adj_r -> phy_pt ; 457 i( L3FWD_DEBUG ) { 458 `tf ("l3fwd_lookup API!!!!\n"); 462 _cou ++; 463 s . nb_tx_l3_pkt ++; 464 i( L3FWD_DEBUG ) 465 tf 467 fib_th -> out_pt , _cou ); 470 } } 472  $is_vid_v4_pkt ( v4_hdr * pkt , ut32_t lk_n ) 474 i( lk_n < ( v4_hdr )) 476 i((( pkt -> vsi_ihl ) >> 4) != 4) 478 i(( pkt -> vsi_ihl & 0xf) < 5) 480 i( `e_u_to_be_16 ( pkt -> tٮ_ngth < ( v4_hdr )) 483 } } 486 $g_de_mac_f_xth ( ut32_t xt_h_ , 487 ut8_t out_phy_pt ,  h_addr * hw_addr ) 489  p_y_da * p_da = NULL ; 490  p_key_v4 p_key ; 491 p_key . pt_id = out_phy_pt ; 492 p_key . = xt_h_ ; 494 p_da = `ve_p_y ( p_key ); 495 i( p_da = NULL ) { 496 `tf ("ARPntry isot found for ip %x,ort %d\n", 497 xt_h_ , out_phy_pt ); 500 `h_addr_cy (& p_da -> h_addr , hw_addr ); 502 } } 504  l2_adj_y * $ve_l2_adj_y ( l2_adj_key_v4 l2_adj_key ) 506  l2_adj_y * t_l2_adj_da = NULL ; 507 l2_adj_key . fr1 = 0; 508 l2_adj_key . fr2 = 0; 509 l2_adj_key . fr3 = 0; 511  t = 512 `e_hash_lookup_da ( l2_adj_hash_hd , & l2_adj_key , 513 (**)& t_l2_adj_da ); 514 i( t < 0) { 515 #ifde L2L3_DEBUG 516 tf 518 t , EINVAL , ENOENT ); 520  NULL ; 522 #ifde L2L3_DEBUG 523 tf 525 t , EINVAL , ENOENT ); 527  t_l2_adj_da ; 529 } } 531  $move_fib_l2_adj_y (* y ) 533  fib_fo y1 ; 534 `memy (& y1 , y , ( fib_fo )); 536  fib_th * fib_th_addr = y1 . th [0]; 537 i( fib_th_addr -> fcou > 1) { 538 tf 540 fib_th_addr -> nh_ , fib_th_addr-> out_pt , 541 fib_th_addr -> fcou ); 542 fib_th_addr -> fcou --; 543 `tf ("AFTER fib_pathntry,h_ip %x,ort %d,efcount %d\n", 544 fib_th_addr -> nh_ , fib_th_addr-> out_pt , 545 fib_th_addr -> fcou ); 549  l2_adj_y * adj_addr = NULL ; 550 adj_addr = fib_th_addr -> l2_adj_r ; 552 i( adj_addr ! NULL ) { 554  l2_adj_key_v4 l2_adj_key = { 555 . Next_h_ = fib_th_addr -> nh_ , 556 . out_pt_id = fib_th_addr -> out_pt , 558 #ifde L3FWD_DEBUG 559 tf 561 l2_adj_key . Next_h_ ,2_adj_key. out_pt_id , 562 adj_addr -> fcou ); 565 `e_hash_d_key ( l2_adj_hash_hd , & l2_adj_key ); 566 `e_ ( adj_addr ); 567 adj_addr = NULL ; 570  fib_th_key_v4 th_key = { 571 . nh_ = fib_th_addr ->nh_ip, 572 . out_pt = fib_th_addr ->out_port, 575 tf 577 fib_th_addr -> nh_ , fib_th_addr-> out_pt , 578 fib_th_addr -> fcou ); 579 `e_hash_d_key ( fib_th_hash_hd , & th_key ); 580 `e_ ( fib_th_addr ); 581 fib_th_addr = NULL ; 583 } } 585  l2_adj_y * $puϋ_l2_adj ( ut32_t addr , ut8_t ptid ) 588  l2_adj_key_v4 l2_adj_key ; 589 l2_adj_key . out_pt_id = ptid ; 590 l2_adj_key . Next_h_ = addr ; 591 l2_adj_key . fr1 = 0; 592 l2_adj_key . fr2 = 0; 593 l2_adj_key . fr3 = 0; 595  h_addr h_d ; 596  l2_adj_y * adj_da = NULL ; 599 adj_da = `ve_l2_adj_y ( l2_adj_key ); 601 i( adj_da ) { 603 tf 605 l2_adj_key . Next_h_ ,2_adj_key. out_pt_id , 606 adj_da -> fcou ,dj_data); 607 `h_addr_cy (& adj_da -> h_addr , & h_d ); 608 adj_da -> fcou ++; 609 tf 611 l2_adj_key . Next_h_ ,2_adj_key. out_pt_id , 612 adj_da -> fcou ,dj_data); 613  adj_da ; 616  h_addr h_c ; 617 l2_phy_r_t * pt ; 619 pt = `ifm_g_pt ( ptid ); 621 i( pt ! NULL ) { 622 `memy (& h_c , & pt -> maddr , ( h_addr )); 623 * p = (*) h_c . addr_bys ; 624 `tf ("S-MAC %x:%x:%x:%x:%x:%x\n\r", p [0],[1],[2],[3], 625 p [4],[5]); 627 ut32_t size = 628 `RTE_CACHE_LINE_ROUNDUP (( l2_adj_y )); 629 adj_da = `e_zmloc ( NULL , size , RTE_CACHE_LINE_SIZE ); 630 i( adj_da = NULL ) { 631 `tf ("L2 Adjacency memoryllocation failed !\n"); 632  NULL ; 635 adj_da -> out_pt_id = ptid ; 636 adj_da -> Next_h_ = addr ; 637 adj_da -> fcou ++; 639 adj_da -> phy_pt = pt ; 640 `memt (& adj_da -> h_addr , 0, ( h_addr )); 641 `memt (& adj_da -> l2_rg , 0, 256); 644 `e_hash_add_key_da ( l2_adj_hash_hd , & l2_adj_key , 645 adj_da ); 646 #ifde L2L3_DEBUG 647 tf 649 adj_da ); 652 #ifde L2L3_DEBUG 653 `tf ("\PORT %u IS DOWN...\n", ptid ); 655  NULL ; 658 i( `g_de_mac_f_xth ( addr , ptid , & h_d )) { 659 * p = (*) h_d . addr_bys ; 660 tf 662 p [0],[1],[2],[3],[4],[5]); 664 `memy ( adj_da -> l2_rg , & h_d , ( h_addr )); 665 `memy (& adj_da -> l2_rg [6], & h_c , 666 ( h_addr )); 669 `h_addr_cy (& h_d , & adj_da -> h_addr ); 670 adj_da -> ags = L2_ADJ_RESOLVED ; 672 adj_da -> ags = L2_ADJ_UNRESOLVED ; 673 tf 676  adj_da ; 677 } } 679  fib_th * $puϋ_fib_th ( ut32_t nh_ , ut8_t ptid ) 682  fib_th_key_v4 th_key ; 683 th_key . out_pt = ptid ; 684 th_key . nh_ =h_ip; 685 th_key . fr1 = 0; 686 th_key . fr2 = 0; 687 th_key . fr3 = 0; 689  fib_th * fib_da = NULL ; 692 fib_da = `ve_fib_th_y ( th_key ); 694 i( fib_da ) { 697 tf 699 fib_da -> nh_ , fib_da-> out_pt , fib_da-> fcou , 700 fib_da ); 701 fib_da -> fcou ++; 702 fib_da -> l2_adj_r -> fcou ++; 703 tf 705 fib_da -> nh_ , fib_da-> out_pt , fib_da-> fcou ); 706  fib_da ; 708 `tf ("fib_pathntry Doesn't Exists.......\n"); 711 fib_da = NULL ; 712  l2_adj_y * l2_adj_r = NULL ; 713 l2_adj_r = `puϋ_l2_adj ( nh_ , ptid ); 715 i( l2_adj_r ) { 717 ut32_t size = `RTE_CACHE_LINE_ROUNDUP (( fib_th )); 718 fib_da = `e_zmloc ( NULL , size , RTE_CACHE_LINE_SIZE ); 720 fib_da -> out_pt = ptid ; 721 fib_da -> nh_ =h_ip; 722 fib_da -> fcou ++; 723 fib_da -> l2_adj_r =2_adj_ptr; 725 `tf ("%s: g܈da%u %d\n\r", __FUNCTION__ , ptid , 726 __LINE__ ); 728  us ; 729 us = 730 `e_hash_add_key_da ( fib_th_hash_hd , & th_key , 731 fib_da ); 732 i( us ) { 733 tf 735 fib_da -> nh_ , fib_da-> out_pt , 736 fib_da -> fcou ); 738 `e_ ( fib_da ); 740 tf 742 fib_da -> nh_ , fib_da-> out_pt , 743 fib_da -> fcou ); 744 tf 746 l2_adj_r , fib_da , fib_data->l2_adj_ptr); 747 tf 749 l2_adj_r , fib_da ); 750  fib_da ; 753 tf 756  NULL ; 757 } } 759  fib_th * $ve_fib_th_y ( fib_th_key_v4 th_key ) 761 `tf ("FIB PATH f NExtHOP IP : %x,܈:%u\n", th_key . nh_ , 762 th_key . out_pt ); 764  fib_th * t_fib_th_da = NULL ; 765  t = 766 `e_hash_lookup_da ( fib_th_hash_hd , & th_key , 767 (**)& t_fib_th_da ); 768 i( t < 0) { 769 tf 771 t , EINVAL , ENOENT ); 772  NULL ; 774 `tf ("FIB PATH ALREADY Exists for NExtHOP IP: %x,ort: %u\n", 775 th_key . nh_ ,h_key. out_pt ); 776  t_fib_th_da ; 778 } } 780  $e_cuckoo_hash_b () 782 cڡ * xt_key ; 783 * xt_da ; 784 ut32_t = 0; 786 `tf ("\n\t\t\t FIB_path Cacheable...."); 787 tf 789 `tf ("\n\tNextHop IP Port Refcount2_adj_ptr_addrress\n"); 790 tf 793  e_hash_e 794 ( fib_th_hash_hd , & xt_key , & xt_da , & ) >= 0) { 795  fib_th * tmp_da = (fib_th *) xt_da ; 796  fib_th_key_v4 tmp_key ; 797 `memy (& tmp_key , xt_key , (tmp_key)); 798 `tf ("\%" PRIu32 ".%" PRIu32 ".%" PRIu32 ".%" PRIu32 800 ( tmp_da -> nh_ & 0xFF000000) >> 24, 801 ( tmp_da -> nh_ & 0x00FF0000) >> 16, 802 ( tmp_da -> nh_ & 0x0000FF00) >> 8, 803 ( tmp_da -> nh_ & 0x000000FF),mp_da-> out_pt , 804 tmp_da -> fcou ,mp_da-> l2_adj_r ); 807 = 0; 809 `tf ("\n\t\t\t L2 ADJ Cacheable....."); 810 tf 812 tf 814 tf 817  e_hash_e 818 ( l2_adj_hash_hd , & xt_key , & xt_da , & ) >= 0) { 819  l2_adj_y * l2_da = (l2_adj_y *) xt_da ; 820  l2_adj_key_v4 l2_key ; 821 `memy (& l2_key , xt_key , (l2_key)); 822 `tf ("\%" PRIu32 ".%" PRIu32 ".%" PRIu32 ".%" PRIu32 824 ( l2_da -> Next_h_ & 0xFF000000) >> 24, 825 ( l2_da -> Next_h_ & 0x00FF0000) >> 16, 826 ( l2_da -> Next_h_ & 0x0000FF00) >> 8, 827 ( l2_da -> Next_h_ & 0x000000FF), 828 l2_da -> out_pt_id ,2_da-> l2_rg [0], 829 l2_da -> l2_rg [1],2_data->l2_string[2], 830 l2_da -> l2_rg [3],2_data->l2_string[4], 831 l2_da -> l2_rg [5],2_data->l2_string[6], 832 l2_da -> l2_rg [7],2_data->l2_string[8], 833 l2_da -> l2_rg [9],2_data->l2_string[10], 834 l2_da -> l2_rg [11],2_da-> phy_pt ); 836 } } 838  $t_l3_s () 840 `tf ("==============================================\n"); 841 `tf ("\t\t L3 STATISTICS \t\n"); 842 `tf ("==============================================\n"); 843 `tf (" Num oReived L3 Pkt : %lu\n", s . nb_rx_l3_pkt ); 844 `tf (" Num oDrݳd L3 Pkt : %lu\n", s . nb_l3_dr_pkt ); 845 `tf (" Num oTnsmd L3 Pkt : %lu\n", s . nb_tx_l3_pkt ); 846 `tf (" Num oICMP PktRcvdL3 : %lu\n", s . nb_rx_l3_icmp_pkt ); 847 `tf (" Num oICMP PktTxICMP : %lu\n", s . nb_tx_l3_icmp_pkt ); 848 s . tٮ_nb_rx_l3_pkt = sts. nb_rx_l3_icmp_pkt + sts. nb_rx_l3_pkt ; 849 s . tٮ_nb_tx_l3_pkt = sts. nb_tx_l3_icmp_pkt + sts. nb_tx_l3_pkt ; 850 `tf (" Total Num of Rcvdktst L3: %lu\n", 851 s . tٮ_nb_rx_l3_pkt ); 852 `tf (" Total Num of Sentktst L3: %lu\n", 853 s . tٮ_nb_tx_l3_pkt ); 854 } } 857 $_lol_cks_oss ( e_mbuf ** pkt_bur , ut16_t nb_rx , 858 ut64_t icmp_pkt_mask , l2_phy_r_t * pt ) 860 `oss_picmp_pkt_r ( pkt_bur , nb_rx , icmp_pkt_mask , pt ); 861 } } 864 $_fwd_div ( e_mbuf ** pkt_bur , ut16_t nb_pkts , 865 ut64_t v4_fwd_pkts_mask , l2_phy_r_t * pt ) 867 i( L3FWD_DEBUG ) { 868 tf 870 nb_pkts , pt -> pmdid ); 872 ut64_t pkts_f_oss = v4_fwd_pkts_mask ; 874  v4_hdr *ipv4_hdr; 875 l2_phy_r_t * pt_r [ RTE_PORT_IN_BURST_SIZE_MAX ]; 876 ut64_t h_mask = 0; 878 ; pkts_f_oss ;) { 880 ut8_t pos = (ut8_t `__but_z ( pkts_f_oss ); 881 ut64_t pkt_mask = 1LLU << pos ; 882 pkts_f_oss &~ pkt_mask ; 883 v4_hdr = 884 `e_pktmbuf_mtod_offt ( pkt_bur [ pos ],  v4_hdr *, 885 ( h_hdr )); 887 i( `is_vid_v4_pkt ( v4_hdr , pkt_bur [ pos ]-> pkt_n ) < 0) { 888 `e_pktmbuf_ ( pkt_bur [ pos ]); 889 pkt_bur [ pos ] = NULL ; 890 v4_fwd_pkts_mask &~(1LLU << pos ); 891 nb_pkts --; 892 s . nb_l3_dr_pkt ++; 896 i( L3FWD_DEBUG ) { 897 tf 899 nb_pkts , v4_fwd_pkts_mask ); 903 `m4_b_lookup ( pkt_bur , nb_pkts , v4_fwd_pkts_mask , pt_r , 904 & h_mask ); 906 ; h_mask ;) { 908 ut8_t pos = (ut8_t `__but_z ( h_mask ); 909 ut64_t pkt_mask = 1LLU << pos ; 910 h_mask &~ pkt_mask ; 912 pt_r [ pos ]-> `sm_sg_pkt (port_ptr[pos], 913 pkt_bur [ pos ]); 916 } } 919 $l3_oc_ty_add ( ut8_t oc_ty , 920 (* func ( e_mbuf **, ut16_t , ut64_t , 921 l2_phy_r_t * pt )) 923  oc_ty ) { 924  IPPROTO_ICMP : 925 o_ty [ IP_LOCAL ] = 926 `e_mloc ( NULL , ( _oc_ty ), 927 RTE_CACHE_LINE_SIZE ); 928 o_ty [ IP_LOCAL ]-> oc_ty =rotocol_type; 929 o_ty [ IP_LOCAL ]-> func = func; 932  IPPROTO_TCP : 933  IPPROTO_UDP : 934 o_ty [ IP_REMOTE ] = 935 `e_mloc ( NULL , ( _oc_ty ), 936 RTE_CACHE_LINE_SIZE ); 937 o_ty [ IP_REMOTE ]-> oc_ty =rotocol_type; 938 o_ty [ IP_REMOTE ]-> func = func; 943 } } 945  $l3fwd_rx_v4_cks ( e_mbuf ** m , ut16_t nb_pkts , 946 ut64_t vid_pkts_mask , l2_phy_r_t * pt ) 948 i( L3FWD_DEBUG ) { 949 tf 951 nb_pkts , pt -> pmdid ); 953 ut64_t pkts_f_oss = vid_pkts_mask ; 955  v4_hdr *ipv4_hdr; 956 ut32_t cfigu_pt_ = 0; 957 ut64_t icmp_pkts_mask = `RTE_LEN2MASK ( nb_pkts , uint64_t); 958 ut64_t v4_fwd_pkts_mask = `RTE_LEN2MASK ( nb_pkts , uint64_t); 959 ut16_t nb_icmp_pkt = 0; 960 ut16_t nb_l3_pkt = 0; 962 i( pt -> v4_li ! NULL ) 963 cfigu_pt_ = 964 ( ut32_t ((( v4li_t *( pt -> v4_li ))-> addr ); 966 ; pkts_f_oss ;) { 968 ut8_t pos = (ut8_t `__but_z ( pkts_f_oss ); 969 ut64_t pkt_mask = 1LLU << pos ; 970 pkts_f_oss &~ pkt_mask ; 971 v4_hdr = 972 `e_pktmbuf_mtod_offt ( m [ pos ],  v4_hdr *, 973 ( h_hdr )); 975 i(( v4_hdr -> xt_o_id = IPPROTO_ICMP ) 976 && ( v4_hdr -> d_addr = cfigu_pt_ )) { 977 v4_fwd_pkts_mask &~ pkt_mask ; 978 s . nb_rx_l3_icmp_pkt ++; 979 nb_icmp_pkt ++; 981 icmp_pkts_mask &~ pkt_mask ; 982 s . nb_rx_l3_pkt ++; 983 nb_l3_pkt ++; 987 i( icmp_pkts_mask ) { 988 i( L3FWD_DEBUG ) 989 tf 991 o_ty [ IP_LOCAL ]-> `func ( m , nb_icmp_pkt , icmp_pkts_mask , 992 pt ); 995 i( v4_fwd_pkts_mask ) { 996 i( L3FWD_DEBUG ) 997 tf 999 o_ty [ IP_REMOTE ]-> `func ( m , nb_l3_pkt , 1000 v4_fwd_pkts_mask , pt ); 1002 } } 1005 $sve_l2_adj ( ut32_t xth_ , ut8_t out_pt_id , 1006 cڡ  h_addr * hw_addr ) 1008  l2_adj_key_v4 l2_adj_key = { 1009 . Next_h_ = xth_ , 1010 . out_pt_id = out_port_id, 1014  l2_adj_y * adj_da = `ve_l2_adj_y ( l2_adj_key ); 1016 i( adj_da ) { 1018 tf 1020 l2_adj_key . Next_h_ ,2_adj_key. out_pt_id , 1021 adj_da -> fcou ,dj_data); 1023 i( adj_da -> ags = L2_ADJ_UNRESOLVED 1024 || `memcmp ( hw_addr , & adj_da -> h_addr , 1025 ( h_addr ))) { 1026 `memy ( adj_da -> l2_rg , hw_addr , ( h_addr )); 1027 `memy (& adj_da -> l2_rg [6], 1028 & adj_da -> phy_pt -> maddr , 1029 ( h_addr )); 1032 `h_addr_cy ( hw_addr , & adj_da -> h_addr ); 1033 adj_da -> ags = L2_ADJ_RESOLVED ; 1039 l2_phy_r_t * pt ; 1040 pt = `ifm_g_pt ( out_pt_id ); 1041 i( pt ! NULL ) { 1043 ut32_t size = 1044 `RTE_CACHE_LINE_ROUNDUP (( l2_adj_y )); 1045 adj_da = `e_zmloc ( NULL , size , RTE_CACHE_LINE_SIZE ); 1046 i( adj_da = NULL ) { 1047 `tf ("L2 Adjacency memoryllocation failed !\n"); 1051 adj_da -> out_pt_id = out_port_id; 1052 adj_da -> Next_h_ = xth_ ; 1053 adj_da -> phy_pt = pt ; 1055 `memy ( adj_da -> l2_rg , hw_addr , ( h_addr )); 1056 `memy (& adj_da -> l2_rg [6], &adj_da-> phy_pt -> maddr , 1057 ( h_addr )); 1060 `h_addr_cy ( hw_addr , & adj_da -> h_addr ); 1061 adj_da -> ags = L2_ADJ_RESOLVED ; 1063 `e_hash_add_key_da ( l2_adj_hash_hd , & l2_adj_key , 1064 adj_da ); 1065 tf 1067 adj_da ); 1069 `tf ("PORT:%u IS DOWN...\n", out_pt_id ); 1072 } } 1074 ut8_t $_hash_ld_b ( e_mbuf * mbuf ) 1076 ut32_t c_addr_offt = 1077 MBUF_HDR_ROOM + ETH_HDR_SIZE + IP_HDR_SRC_ADR_OFST ; 1078 ut32_t d_addr_offt = 1079 MBUF_HDR_ROOM + ETH_HDR_SIZE + IP_HDR_DST_ADR_OFST ; 1080 ut32_t * d_addr = NULL ; 1081 ut32_t * c_addr = NULL ; 1082 c_addr = 1083 ( ut32_t * `RTE_MBUF_METADATA_UINT8_PTR ( mbuf , c_addr_offt ); 1084 d_addr = 1085 ( ut32_t * `RTE_MBUF_METADATA_UINT8_PTR ( mbuf , d_addr_offt ); 1087 ut32_t hash_key1 = * c_addr ; 1088 ut32_t hash_key2 = * d_addr ; 1090 hash_key1 = hash_key1 ^ hash_key2 ; 1091 hash_key2 = hash_key1 ; 1093 hash_key1 = `rr32 (hash_key1, 16); 1094 hash_key1 = hash_key1 ^ hash_key2 ; 1096 hash_key2 = hash_key1 ; 1098 hash_key1 = `rr32 (hash_key1, 8); 1099 hash_key1 = hash_key1 ^ hash_key2 ; 1101 hash_key1 = hash_key1 & ( HASH_BUCKET_SIZE - 1); 1102 i( L3FWD_DEBUG ) 1103 `tf ("Hash Resu_key: %d, \n", hash_key1 ); 1104  hash_key1 ; 1105 } } 1107 ut32_t $rr32 ( ut32_t vue ,  cou ) 1109 cڡ  mask = ( CHAR_BIT * ( vue ) - 1); 1110 cou & mask ; 1111  ( vue >> cou | (vu<< ((-cou& mask )); 1112 } } 1115 $_lol_out_div ( e_mbuf ** pkt_bur , ut16_t nb_rx , 1116 ut64_t v4_pkts_mask , l2_phy_r_t * pt ) 1118 `_fwd_div ( pkt_bur , nb_rx , v4_pkts_mask , pt ); 1119 } } @VIL/l2l3_stack/l3fwd_lpm4.h 21 #ide L3FWD_LPM_H 22  #L3FWD_LPM_H ) 24  ~ 25  ~ 26  ~ 27  ~ 28  ~ 29  ~ 30  ~ 31  ~ 32  ~ 33  ~ 34  ~ 36  ~ 37  ~ 38  ~ 39  ~ 40  ~ 41  ~ 42  ~ 43  ~ 44  ~ 45  ~ 46  ~ 47  ~ 48  ~ 49  ~"l3fwd_comm.h " 50  ~"l3fwd_m6.h " 51  ~"r.h " 57  #MBUF_HDR_ROOM 256 ) 60  #ETH_HDR_SIZE 14 ) 61  #IP_HDR_SIZE 20 ) 62  #IP_HDR_DST_ADR_OFST 16 ) 63  #IP_HDR_SRC_ADR_OFST 12 ) 66  #IPV4_L3FWD_LPM_MAX_RULES 256 ) 67  #IPV4_L3FWD_LPM_NUMBER_TBL8S (1 << 8 ) 68  #MAX_FIB_PATHS 8 ) 69  #IP_LOCAL 0 ) 70  #IP_REMOTE 1 ) 73  #MAX_SUPPORTED_FIB_PATHS 8 ) 74  #HASH_BUCKET_SIZE 64 ) 77  #L2_ADJ_RESOLVED 0x00 ) 78  #L2_ADJ_UNRESOLVED 0x01 ) 83  sroutg_fo { 84 ut32_t md__addr ; 85 ut8_t mdth ; 86 ut32_t mmric ; 87 ut32_t mfib_nh_size ; 88 ut32_t mnh__addr [ MAX_FIB_PATHS ]; 89 ut8_t mout_pt [ MAX_FIB_PATHS ]; 90 } g__e_che_igd ; 96  sfib_th { 97 ut32_t mnh_ ; 98 ut8_t mout_pt ; 99 ut32_t mfcou ; 100  l2_adj_y * ml2_adj_r ; 101 } g__e_che_igd ; 107  sfib_fo { 108 ut32_t md__addr ; 109 ut32_t mmric ; 110 ut32_t mfib_nh_size ; 111 ut8_t mdth ; 112  fib_th * mth [ MAX_FIB_PATHS ]; 113 } g__e_che_igd ; 118  sl2_adj_y { 119  h_addr mh_addr ; 120 ut32_t mNext_h_ ; 121 ut8_t mout_pt_id ; 122 ut32_t mfcou ; 123 ut8_t ml2_rg [256]; 124 l2_phy_r_t * mphy_pt ; 125 ut8_t mags ; 126 } g__e_che_igd ; 131  sfib_th_key_v4 { 132 ut32_t mnh_ ; 133 ut8_t mout_pt ; 134 ut8_t mfr1 ; 135 ut8_t mfr2 ; 136 ut8_t mfr3 ; 142  sl2_adj_key_v4 { 143 ut32_t mNext_h_ ; 144 ut8_t mout_pt_id ; 145 ut8_t mfr1 ; 146 ut8_t mfr2 ; 147 ut8_t mfr3 ; 153  sroutg_b_y { 154 ut32_t m ; 155 ut8_t mpt_id ; 156  l2_adj_y * ml2_adj_r ; 157 } g__e_che_igd ; 162  sl3fwd_s { 163 ut64_t mnb_rx_l3_pkt ; 164 ut64_t mnb_tx_l3_pkt ; 165 ut64_t mnb_rx_l3_icmp_pkt ; 167 ut64_t mnb_tx_l3_icmp_pkt ; 169 ut64_t mnb_l3_dr_pkt ; 170 ut64_t mtٮ_nb_rx_l3_pkt ; 172 ut64_t mtٮ_nb_tx_l3_pkt ; 174 } tl3_s_t ; 176  s_oc_ty { 177 ut8_t moc_ty ; 178 (* mfunc ( me_mbuf **, mut16_t , mut64_t , 179 ml2_phy_r_t *); 180 } g__e_che_igd ; 189  m_ (); 198  m4_b_rou_add ( routg_fo * put_y ); 209  m4_b_rou_de ( ut32_t , ut8_t dth ); 222  m4_b_lookup ( e_mbuf ** pkts_bur , ut16_t nb_pkts , 223 ut64_t vid_pkts_mask , 224 l2_phy_r_t * pt [ RTE_PORT_IN_BURST_SIZE_MAX ], 225 ut64_t * h_mask ); 236  is_vid_v4_pkt ( v4_hdr * pkt , ut32_t lk_n ); 251  l3fwd_rx_v4_cks ( e_mbuf ** m , ut16_t nb_pkts , 252 ut64_t pkt_mask , l2_phy_r_t * pt ); 265  g_de_mac_f_xth ( ut32_t xt_h_ , 266 ut8_t out_phy_pt ,  h_addr * hw_addr ); 276  l2_adj_y * ve_l2_adj_y ( l2_adj_key_v4 l2_adj_key ); 288  l2_adj_y * puϋ_l2_adj ( ut32_t addr , ut8_t ptid ); 299  fib_th * puϋ_fib_th ( ut32_t nh_ , ut8_t ptid ); 310  fib_th * ve_fib_th_y ( fib_th_key_v4 th_key ); 317  move_fib_l2_adj_y (*); 324  e_cuckoo_hash_b (); 331  t_l3_s (); 341 ut8_t _hash_ld_b ( e_mbuf * mbuf ); 353 ut32_t rr32 (ut32_ vue ,  cou ); 356 sve_l2_adj ( ut32_t xth_ , ut8_t out_pt_id , 357 cڡ  h_addr * hw_addr ); 360 l3_oc_ty_add ( ut8_t oc_ty , 361 (* func ( e_mbuf **, ut16_t , ut64_t , 362 l2_phy_r_t *)); 365 `_lol_cks_oss ( e_mbuf **, ut16_t , ut64_t , 366 l2_phy_r_t *); 367  `_lol_out_div ( e_mbuf **, ut16_t , ut64_t , 368 l2_phy_r_t *); 371 `_fwd_div ( e_mbuf **, ut16_t , ut64_t , 372 l2_phy_r_t *); @VIL/l2l3_stack/l3fwd_lpm6.c 17  ~"l3fwd_comm.h " 18  ~"l3fwd_m4.h " 19  ~"l3fwd_m6.h " 20  ~"l3fwd_comm.h " 21  ~"r.h " 22  ~"l2_o.h " 23  ~"lib_p.h " 24  ~"lib_icmpv6.h " 29 * gm6_b ; 30  e_hash * gl2_adj_v6_hash_hd ; 31  e_hash * gfib_th_v6_hash_hd ; 32 ut8_t nh_lks [ MAX_SUPPORTED_FIB_PATHS ][ HASH_BUCKET_SIZE ]; 33 l3_s_t s ; 35  v6_oc_ty * go_ty [2]; 37  $m6_ () 42  e_b_m_v6_ms m6_ms = { 43 . me = "LPMv6", 44 . n_rus = IPV6_L3FWD_LPM_MAX_RULES , 45 . numb_tbl8s = IPV6_L3FWD_LPM_NUMBER_TBL8S , 46 . y_unique_size = ( v6_fib_fo ), 47 . offt = 128, 51 m6_b = 52 e_b_m_v6_s . `f_ (& m6_ms , `e_sock_id (), 53 ( v6_fib_fo )); 54 i( m6_b = NULL ) { 55 `tf ("Failedo create LPM IPV6able\n"); 60  e_hash_ms l2_adj_v6_ms = { 61 . me = "l2_ADJ_IPV6_HASH", 62 . s = 64, 63 . key_n = ( l2_adj_key_v6 ), 64 . hash_func = e_jhash , 65 . hash_func__v = 0, 68 l2_adj_v6_hash_hd = `e_hash_ (& l2_adj_v6_ms ); 69 i( l2_adj_v6_hash_hd = NULL ) { 70 `tf ("ND for IPV6te_hash_create failed.\n"); 73 `tf ("ND IPV6_hash_handle %p\n\n", 74 (*) l2_adj_v6_hash_hd ); 78  e_hash_ms fib_th_v6_ms = { 79 . me = "FIB_PATH_IPV6_HASH", 80 . s = 64, 81 . key_n = ( fib_th_key_v6 ), 82 . hash_func = e_jhash , 83 . hash_func__v = 0, 84 . exa_ag = 1, 88 fib_th_v6_hash_hd = `e_hash_ (& fib_th_v6_ms ); 90 i( fib_th_v6_hash_hd = NULL ) { 91 `tf ("FIBathte_hash_create failed\n"); 95 } } 97  $m6_b_rou_add ( v6_routg_fo * da ) 100  v6_routg_fo * fib = da ; 102  e_b_m_v6_key m6_key ; 103 ut8_t i ; 104  i = 0; i < 16; i++) { 105 m6_key . [ i ] = fib -> d_v6 [i]; 107 m6_key . dth = fib ->depth; 109  Tٮ_rou_cou ; 110  v6_fib_fo y ; 111  i = 0; i < 16; i++) { 112 y . d_v6 [ i ] = fib ->dst_ipv6[i]; 114 y . dth = fib ->depth; 115 y . fib_nh_size = fib ->fib_nh_size; 117 #i MULTIPATH_FEAT 118 i( y . fib_nh_size =0 ||ry.fib_nh_siz> MAX_FIB_PATHS ) 120 i( y . fib_nh_size != 1) 123 tf 125 y . fib_nh_size ); 130 #i MULTIPATH_FEAT 131  i = 0; i < y . fib_nh_size ; i++) 133  i = 0; i < 1; i++) 136  v6_fib_th * v6_fib_th_addr = NULL ; 137 v6_fib_th_addr = 138 `puϋ_v6_fib_th ( fib -> nh_v6 [ i ], fib-> out_pt [i]); 140 i( v6_fib_th_addr ) { 141 y . th [ i ] = v6_fib_th_addr ; 142 `tf ("Fibath for IPv6 destination = " 145 m6_key . [0],pm6_key.ip[1],pm6_key.ip[2], 146 m6_key . [3],pm6_key.ip[4],pm6_key.ip[5], 147 m6_key . [6],pm6_key.ip[7],pm6_key.ip[8], 148 m6_key . [9],pm6_key.ip[10],pm6_key.ip[11], 149 m6_key . [12],pm6_key.ip[13], 150 m6_key . [14],pm6_key.[15], fib -> dth , 151 v6_fib_th_addr , 152 (*) y . th [ i ]-> l2_adj_v6_r ); 154 `tf ("Fibath for IPv6 destination = " 157 m6_key . [0],pm6_key.ip[1],pm6_key.ip[2], 158 m6_key . [3],pm6_key.ip[4],pm6_key.ip[5], 159 m6_key . [6],pm6_key.ip[7],pm6_key.ip[8], 160 m6_key . [9],pm6_key.ip[10],pm6_key.ip[11], 161 m6_key . [12],pm6_key.ip[13], 162 m6_key . [14],pm6_key.[15], fib -> dth ); 163 y . th [ i ] = NULL ; 167  key_found , t ; 168 * y_r ; 171 `tf ("%s, L%u \n", __FUNCTION__ , __LINE__ ); 173 t = 174 e_b_m_v6_s . `f_add ( m6_b , (*)& m6_key , & y , 175 & key_found , & y_r ); 176 `tf ("%s, L%u \n", __FUNCTION__ , __LINE__ ); 178 i( t ) { 179 `tf ("Failedo Add IPoute in LPMv6\n"); 182 `tf ("Addedouteo IPv6 LPMable (IPv6 destination = " 185 m6_key . [0],pm6_key.ip[1],pm6_key.ip[2],pm6_key.ip[3], 186 m6_key . [4],pm6_key.ip[5],pm6_key.ip[6],pm6_key.ip[7], 187 m6_key . [8],pm6_key.ip[9],pm6_key.ip[10],pm6_key.ip[11], 188 m6_key . [12],pm6_key.ip[13],pm6_key.ip[14], 189 m6_key . [15], fib -> dth ); 191 Tٮ_rou_cou ++; 192 `tf ("Tٮ Roud Added : %u, Key_found: %d\n", Tٮ_rou_cou , 193 key_found ); 195 i( Tٮ_rou_cou == 2) 196 `v6_e__hash_b (); 199 } } 202 $m6_b_rou_de ( ut8_t d_v6 [ RTE_LPM_IPV6_ADDR_SIZE ], ut8_ dth ) 206  e_b_m_v6_key m6_key ; 207 `memy (& m6_key . , & d_v6 , ( RTE_LPM_IPV6_ADDR_SIZE )); 208 m6_key . dth = depth; 209  key_found , t ; 210 * y = NULL ; 211 y = `e_zmloc ( NULL , 512, RTE_CACHE_LINE_SIZE ); 213 t = 214 e_b_m_v6_s . `f_de ( m6_b , & m6_key , & key_found , 215 y ); 217 i( t ) { 218 `tf ("Failedo Delete IPoute from LPMv6able\n"); 222 `tf ("Deletedoute from IPv6 LPMable (IPv6 destination = " 225 m6_key . [0],pm6_key.ip[1],pm6_key.ip[2],pm6_key.ip[3], 226 m6_key . [4],pm6_key.ip[5],pm6_key.ip[6],pm6_key.ip[7], 227 m6_key . [8],pm6_key.ip[9],pm6_key.ip[10],pm6_key.ip[11], 228 m6_key . [12],pm6_key.ip[13],pm6_key.ip[14], 229 m6_key . [15],pm6_key. dth , key_found ); 232 `move_v6_fib_l2_adj_y ( y ); 233 `e_ ( y ); 235 } } 238 $m6_b_lookup ( e_mbuf ** pkts_bur , 239 ut16_t nb_pkts , 240 ut64_t pkts_mask , 241 l2_phy_r_t * pt_r [ RTE_PORT_IN_BURST_SIZE_MAX ], 242 ut64_t * h_mask ) 244  v6_routg_b_y 245 * v6_s [ RTE_PORT_IN_BURST_SIZE_MAX ]; 246 ut64_t lookup_h_mask_v6 = 0; 247  us ; 248 ut64_t lookup_miss_mask = pkts_mask ; 250 ut32_t d_addr_offt = 251 MBUF_HDR_ROOM + ETH_HDR_SIZE + IP_HDR_DST_ADR_OFST_IPV6 ; 252 ut64_t pkts_key_mask = pkts_mask ; 255 ; pkts_key_mask ;) { 257 ut8_t pos = (ut8_t `__but_z ( pkts_key_mask ); 258 ut64_t pkt_mask = 1LLU << pos ; 259 pkts_key_mask &~ pkt_mask ; 261 ut8_t * m6_key ; 262 ut8_t d_addr [ RTE_LPM_IPV6_ADDR_SIZE ]; 263 `memy ( d_addr , 264 ( ut8_t * `RTE_MBUF_METADATA_UINT32_PTR ( pkts_bur [ pos ], 265 d_addr_offt ), 266 RTE_LPM_IPV6_ADDR_SIZE ); 267 m6_key = 268 ( ut8_t * `RTE_MBUF_METADATA_UINT8_PTR ( pkts_bur [ pos ], 270 `memy ( m6_key , d_addr , RTE_LPM_IPV6_ADDR_SIZE ); 273 `tf (" IPV6 Lookup Mask Before = %p,b_pkts :%u\n", 274 (*) pkts_mask , nb_pkts ); 275 us = 276 e_b_m_s . `f_lookup ( m6_b , pkts_bur , pkts_mask , 277 & lookup_h_mask_v6 , 278 (**) v6_s ); 279 i( us ) { 280 `tf ("LPM Lookup failed for IPoute\n"); 283 `tf (" IPV6 LookuMask A = %p\n", (*) lookup_h_mask_v6 ); 284 lookup_miss_mask =ookup_miss_mask & (~ lookup_h_mask_v6 ); 285 i( L3FWD_DEBUG ) { 286 `tf ("AFTERookup_hit_mask = %p,ookup_miss_mask =%p\n", 287 (*) lookup_h_mask_v6 , (*) lookup_miss_mask ); 290 ; lookup_miss_mask ;) { 292 ut8_t pos = (ut8_t `__but_z ( lookup_miss_mask ); 293 ut64_t pkt_mask = 1LLU << pos ; 294 lookup_miss_mask &~ pkt_mask ; 295 `e_pktmbuf_ ( pkts_bur [ pos ]); 296 pkts_bur [ pos ] = NULL ; 297 i( L3FWD_DEBUG ) 298 `tf ("\n DROP PKT IPV4 Lookup_miss_Mask = %p\n", 299 (*) lookup_miss_mask ); 302 * h_mask = lookup_h_mask_v6 ; 303 ; lookup_h_mask_v6 ;) { 304 ut8_t pos = (ut8_t `__but_z ( lookup_h_mask_v6 ); 305 ut64_t pkt_mask = 1LLU << pos ; 306 lookup_h_mask_v6 &~ pkt_mask ; 307  e_mbuf * pkt = pkts_bur [ pos ]; 309  v6_fib_fo * y = 310 ( v6_fib_fo *) v6_s [ pos ]; 312 #i MULTIPATH_FEAT 314 ut8_t ecmp_th = `v6_hash_ld_b ( pkts_bur [ pos ]); 315 ut8_t ed_th = 0; 316  v6_fib_th * fib_th = NULL ; 317 i((( y -> fib_nh_size != 0) 318 && ( y -> fib_nh_size - 1< MAX_SUPPORTED_FIB_PATHS ) 319 && (( ecmp_th !0&& (ecmp_th - 1< HASH_BUCKET_SIZE )) 320 ed_th = 321 nh_lks [ y -> fib_nh_size - 1][ ecmp_th - 1]; 322 i( ed_th < MAX_FIB_PATHS ) 323 fib_th = y -> th [ ed_th ]; 324 tf 326 y -> fib_nh_size , ecmp_th , ed_th ); 328  v6_fib_th * fib_th = y -> th [0]; 330 i( fib_th = NULL ) { 331 `tf ("Fib_path is NULL, ND hasotesolved\n"); 332 `e_pktmbuf_ ( pkt ); 333 pkts_bur [ pos ] = NULL ; 334 s . nb_l3_dr_pkt ++; 335 * h_mask &~ pkt_mask ; 336 tf 341 i( fib_th -> l2_adj_v6_r -> ags = L2_ADJ_UNRESOLVED ) { 342 `e_pktmbuf_ ( pkts_bur [ pos ]); 343 pkts_bur [ pos ] = NULL ; 344 * h_mask &~ pkt_mask ; 345 i( L3FWD_DEBUG ) 346 tf 351 ut8_t * h_de = 352 `RTE_MBUF_METADATA_UINT8_PTR ( pkt , MBUF_HDR_ROOM ); 353 ut8_t * h_c = 354 `RTE_MBUF_METADATA_UINT8_PTR ( pkt , MBUF_HDR_ROOM + 6); 355 i( L3FWD_DEBUG ) { 356 tf 361 h_de [0],th_dest[1],th_dest[2], 362 h_de [3], 363 h_de [4],th_de[5], h_c [0], 364 h_c [1], 365 h_c [2],th_src[3], 366 h_c [4],th_src[5]); 370 `memy ( h_de , fib_th -> l2_adj_v6_r -> l2_rg , 371 ( h_addr ) * 2 + 2); 373 i( L3FWD_DEBUG ) { 374 tf 377 "%02x:%02x\n", h_de [0], 378 h_de [1],th_dest[2],th_dest[3], 379 h_de [4], 380 h_de [5], h_c [0],th_src[1], 381 h_c [2], 382 h_c [3],th_src[4],th_src[5]); 384 pt_r [ pos ] = fib_th -> l2_adj_v6_r -> phy_pt ; 387 i( L3FWD_DEBUG ) 388 `tf ("Successfully sentoort %u \n\r", 389 fib_th -> out_pt ); 392 } } 394  $l3fwd_rx_v6_cks ( e_mbuf ** m , ut16_t nb_pkts , 395 ut64_t vid_pkts_mask , l2_phy_r_t * pt ) 397 i(! pt ) 399 i( L3FWD_DEBUG ) { 400 tf 402 PRIu64 "\n", nb_pkts , pt -> pmdid , vid_pkts_mask ); 404 ut64_t pkts_f_oss = vid_pkts_mask ; 406  v6_hdr *ipv6_hdr; 408 ut64_t icmp_pkts_mask = vid_pkts_mask ; 409 ut64_t v6_fwd_pkts_mask = vid_pkts_mask ; 410 ut16_t nb_icmpv6_pkt = 0; 411 ut16_t nb_l3_pkt = 0; 413 ut8_t cfigud_pt_v6 [ RTE_LPM_IPV6_ADDR_SIZE ] = { 0 }; 414 t8_t siced_node_mui_addr [ RTE_LPM_IPV6_ADDR_SIZE ] = { 417 ut8_t de_v6_addr [ RTE_LPM_IPV6_ADDR_SIZE ]; 419 `memt ( de_v6_addr , 0, RTE_LPM_IPV6_ADDR_SIZE ); 421 `tf ("\n%: LINE # %u\n", __FUNCTION__ , __LINE__ ); 422  ii ; 423 i( pt -> v6_li ! NULL ) { 424  ii = 0; ii < 16; ii += 1) { 425 cfigud_pt_v6 [ ii ] = 426 (( v6li_t *( pt -> v6_li ))-> addr [ ii ]; 431  ii = 0; ii < 16; ii += 2) { 432 i( pt &&t-> v6_li ) 433 `tf ("%02X%02X ", 434 (( v6li_t *( pt -> v6_li ))-> addr [ ii ], 435 (( v6li_t *( pt -> v6_li ))-> addr [ ii + 439 `tf ("\n%: LINE # %u\n", __FUNCTION__ , __LINE__ ); 440  ii = 0; ii < 16; ii += 2) { 441 `tf ("%02X%02X ", cfigud_pt_v6 [ ii ], 442 cfigud_pt_v6 [ ii + 1]); 445 ; pkts_f_oss ;) { 447 `tf ("\n%: LINE # %u\n", __FUNCTION__ , __LINE__ ); 448 ut8_t pos = (ut8_t `__but_z ( pkts_f_oss ); 449 ut64_t pkt_mask = 1LLU << pos ; 450 pkts_f_oss &~ pkt_mask ; 453 `tf ("\n%: LINE #%u, POS%u\n", __FUNCTION__ , __LINE__ , 454 pos ); 456 i( m [ pos ] = NULL ) { 457 `tf ("\n%s : M_POS IS NULLLLLLL, LINE: %u\n", 458 __FUNCTION__ , __LINE__ ); 461 v6_hdr = 462 `e_pktmbuf_mtod_offt ( m [ pos ],  v6_hdr *, 463 ( h_hdr )); 464 `tf ("\n%: LINE # %u\n", __FUNCTION__ , __LINE__ ); 465  ii = 0; ii < 13; ii += 1) { 466 de_v6_addr [ ii ] = v6_hdr -> d_addr [ii]; 469 `tf ("\n"); 470 `tf ("\n%: LINE # %u\n", __FUNCTION__ , __LINE__ ); 471  ii = 0; ii < 16; ii += 2) { 472 `tf ("%02X%02X ", v6_hdr -> d_addr [ ii ], 473 v6_hdr -> d_addr [ ii + 1]); 475 `tf ("\n"); 476 `tf ("\n%: LINE # %u\n", __FUNCTION__ , __LINE__ ); 477  ii = 0; ii < 16; ii += 2) { 478 `tf ("%02X%02X ", de_v6_addr [ ii ], 479 de_v6_addr [ ii + 1]); 482 `tf ("\n%: LINE # %u", __FUNCTION__ , __LINE__ ); 483 i(( v6_hdr -> o = IPPROTO_ICMPV6 ) && 484 (! memcmp 485 (& v6_hdr -> d_addr , & cfigud_pt_v6 [0], 486 RTE_LPM_IPV6_ADDR_SIZE ) 487 || ! `memcmp (& de_v6_addr [0], 488 & siced_node_mui_addr [0], 489 RTE_LPM_IPV6_ADDR_SIZE ))) { 490 v6_fwd_pkts_mask &~ pkt_mask ; 491 s . nb_rx_l3_icmp_pkt ++; 492 nb_icmpv6_pkt ++; 494 icmp_pkts_mask &~ pkt_mask ; 495 s . nb_rx_l3_pkt ++; 496 nb_l3_pkt ++; 500 i( icmp_pkts_mask ) { 501 i( L3FWD_DEBUG ) 502 tf 504 o_ty [ IP_LOCAL ]-> `func ( m , nb_icmpv6_pkt , icmp_pkts_mask , 505 pt ); 508 i( v6_fwd_pkts_mask ) { 509 i( L3FWD_DEBUG ) 510 tf 512 o_ty [ IP_REMOTE ]-> `func ( m , nb_l3_pkt , 513 v6_fwd_pkts_mask , pt ); 515 } } 517  v6_fib_th * $puϋ_v6_fib_th ( ut8_t 518 nh_v6 [ RTE_LPM_IPV6_ADDR_SIZE ], 519 ut8_t ptid ) 522  fib_th_key_v6 th_key ; 523 ut8_t i ; 524  i = 0; i < 16; i++) { 525 th_key . nh_v6 [ i ] =h_ipv6[i]; 527 th_key . out_pt = ptid ; 528 th_key . fr1 = 0; 529 th_key . fr2 = 0; 530 th_key . fr3 = 0; 532  v6_fib_th * fib_da = NULL ; 534 fib_da = `ve_v6_fib_th_y ( th_key ); 536 i( fib_da ) { 538 `tf (" Fibathntryxists for IPv6 destination = " 541 nh_v6 [0],h_ipv6[1],h_ipv6[2],h_ipv6[3], 542 nh_v6 [4],h_ipv6[5],h_ipv6[6],h_ipv6[7], 543 nh_v6 [8],h_ipv6[9],h_ipv6[10],h_ipv6[11], 544 nh_v6 [12],h_ipv6[13],h_ipv6[14],h_ipv6[15], 545 ptid ); 547 fib_da -> fcou ++; 548  fib_da ; 550 `tf ("IPv6 fib_pathntry Doesn't Exists.......\n"); 554 fib_da = NULL ; 555  l2_adj_v6_y * l2_adj_r = NULL ; 556 l2_adj_r = `puϋ_v6_l2_adj ( nh_v6 , ptid ); 558 i( l2_adj_r ) { 560 ut32_t size = 561 `RTE_CACHE_LINE_ROUNDUP (( v6_fib_th )); 562 fib_da = `e_zmloc ( NULL , size , RTE_CACHE_LINE_SIZE ); 564  i = 0; i < 16; i++) { 565 fib_da -> nh_v6 [ i ] =h_ipv6[i]; 567 fib_da -> out_pt = ptid ; 570 fib_da -> fcou ++; 571 fib_da -> l2_adj_v6_r = l2_adj_r ; 574 `e_hash_add_key_da ( fib_th_v6_hash_hd , & th_key , 575 fib_da ); 576 tf 578 l2_adj_r , fib_da ); 579  fib_da ; 581 tf 584  NULL ; 586 } } 588  l2_adj_v6_y * $puϋ_v6_l2_adj ( ut8_t 589 nh_v6 [ RTE_LPM_IPV6_ADDR_SIZE ], 590 ut8_t ptid ) 593  l2_adj_key_v6 l2_adj_key ; 594 ut8_t i ; 595  i = 0; i < 16; i++) { 596 l2_adj_key . nh_v6 [ i ] =h_ipv6[i]; 598 l2_adj_key . out_pt_id = ptid ; 599 l2_adj_key . fr1 = 0; 600 l2_adj_key . fr2 = 0; 601 l2_adj_key . fr3 = 0; 603  l2_adj_v6_y * adj_da = NULL ; 604  h_addr h_d ; 606 adj_da = `ve_v6_l2_adj_y ( l2_adj_key ); 608 i( adj_da ) { 610 `tf ("ipv6_l2_adj_entryxists for Next Hop IPv6 = " 613 nh_v6 [0],h_ipv6[1],h_ipv6[2],h_ipv6[3], 614 nh_v6 [4],h_ipv6[5],h_ipv6[6],h_ipv6[7], 615 nh_v6 [8],h_ipv6[9],h_ipv6[10],h_ipv6[11], 616 nh_v6 [12],h_ipv6[13],h_ipv6[14],h_ipv6[15], 617 ptid ); 619 `h_addr_cy (& adj_da -> h_addr , & h_d ); 620 adj_da -> fcou ++; 621  adj_da ; 624  h_addr h_c ; 625 ut16_t h_ty = 0x086DD; 626 l2_phy_r_t * pt ; 627 pt = `ifm_g_pt ( ptid ); 628 i( pt = NULL ) { 629 `tf ("PORT %u IS DOWN.. Ubˁشos!\n", ptid ); 630  NULL ; 633 `memy (& h_c , & pt -> maddr , ( h_addr )); 634 ut32_t size = `RTE_CACHE_LINE_ROUNDUP (( l2_adj_y )); 635 adj_da = `e_zmloc ( NULL , size , RTE_CACHE_LINE_SIZE ); 636 i( adj_da = NULL ) { 637 `tf ("L2 Adjacency memoryllocation failed !\n"); 638  NULL ; 641 adj_da -> out_pt_id = ptid ; 643  i = 0; i < 16; i++) { 644 adj_da -> nh_v6 [ i ] =h_ipv6[i]; 646 adj_da -> fcou ++; 647 adj_da -> phy_pt = pt ; 649 `e_hash_add_key_da ( l2_adj_v6_hash_hd , & l2_adj_key , adj_da ); 652 i( `g_de_mac_f_xth_v6 ( nh_v6 , ptid , & h_d )) { 654 `h_addr_cy (& h_d , & adj_da -> h_addr ); 657 `memy (& adj_da -> l2_rg , & h_d , 658 ( h_addr )); 659 `memy (& adj_da -> l2_rg [6], & h_c , 660 ( h_addr )); 661 `memy (& adj_da -> l2_rg [12], & h_ty , 2); 663 adj_da -> ags = L2_ADJ_RESOLVED ; 664 tf 666 adj_da ); 668  adj_da ; 670 adj_da -> ags = L2_ADJ_UNRESOLVED ; 671 tf 674  NULL ; 675 } } 677  l2_adj_v6_y * $ve_v6_l2_adj_y ( l2_adj_key_v6 678 l2_adj_key ) 680  l2_adj_v6_y * t_l2_adj_da = NULL ; 682  t = 683 `e_hash_lookup_da ( l2_adj_v6_hash_hd , & l2_adj_key , 684 (**)& t_l2_adj_da ); 685 i( t < 0) { 686 tf 688 t , EINVAL , ENOENT ); 690 `tf ("L2 Adj hashookup Successful..!!!\n"); 691  t_l2_adj_da ; 693  NULL ; 694 } } 696  $g_de_mac_f_xth_v6 ( ut8_t nh_v6 [ RTE_LPM_IPV6_ADDR_SIZE ], 697 ut32_t out_phy_pt , 698  h_addr * hw_addr ) 700  nd_y_da * nd_da = NULL ; 701  nd_key_v6 tmp_nd_key ; 702 ut8_t i ; 703  i = 0; i < 16; i++) { 704 tmp_nd_key . v6 [ i ] = nh_v6 [i]; 706 tmp_nd_key . pt_id = out_phy_pt ; 708 nd_da = `ve_nd_y ( tmp_nd_key ); 709 i( nd_da = NULL ) { 710 `tf ("NDntry isot found\n"); 713 `h_addr_cy (& nd_da -> h_addr , hw_addr ); 716 } } 718  v6_fib_th * $ve_v6_fib_th_y ( fib_th_key_v6 719 th_key ) 722  v6_fib_th * t_fib_th_da = NULL ; 723  t = 724 `e_hash_lookup_da ( fib_th_v6_hash_hd , & th_key , 725 (**)& t_fib_th_da ); 726 i( t < 0) { 727 tf 729 t , EINVAL , ENOENT ); 730  NULL ; 732  t_fib_th_da ; 734 } } 736  $move_v6_fib_l2_adj_y (* y ) 738  v6_fib_fo y1 ; 739 `memy (& y1 , y , ( v6_fib_fo )); 741  v6_fib_th * fib_th_addr = y1 . th [0]; 742 i( fib_th_addr -> fcou > 1) { 743 `tf ("BEFORE fib_pathntry isot Removed!h_iPv6 = " 746 fib_th_addr -> nh_v6 [0], fib_path_addr->nh_ipv6[1], 747 fib_th_addr -> nh_v6 [2], fib_path_addr->nh_ipv6[3], 748 fib_th_addr -> nh_v6 [4], fib_path_addr->nh_ipv6[5], 749 fib_th_addr -> nh_v6 [6], fib_path_addr->nh_ipv6[7], 750 fib_th_addr -> nh_v6 [8], fib_path_addr->nh_ipv6[9], 751 fib_th_addr -> nh_v6 [10], fib_path_addr->nh_ipv6[11], 752 fib_th_addr -> nh_v6 [12], fib_path_addr->nh_ipv6[13], 753 fib_th_addr -> nh_v6 [14], fib_path_addr->nh_ipv6[15], 754 fib_th_addr -> out_pt , fib_th_addr-> fcou ); 755 fib_th_addr -> fcou --; 756 `tf ("AFTER fib_pathntry isot Removed!h_iPv6 = " 759 fib_th_addr -> nh_v6 [0], fib_path_addr->nh_ipv6[1], 760 fib_th_addr -> nh_v6 [2], fib_path_addr->nh_ipv6[3], 761 fib_th_addr -> nh_v6 [4], fib_path_addr->nh_ipv6[5], 762 fib_th_addr -> nh_v6 [6], fib_path_addr->nh_ipv6[7], 763 fib_th_addr -> nh_v6 [8], fib_path_addr->nh_ipv6[9], 764 fib_th_addr -> nh_v6 [10], fib_path_addr->nh_ipv6[11], 765 fib_th_addr -> nh_v6 [12], fib_path_addr->nh_ipv6[13], 766 fib_th_addr -> nh_v6 [14], fib_path_addr->nh_ipv6[15], 767 fib_th_addr -> out_pt , fib_th_addr-> fcou ); 770  l2_adj_v6_y * adj_addr = NULL ; 771 adj_addr = fib_th_addr -> l2_adj_v6_r ; 773 i( adj_addr ! NULL ) { 774 `tf ("%s: CHECK %d\n\r", __FUNCTION__ , __LINE__ ); 775  l2_adj_key_v6 l2_adj_key ; 776 `memy (& l2_adj_key . nh_v6 , fib_th_addr ->nh_ipv6, 777 RTE_LPM_IPV6_ADDR_SIZE ); 778 l2_adj_key . out_pt_id = 779 fib_th_addr -> out_pt , 780 `e_hash_d_key ( l2_adj_v6_hash_hd , 781 & l2_adj_key ); 782 `e_ ( adj_addr ); 783 adj_addr = NULL ; 786  fib_th_key_v6 th_key ; 787 `memy (& th_key . nh_v6 , fib_th_addr ->nh_ipv6, 788 RTE_LPM_IPV6_ADDR_SIZE ); 789 th_key . out_pt = fib_th_addr ->out_port; 790 `e_hash_d_key ( fib_th_v6_hash_hd , & th_key ); 791 `e_ ( fib_th_addr ); 792 fib_th_addr = NULL ; 794 } } 796  $is_vid_v6_pkt ( v6_hdr * pkt , ut32_t lk_n ) 798 i( lk_n < ( v4_hdr )) 800 i( `e_u_to_be_16 ( pkt -> yld_n < ( v6_hdr )) 804 } } 807 $v6_l3_oc_ty_add ( ut8_t oc_ty , 808 (* func ( e_mbuf **, ut16_t , ut64_t , 809 l2_phy_r_t *)) 811  oc_ty ) { 812  IPPROTO_ICMPV6 : 813 o_ty [ IP_LOCAL ] = 814 `e_mloc ( NULL , ( _oc_ty ), 815 RTE_CACHE_LINE_SIZE ); 816 o_ty [ IP_LOCAL ]-> oc_ty =rotocol_type; 817 o_ty [ IP_LOCAL ]-> func = func; 820  IPPROTO_TCP : 821  IPPROTO_UDP : 822 o_ty [ IP_REMOTE ] = 823 `e_mloc ( NULL , ( _oc_ty ), 824 RTE_CACHE_LINE_SIZE ); 825 o_ty [ IP_REMOTE ]-> oc_ty =rotocol_type; 826 o_ty [ IP_REMOTE ]-> func = func; 829 } } 832 $v6_lol_div ( e_mbuf ** pkt_bur , __e_unud ut16_t nb_rx , 833 ut64_t icmp_pkt_mask , l2_phy_r_t * pt ) 835 ; icmp_pkt_mask ;) { 837 ut8_t pos = (ut8_t `__but_z ( icmp_pkt_mask ); 838 ut64_t pkt_mask = 1LLU << pos ; 839 icmp_pkt_mask &~ pkt_mask ; 841 `oss_icmpv6_pkt ( pkt_bur [ pos ], pt ); 843 } } 846 $v6_fwd_div ( e_mbuf ** pkt_bur , ut16_t nb_pkts , 847 ut64_t v6_fwd_pkts_mask , l2_phy_r_t * pt ) 849 i( L3FWD_DEBUG ) { 850 tf 852 nb_pkts , pt -> pmdid ); 854 ut64_t pkts_f_oss = v6_fwd_pkts_mask ; 856  v6_hdr *ipv6_hdr; 857 l2_phy_r_t * pt_r [ RTE_PORT_IN_BURST_SIZE_MAX ]; 858 ut64_t h_mask = 0; 860 ; pkts_f_oss ;) { 862 ut8_t pos = (ut8_t `__but_z ( pkts_f_oss ); 863 ut64_t pkt_mask = 1LLU << pos ; 864 pkts_f_oss &~ pkt_mask ; 865 v6_hdr = 866 `e_pktmbuf_mtod_offt ( pkt_bur [ pos ],  v6_hdr *, 867 ( h_hdr )); 870 i( `is_vid_v6_pkt ( v6_hdr , pkt_bur [ pos ]-> pkt_n ) < 0) { 871 `e_pktmbuf_ ( pkt_bur [ pos ]); 872 pkt_bur [ pos ] = NULL ; 873 v6_fwd_pkts_mask &~(1LLU << pos ); 874 nb_pkts --; 875 s . nb_l3_dr_pkt ++; 879 i( L3FWD_DEBUG ) { 880 tf 882 nb_pkts , v6_fwd_pkts_mask ); 886 `m6_b_lookup ( pkt_bur , nb_pkts , v6_fwd_pkts_mask , pt_r , 887 & h_mask ); 888 } } 890 ut8_t $v6_hash_ld_b ( e_mbuf * mbuf ) 892 ut32_t c_addr_offt = 893 MBUF_HDR_ROOM + ETH_HDR_SIZE + IP_HDR_SRC_ADR_OFST_IPV6 ; 894 ut32_t d_addr_offt = 895 MBUF_HDR_ROOM + ETH_HDR_SIZE + IP_HDR_DST_ADR_OFST_IPV6 ; 896 ut8_t c_addr [ RTE_LPM_IPV6_ADDR_SIZE ]; 897 ut8_t d_addr [ RTE_LPM_IPV6_ADDR_SIZE ]; 899 `memy (& c_addr , 900 ( ut8_t * `RTE_MBUF_METADATA_UINT32_PTR ( mbuf , c_addr_offt ), 901 RTE_LPM_IPV6_ADDR_SIZE ); 902 `memy (& d_addr , 903 ( ut8_t * `RTE_MBUF_METADATA_UINT32_PTR ( mbuf , d_addr_offt ), 904 RTE_LPM_IPV6_ADDR_SIZE ); 905 ut32_t hash_key1 = 0; 906 ut32_t hash_key2 = 0; 907 ut8_t i ; 908  i = 0; i < RTE_LPM_IPV6_ADDR_SIZE ; i++) { 909 hash_key1 + c_addr [ i ]; 910 hash_key2 + d_addr [ i ]; 912 hash_key1 = hash_key1 ^ hash_key2 ; 913 hash_key2 = hash_key1 ; 914 hash_key1 = `rr32 (hash_key1, RTE_LPM_IPV6_ADDR_SIZE ); 915 hash_key1 = hash_key1 ^ hash_key2 ; 917 hash_key2 = hash_key1 ; 919 hash_key1 = `rr32 (hash_key1, 8); 920 hash_key1 = hash_key1 ^ hash_key2 ; 922 hash_key1 = hash_key1 & ( HASH_BUCKET_SIZE - 1); 923 i( L3FWD_DEBUG ) 924 `tf ("Hash Resu_key: %d, \n", hash_key1 ); 925  hash_key1 ; 926 } } 929 $sve_v6_l2_adj ( ut8_t nh_v6 [ RTE_LPM_IPV6_ADDR_SIZE ], ut8_ ptid , 930  h_addr * hw_addr ) 932  l2_adj_v6_y * adj_da = NULL ; 933  h_addr h_d ; 934 ut16_t h_ty = 0x086DD; 936  l2_adj_key_v6 l2_adj_key ; 937 `memy (& l2_adj_key . nh_v6 , &nh_v6, RTE_LPM_IPV6_ADDR_SIZE ); 938 l2_adj_key . out_pt_id = ptid ; 940 adj_da = `ve_v6_l2_adj_y ( l2_adj_key ); 941 i( adj_da ) { 942 i( adj_da -> ags = L2_ADJ_UNRESOLVED 943 || `memcmp (& adj_da -> h_addr , hw_addr , 6)) { 944 `h_addr_cy ( hw_addr , & adj_da -> h_addr ); 947 `memy (& adj_da -> l2_rg , hw_addr , 948 ( h_addr )); 949 `memy (& adj_da -> l2_rg [6], 950 & adj_da -> phy_pt -> maddr , 951 ( h_addr )); 952 `memy (& adj_da -> l2_rg [12], & h_ty , 2); 954 adj_da -> ags = L2_ADJ_RESOLVED ; 960 l2_phy_r_t * pt ; 961 pt = `ifm_g_pt ( ptid ); 962 i( pt = NULL ) { 963 `tf ("PORT %u IS DOWN..! UbˁPross\n", ptid ); 966 ut32_t size = `RTE_CACHE_LINE_ROUNDUP (( l2_adj_y )); 967 adj_da = `e_zmloc ( NULL , size , RTE_CACHE_LINE_SIZE ); 968 i( adj_da = NULL ) { 969 `tf ("L2 Adjacency memoryllocation failed !\n"); 973 adj_da -> out_pt_id = ptid ; 974 `memy ( adj_da -> nh_v6 , &nh_v6, RTE_LPM_IPV6_ADDR_SIZE ); 976 adj_da -> phy_pt = pt ; 978 `h_addr_cy (& h_d , & adj_da -> h_addr ); 981 `memy (& adj_da -> l2_rg , hw_addr , ( h_addr )); 982 `memy (& adj_da -> l2_rg [6], & pt -> maddr , 983 ( h_addr )); 984 `memy (& adj_da -> l2_rg [12], & h_ty , 2); 986 adj_da -> ags = L2_ADJ_RESOLVED ; 989 `e_hash_add_key_da ( l2_adj_v6_hash_hd , & l2_adj_key , adj_da ); 991 `tf (" NDesolution successfulnd stored in ipv6_l2_adj_entry %p\n", 992 adj_da ); 993 } } 995  $v6_e__hash_b () 997 cڡ * xt_key ; 998 * xt_da ; 999 ut32_t = 0; 1000 ut8_t ii ; 1001 `tf ("\n\t\t\t IPv6 FIB_path Cacheable...."); 1002 tf 1004 tf 1006 tf 1009  e_hash_e 1010 ( fib_th_v6_hash_hd , & xt_key , & xt_da , & ) >= 0) { 1011  v6_fib_th * tmp_da = 1012 ( v6_fib_th *) xt_da ; 1013  fib_th_key_v6 tmp_key ; 1014 `memy (& tmp_key , xt_key , (tmp_key)); 1015  ii = 0; ii < 16; ii += 2) { 1016 `tf ("%02X%02X ", tmp_da -> nh_v6 [ ii ], 1017 tmp_da -> nh_v6 [ ii + 1]); 1019 `tf (" \%u \%u \%p\n", tmp_da -> out_pt , 1020 tmp_da -> fcou ,mp_da-> l2_adj_v6_r ); 1024 = 0; 1026 `tf ("\n\t\t\t L2 ADJ Cacheable....."); 1027 tf 1029 tf 1031 tf 1033  e_hash_e 1034 ( l2_adj_v6_hash_hd , & xt_key , & xt_da , & ) >= 0) { 1035  l2_adj_v6_y * l2_da = 1036 ( l2_adj_v6_y *) xt_da ; 1037  l2_adj_key_v6 l2_key ; 1038 `memy (& l2_key , xt_key , (l2_key)); 1039  ii = 0; ii < 16; ii += 2) { 1040 `tf ("%02X%02X ", l2_da -> nh_v6 [ ii ], 1041 l2_da -> nh_v6 [ ii + 1]); 1043 `tf (" \t%u\t%x:%x:%x:%x:%x:%x:%x:%x:%x:%x:%x:%x\t%p\n", 1044 l2_da -> out_pt_id , 1045 l2_da -> l2_rg [0], 1046 l2_da -> l2_rg [1], 1047 l2_da -> l2_rg [2], 1048 l2_da -> l2_rg [3], 1049 l2_da -> l2_rg [4], 1050 l2_da -> l2_rg [5], 1051 l2_da -> l2_rg [6], 1052 l2_da -> l2_rg [7], 1053 l2_da -> l2_rg [8], 1054 l2_da -> l2_rg [9], 1055 l2_da -> l2_rg [10], 1056 l2_da -> l2_rg [11],2_da-> phy_pt ); 1058 } } @VIL/l2l3_stack/l3fwd_lpm6.h 22 #ide L3FWD_LPM6_H 23  #L3FWD_LPM6_H ) 25  ~ 26  ~ 27  ~ 28  ~ 29  ~ 30  ~ 31  ~ 32  ~ 33  ~ 34  ~ 35  ~ 37  ~ 38  ~ 39  ~ 40  ~ 41  ~ 42  ~ 43  ~ 44  ~ 45  ~ 46  ~ 47  ~ 48  ~ 49  ~ 50  ~"l3fwd_comm.h " 51  ~"l3fwd_m4.h " 52  ~"r.h " 58  #MBUF_HDR_ROOM 256 ) 60  #IP_HDR_SIZE_IPV6 40 ) 61  #IP_HDR_SRC_ADR_OFST_IPV6 8 ) 62  #IP_HDR_DST_ADR_OFST_IPV6 24 ) 65  #IPV6_L3FWD_LPM_MAX_RULES 1024 ) 66  #IPV6_L3FWD_LPM_NUMBER_TBL8S (1 << 16 ) 68  #MAX_FIB_PATHS 8 ) 74  sv6_routg_fo { 75 ut8_t md_v6 [ RTE_LPM_IPV6_ADDR_SIZE ]; 76 ut8_t mdth ; 77 ut32_t mmric ; 78 ut32_t mfib_nh_size ; 79 ut8_t mnh_v6 [ MAX_FIB_PATHS ][ RTE_LPM_IPV6_ADDR_SIZE ]; 80 ut8_t mout_pt [ MAX_FIB_PATHS ]; 81 } g__e_che_igd ; 87  sv6_fib_th { 88 ut8_t mnh_v6 [ RTE_LPM_IPV6_ADDR_SIZE ]; 89 ut32_t mfcou ; 90 ut8_t mout_pt ; 91  l2_adj_v6_y * ml2_adj_v6_r ; 92 } g__e_che_igd ; 98  sv6_fib_fo { 99 ut8_t md_v6 [ RTE_LPM_IPV6_ADDR_SIZE ]; 100 ut8_t mdth ; 101 ut32_t mmric ; 102 ut32_t mfib_nh_size ; 103  v6_fib_th * mth [ MAX_FIB_PATHS ]; 104 } g__e_che_igd ; 109  sl2_adj_v6_y { 110  h_addr mh_addr ; 111 ut8_t mout_pt_id ; 112 ut8_t mnh_v6 [ RTE_LPM_IPV6_ADDR_SIZE ]; 113 ut32_t mfcou ; 114 ut8_t ml2_rg [256]; 115 l2_phy_r_t * mphy_pt ; 116 ut8_t mags ; 117 } g__e_che_igd ; 122  sl2_adj_key_v6 { 125 ut8_t mnh_v6 [ RTE_LPM_IPV6_ADDR_SIZE ]; 126 ut8_t mout_pt_id ; 127 ut8_t mfr1 ; 128 ut8_t mfr2 ; 129 ut8_t mfr3 ; 135  sfib_th_key_v6 { 138 ut8_t mnh_v6 [ RTE_LPM_IPV6_ADDR_SIZE ]; 139 ut8_t mout_pt ; 140 ut8_t mfr1 ; 141 ut8_t mfr2 ; 142 ut8_t mfr3 ; 145  sv6_oc_ty { 146 ut8_t moc_ty ; 147 (* mfunc ( me_mbuf **, mut16_t , mut64_t , 148 ml2_phy_r_t *); 149 } g__e_che_igd ; 157  m6_ (); 166  m6_b_rou_add ( v6_routg_fo * da ); 177  m6_b_rou_de ( ut8_t d_v6 [ RTE_LPM_IPV6_ADDR_SIZE ], 178 ut8_t dth ); 191  m6_b_lookup ( e_mbuf ** pkts_bur , ut16_t nb_pkts , 192 ut64_t pkts_mask , 193 l2_phy_r_t * pt_r [ RTE_PORT_IN_BURST_SIZE_MAX ], 194 ut64_t * h_mask ); 209  l3fwd_rx_v6_cks ( e_mbuf ** m , ut16_t nb_pkts , 210 ut64_t vid_pkts_mask , 211 l2_phy_r_t * _pt ); 222  v6_fib_th * puϋ_v6_fib_th ( ut8_t 223 nh_v6 [ RTE_LPM_IPV6_ADDR_SIZE ], 224 ut8_t out_pt ); 234  v6_fib_th * ve_v6_fib_th_y ( fib_th_key_v6 235 th_key ); 245  l2_adj_v6_y * ve_v6_l2_adj_y ( l2_adj_key_v6 246 l2_adj_key ); 257  l2_adj_v6_y * puϋ_v6_l2_adj ( ut8_t 258 nh_ [ RTE_LPM_IPV6_ADDR_SIZE ], 259 ut8_t ptid ); 272  g_de_mac_f_xth_v6 ( ut8_t nh_v6 [ RTE_LPM_IPV6_ADDR_SIZE ], 273 ut32_t out_phy_pt , 274  h_addr * hw_addr ); 281  move_v6_fib_l2_adj_y (* y ); 284 v6_l3_oc_ty_add ( ut8_t oc_ty , 285 (* func ( e_mbuf **, ut16_t , ut64_t , 286 l2_phy_r_t *)); 289 `v6_lol_div ( e_mbuf **, ut16_t , ut64_t , 290 l2_phy_r_t *); 293 `v6_fwd_div ( e_mbuf **, ut16_t , ut64_t , 294 l2_phy_r_t *); 296  `is_vid_v6_pkt ( v6_hdr * pkt , ut32_t lk_n ); 297 ut8_t `v6_hash_ld_b ( e_mbuf * mbuf ); 311  `sve_v6_l2_adj ( ut8_t nh_ [ RTE_LPM_IPV6_ADDR_SIZE ], ut8_ ptid , 312  h_addr * hw_addr ); 314  `v6_e__hash_b (); @VIL/l2l3_stack/l3fwd_main.c 24  ~"l3fwd_comm.h " 25  ~"l2_o.h " 26  ~"l3fwd_m4.h " 27  ~"l3fwd_m6.h " 28  ~"r.h " 29  ~"lib_p.h " 30  ~"lib_icmpv6.h " 32  routg_fo gput_y [] = { 33 #i MULTIPATH_FEAT 34 { IPv4 (30, 12, 0, 1), 24, 0, 4, 35 { IPv4 (192, 168, 0, 2), IPv4(1, 1, 1, 7), IPv4(120, 0, 0, 2), 36 IPv4 (30, 40, 50, 60)}, {1, 1, 1, 1} }, 38 { IPv4 (40, 12, 0, 1), 24, 0, 4, 39 { IPv4 (192, 168, 0, 2), IPv4(1, 1, 1, 7), IPv4(120, 0, 0, 2), 40 IPv4 (30, 40, 50, 60)}, {1, 1, 1, 1} }, 42 { IPv4 (50, 12, 0, 1), 24, 0, 4, 43 { IPv4 (192, 168, 0, 2), IPv4(1, 1, 1, 7), IPv4(120, 0, 0, 2), 44 IPv4 (30, 40, 50, 60)}, {1, 1, 1, 1} }, 46 { IPv4 (60, 12, 0, 1), 24, 0, 4, 47 { IPv4 (192, 168, 0, 2), IPv4(1, 1, 1, 7), IPv4(120, 0, 0, 2), 48 IPv4 (30, 40, 50, 60)}, {1, 1, 1, 1} }, 50 { IPv4 (100, 100, 100, 100), 24, 0, 2, 51 { IPv4 (120, 0, 0, 2), IPv4(120, 0, 0, 2)}, {1, 1} }, 53 { IPv4 (200, 100, 100, 100), 24, 0, 2, 54 { IPv4 (80, 0, 0, 2), IPv4(80, 40, 50, 60)}, {1, 1} }, 56 { IPv4 (30, 12, 0, 1), 24, 0, 1, 57 { IPv4 (192, 168, 0, 2)}, {1} }, 59 { IPv4 (20, 12, 0, 1), 24, 0, 1, 60 { IPv4 (120, 0, 0, 2)}, {1} }, 64  v6_routg_fo gv6_put_y [] = { 81  $l3fwd_ () 83 `tf (" *********** L3 Initialization START ************\n"); 84 i( `m_ () == 0) { 85 `e_ex ( EXIT_FAILURE , "L3 Initialization IPv4 Failed\n"); 87 i( `m6_ () == 0) { 88 `e_ex ( EXIT_FAILURE , "L3 Initialization for IPV6 Failed\n"); 91 `li_add_ty ( ETHER_TYPE_IPv4 , l3fwd_rx_v4_cks ); 92 `li_add_ty ( ETHER_TYPE_IPv6 , l3fwd_rx_v6_cks ); 94 `l3_oc_ty_add ( IPPROTO_ICMP , _lol_cks_oss ); 95 `l3_oc_ty_add ( IPPROTO_TCP , _fwd_div ); 96 `l3_oc_ty_add ( IPPROTO_UDP , _fwd_div ); 98 `v6_l3_oc_ty_add ( IPPROTO_ICMPV6 , v6_lol_div ); 99 `v6_l3_oc_ty_add ( IPPROTO_TCP , v6_fwd_div ); 100 `v6_l3_oc_ty_add ( IPPROTO_UDP , v6_fwd_div ); 102 } } 104  $puϋ_m_rous () 106 `puϋ_m4_b_rous (); 108 } } 110  $puϋ_m4_b_rous () 112 ut8_t i ; 113 tf 115  i = 0; i < MAX_ROUTES ; i++) { 116 i( `m4_b_rou_add (& put_y [ i ])) { 118 `tf ("TٮouAdded# %d\n", i + 1); 120 `e_ex ( EXIT_FAILURE , 122 i ); 125 tf 127 } } 129  $puϋ_m6_b_rous () 131 ut8_t i ; 132 tf 134  i = 0; i < 2; i++) { 135 i( `m6_b_rou_add (& v6_put_y [ i ])) { 137 `tf ("Addedou # %d\n", i ); 139 `e_ex ( EXIT_FAILURE , 141 i ); 144 `tf (" *********** L3 IPV6 Route Initialization END ************\n"); 145 } } @VIL/l2l3_stack/lib_arp.c 17  ~ 18  ~ 19  ~ 20  ~ 21  ~ 22  ~ 23  ~ 24  ~ 25  ~ 26  ~ 27  ~ 28  ~ 29  ~ 30  ~ 31  ~ 32  ~ 33  ~ 34  ~ 35  ~ 36  ~ 37  ~"r.h " 38  ~"l2_o.h " 39  ~"lib_p.h " 40  ~"l3fwd_m4.h " 41  ~"vnf_comm.h " 43 #i( RTE_BYTE_ORDER = RTE_LITTLE_ENDIAN ) 44  #CHECK_ENDIAN_16 ( x `e_be_to_u_16 (x) ) 45  #CHECK_ENDIAN_32 ( x `e_be_to_u_32 (x) ) 47  #CHECK_ENDIAN_16 ( x (x) ) 48  #CHECK_ENDIAN_32 ( x (x) ) 51  #NB_ARPICMP_MBUF 64 ) 52  #NB_NDICMP_MBUF 64 ) 53  #IP_VERSION_4 0x40 ) 54  #IP_HDRLEN 0x05 ) 55  #IP_VHL_DEF ( IP_VERSION_4 | IP_HDRLEN ) ) 57  #is_mui_v4_addr ( v4_addr ) \ 58 ((( `e_be_to_u_32 (( v4_addr )>> 24& 0x000000FF=0xE0) ) 60 ut8_t v__pt_a [ PIPELINE_MAX_PORT_IN ]; 61 ut32_t tim_lce ; 62 ut32_t gp_timeout = ARP_TIMER_EXPIRY ; 65  #INADDRSZ 4 ) 66  #IN6ADDRSZ 16 ) 67  my___v6 ( af , cڡ * c , * d ); 68  __v6 (cڡ * c , * d ); 69  __v4 (cڡ * c , * d ); 70  cvt_efixn_to_tmask_v6 ( ut32_t dth , 71 ut8_t tmask_v6 []); 73 ut8_t gvnf_comm_p_lib_ ; 74 ut8_t gvnf_comm_nd_lib_ ; 75 ut8_t gldb_pe_cou ; 77 ut32_t gARPICMP_DEBUG ; 78 ut32_t gNDIPV6_DEBUG ; 80 ut32_t gp_rou_tbl_dex ; 81 ut32_t gnd_rou_tbl_dex ; 82 ut32_t glk_hw_addr_y_idx ; 84 ut32_t glib_p_g_mac_q ; 85 ut32_t glib_p_nh_found ; 86 ut32_t glib_p_no_nh_found ; 87 ut32_t glib_p_p_y_found ; 88 ut32_t glib_p_no_p_y_found ; 89 ut32_t glib_p_puϋ_ed ; 90 ut32_t glib_p_de_ed ; 91 ut32_t glib_p_dui_found ; 93 ut32_t glib_nd_g_mac_q ; 94 ut32_t glib_nd_nh_found ; 95 ut32_t glib_nd_no_nh_found ; 96 ut32_t glib_nd_nd_y_found ; 97 ut32_t glib_nd_no_p_y_found ; 98 ut32_t glib_nd_puϋ_ed ; 99 ut32_t glib_nd_de_ed ; 100 ut32_t glib_nd_dui_found ; 101  e_mempo * glib_p_pktmbuf_tx_po ; 102  e_mempo * glib_nd_pktmbuf_tx_po ; 104  e_mbuf * glib_p_pkt ; 105  e_mbuf * glib_nd_pkt ; 107 ut8_t gdeu_h_addr [6] = { 0, 0, 0, 0, 1, 1 }; 108 ut8_t gdeu_ [4] = { 0, 0, 1, 1 }; 110  e_hash_ms gp_hash_ms = { 111 . me = "ARP", 112 . gs = 64, 113 . grved = 0, 114 . gkey_n = ( p_key_v4 ), 115 . ghash_func = e_jhash , 116 . ghash_func__v = 0, 119  e_hash_ms gnd_hash_ms = { 120 . me = "ND", 121 . gs = 64, 122 . grved = 0, 123 . gkey_n = ( nd_key_v6 ), 124 . ghash_func = e_jhash , 125 . ghash_func__v = 0, 128  e_hash * gp_hash_hd ; 129  e_hash * gnd_hash_hd ; 131  t_pkt1 ( e_mbuf * pkt ); 133  p_ms * gmyA ; 134  e_pe * gmyP ; 135 ut8_t gnum_vnf_thads ; 140  sp_pt_addss { 141 ut32_t m ; 142 ut8_t mmac_addr [6]; 145  p_pt_addss gp_pt_addss [ RTE_MAX_ETHPORTS ]; 146  e_mempo * gtim_mempo_p ; 148  gtim_objs_mempo_cou = 70000; 150  #MAX_NUM_ARP_ENTRIES 64 ) 151  #MAX_NUM_ND_ENTRIES 64 ) 153 ut32_t g_nh (uint32_t, uint32_t *); 154  g_nh_v6 ( ut8_t v6 [], ut32_t * pt , ut8_ nhv6 []); 156  #MAX_ARP_DATA_ENTRY_TABLE 7 ) 158  b_p_y_da gp_y_da_b [ MAX_ARP_DATA_ENTRY_TABLE ] = { 159 {{0, 0, 0, 0, 0, 1}, 1, INCOMPLETE , IPv4 (192, 168, 0, 2)}, 160 {{0, 0, 0, 0, 0, 2}, 0, INCOMPLETE , IPv4 (192, 168, 0, 3)}, 161 {{0, 0, 0, 0, 0, 1}, 1, INCOMPLETE , IPv4 (30, 40, 50, 60)}, 162 {{0, 0, 0, 0, 0, 1}, 1, INCOMPLETE , IPv4 (120, 0, 0, 2)}, 163 {{0, 0, 0, 0, 0, 4}, 3, INCOMPLETE , IPv4 (1, 1, 1, 4)}, 164 {{0, 0, 0, 0, 0, 5}, 4, INCOMPLETE , IPv4 (1, 1, 1, 5)}, 165 {{0, 0, 0, 0, 0, 6}, 1, INCOMPLETE , IPv4 (1, 1, 1, 7)}, 168  #MAX_ND_DATA_ENTRY_TABLE 7 ) 169  b_nd_y_da gnd_y_da_b [ MAX_ND_DATA_ENTRY_TABLE ] = { 170 {{0, 0, 0, 0, 0, 8}, 1, INCOMPLETE , 173 {{0, 0, 0, 0, 0, 9}, 1, INCOMPLETE , 175 {{0, 0, 0, 0, 0, 10}, 2, INCOMPLETE , 177 {{0, 0, 0, 0, 0, 11}, 3, INCOMPLETE , 179 {{0, 0, 0, 0, 0, 12}, 4, INCOMPLETE , 181 {{0, 0, 0, 0, 0, 13}, 5, INCOMPLETE , 183 {{0, 0, 0, 0, 0, 14}, 6, INCOMPLETE , 187  lib_nd_rou_b_y glib_nd_rou_b [ MAX_ND_RT_ENTRY ] = { 222  lib_p_rou_b_y glib_p_rou_b [ MAX_ARP_RT_ENTRY ] = { 241  t_a (); 244  $t_a () 246 * y [10]; 247 size_t size ; 248 ** rgs ; 249 size_t i ; 251 size = `backa ( y , 10); 252 rgs = `backa_symbs ( y , size ); 254 `RTE_LOG ( INFO , LIBARP , "Obed %zd sck fmes.\n", size ); 256  i = 0; i < size ; i++) 257 `RTE_LOG ( INFO , LIBARP , "%s\n", rgs [ i ]); 259 ` ( rgs ); 260 } } 262 ut32_t $g_nh ( ut32_t , ut32_* pt ) 264  i = 0; 265  i = 0; i < MAX_ARP_RT_ENTRY ; i++) { 266 i((( lib_p_rou_b [ i ]. 267 & lib_p_rou_b [ i ]. mask ) == 268 ( & lib_p_rou_b [ i ]. mask ))) { 270 * pt = lib_p_rou_b [ i ].port; 271 lib_p_nh_found ++; 272  lib_p_rou_b [ i ]. nh ; 274 i( ARPICMP_DEBUG ) 275 `tf ("Noh match ip 0x%x,ort %u,_ip " 277 , * pt , lib_p_rou_b [ i ].ip, 278 lib_p_rou_b [ i ]. pt , 279 lib_p_rou_b [ i ]. mask , 280 ( lib_p_rou_b [ i ]. & 281 lib_p_rou_b [ i ]. mask ), 282 ( & lib_p_rou_b [ i ]. mask )); 284 i( ARPICMP_DEBUG ) 285 `tf ("NNH - i0x%x,܈%u\n", , * pt ); 286 lib_p_no_nh_found ++; 288 } } 291  $g_nh_v6 ( ut8_t v6 [], ut32_t * pt , ut8_ nhv6 []) 293  i = 0; 294 ut8_t tmask_v6 [16], t_nd [16], t_ [16]; 295 ut8_t k = 0, l = 0, dthags = 0, dthags1 = 0; 296 `memt ( tmask_v6 , 0, (netmask_ipv6)); 297 `memt ( t_nd , 0, (netip_nd)); 298 `memt ( t_ , 0, (netip_in)); 299 i(! v6 ) 301  i = 0; i < MAX_ARP_RT_ENTRY ; i++) { 303 `cvt_efixn_to_tmask_v6 ( lib_nd_rou_b [ i ]. dth , 304 tmask_v6 ); 306  k = 0; k < 16; k++) { 307 i( lib_nd_rou_b [ i ]. v6 [ k ] & tmask_v6 [k]) { 308 dthags ++; 309 t_nd [ k ] = lib_nd_rou_b [ i ]. v6 [k]; 313  l = 0; < 16;++) { 314 i( v6 [ l ] & tmask_v6 [l]) { 315 dthags1 ++; 316 t_ [ l ] = v6 [l]; 319  j = 0; 320 i(( dthags = dthags1 ) 321 && ( `memcmp ( t_nd , t_ , (netip_nd)) == 0)) { 323 * pt = lib_nd_rou_b [ i ].port; 324 lib_nd_nh_found ++; 326  j = 0; j < 16; j++) 327 nhv6 [ j ] = lib_nd_rou_b [ i ].nhipv6[j]; 332 i( NDIPV6_DEBUG ) 333 `tf ("Noh match\n"); 334 dthags = 0; 335 dthags1 = 0; 337 i( NDIPV6_DEBUG ) 338 `tf ("NNH - i0x%x,܈%u\n", v6 [0], * pt ); 339 lib_nd_no_nh_found ++; 340 } } 343  $g_de_mac_addr_pt (cڡ ut32_t addr , 344 ut32_t * phy_pt ,  h_addr * hw_addr ) 346 lib_p_g_mac_q ++; 347 ut32_t nh = 0; 349 nh = `g_nh ( addr , phy_pt ); 350 i( nh == 0) { 351 i( ARPICMP_DEBUG ) 352 `tf ("ARPICMPoh found for ip %x,ort %d\n", 353 addr , * phy_pt ); 355  NH_NOT_FOUND ; 358  p_y_da * t_p_da = NULL ; 359  p_key_v4 tmp_p_key ; 360 tmp_p_key . pt_id = * phy_pt ; 361 tmp_p_key . = nh ; 363 i( ARPICMP_DEBUG ) 364 `tf ("%s:h: %x,hypt: %d\n", __FUNCTION__ , nh , 365 * phy_pt ); 367 t_p_da = `ve_p_y ( tmp_p_key ); 368 i( t_p_da = NULL ) { 369 i( ARPICMP_DEBUG ) { 370 tf 372 addr , * phy_pt ); 373 `t_p_b (); 375 i( nh != 0) { 376 i( ARPICMP_DEBUG ) 377 `tf ("CG-NAPTequesting ARP for ip %x, " 378 "p܈%d\n", nh , * phy_pt ); 379 `que_p (* phy_pt , nh ); 382 lib_p_no_p_y_found ++; 383  ARP_NOT_FOUND ; 385 `h_addr_cy (& t_p_da -> h_addr , hw_addr ); 386 lib_p_p_y_found ++; 387 i( ARPICMP_DEBUG ) 388 `tf ("%s: ARPICMP hwaddfound\n", __FUNCTION__ ); 389  ARP_FOUND ; 390 } } 392  $g_de_mac_addss (cڡ ut32_t addr , ut32_* phy_pt , 393  h_addr * hw_addr , ut32_t * nh ) 395 lib_p_g_mac_q ++; 397 * nh = `g_nh ( addr , phy_pt ); 398 i(* nh == 0) { 399 i( ARPICMP_DEBUG && addr ) 400 `RTE_LOG ( INFO , LIBARP , 402 addr , * phy_pt ); 406  p_y_da * t_p_da = NULL ; 407  p_key_v4 tmp_p_key ; 408 tmp_p_key . pt_id = * phy_pt ; 409 tmp_p_key . = * nh ; 411 t_p_da = `ve_p_y ( tmp_p_key ); 412 i( t_p_da = NULL ) { 413 i( ARPICMP_DEBUG && addr ) { 414 `RTE_LOG ( INFO , LIBARP , 416 addr , * phy_pt ); 417 `t_p_b (); 419 lib_p_no_p_y_found ++; 422 `h_addr_cy (& t_p_da -> h_addr , hw_addr ); 423 lib_p_p_y_found ++; 426 } } 428  $g_de_mac_addr (cڡ ut32_t addr , 429 ut32_t * phy_pt ,  h_addr * hw_addr ) 431 lib_p_g_mac_q ++; 432 ut32_t nh = 0; 434 nh = `g_nh ( addr , phy_pt ); 435 i( nh == 0) { 436 i( ARPICMP_DEBUG && addr ) 437 `RTE_LOG ( INFO , LIBARP , 439 addr , * phy_pt ); 443  p_y_da * t_p_da = NULL ; 444  p_key_v4 tmp_p_key ; 445 tmp_p_key . pt_id = * phy_pt ; 446 tmp_p_key . = nh ; 448 t_p_da = `ve_p_y ( tmp_p_key ); 449 i( t_p_da = NULL ) { 450 i( ARPICMP_DEBUG && addr ) { 451 tf 453 addr , * phy_pt ); 454 `t_p_b (); 457 i( nh != 0) { 458 i( ARPICMP_DEBUG > 4) 459 tf 461 nh , * phy_pt ); 462 i( `ifm_chk_pt_v4_abd (* phy_pt )) { 463 `que_p (* phy_pt , nh ); 465 i( ARPICMP_DEBUG ) 466 `RTE_LOG ( INFO , LIBARP , 468 __FUNCTION__ , * phy_pt ); 472 lib_p_no_p_y_found ++; 475 `h_addr_cy (& t_p_da -> h_addr , hw_addr ); 476 lib_p_p_y_found ++; 478 } } 480  $g_de_mac_addss_v6_pt ( ut8_t v6addr [], ut32_t * phy_pt , 481  h_addr * hw_addr , ut8_t nhv6 []) 483  i = 0, j = 0, ag = 0; 484 lib_nd_g_mac_q ++; 486 `g_nh_v6 ( v6addr , phy_pt , nhv6 ); 487  j = 0; j < 16; j++) { 488 i( nhv6 [ j ]) 489 ag ++; 491 i( ag == 0) { 492 i( NDIPV6_DEBUG ) 493 `tf ("NDIPV6oh found for ipv6 " 496 v6addr [0], ipv6addr[1], ipv6addr[2], 497 v6addr [3], ipv6addr[4], ipv6addr[5], 498 v6addr [6], ipv6addr[7], ipv6addr[8], 499 v6addr [9], ipv6addr[10], ipv6addr[11], 500 v6addr [12], ipv6addr[13], ipv6addr[14], 501 v6addr [15], * phy_pt ); 505  nd_y_da * t_nd_da = NULL ; 506  nd_key_v6 tmp_nd_key ; 507 tmp_nd_key . pt_id = * phy_pt ; 509  i = 0; i < 16; i++) 510 tmp_nd_key . v6 [ i ] = nhv6 [i]; 512 t_nd_da = `ve_nd_y ( tmp_nd_key ); 513 i( t_nd_da = NULL ) { 514 i( NDIPV6_DEBUG ) { 515 `tf ("NDIPV6odntry found for ip %x,ort %d\n", 516 v6addr [0], * phy_pt ); 518 lib_nd_no_p_y_found ++; 521 `h_addr_cy (& t_nd_da -> h_addr , hw_addr ); 522 lib_nd_nd_y_found ++; 524 } } 526  $g_de_mac_addss_v6 ( ut8_t v6addr [], ut32_t * phy_pt , 527  h_addr * hw_addr , ut8_t nhv6 []) 529  i = 0, j = 0, ag = 0; 530 lib_nd_g_mac_q ++; 532 `g_nh_v6 ( v6addr , phy_pt , nhv6 ); 533  j = 0; j < 16; j++) { 534 i( nhv6 [ j ]) { 535 ag ++; 538 i( ag == 0) { 539 i( NDIPV6_DEBUG && v6addr ) 540 `RTE_LOG ( INFO , LIBARP , 542 v6addr [0], * phy_pt ); 546  nd_y_da * t_nd_da = NULL ; 547  nd_key_v6 tmp_nd_key ; 548 tmp_nd_key . pt_id = * phy_pt ; 550  i = 0; i < 16; i++) { 551 tmp_nd_key . v6 [ i ] = nhv6 [i]; 554 t_nd_da = `ve_nd_y ( tmp_nd_key ); 555 i( t_nd_da = NULL ) { 556 i( NDIPV6_DEBUG && v6addr ) { 557 `RTE_LOG ( INFO , LIBARP , 559 v6addr [0], * phy_pt ); 561 i( ag != 0) { 562 i( ARPICMP_DEBUG > 4) 563 tf 565 * phy_pt ); 566 `que_nd (& nhv6 [0], `ifm_g_pt (* phy_pt )); 570 lib_nd_no_p_y_found ++; 573 `h_addr_cy (& t_nd_da -> h_addr , hw_addr ); 574 lib_nd_nd_y_found ++; 576 } } 582  slib_p_p_b_y { 583  e_pe_b_y mhd ; 584 ut64_t mmaddr ; 587 cڡ * $p__me ( ut16_t p_ ) 589  `CHECK_ENDIAN_16 ( p_ )) { 590 ( ARP_OP_REQUEST ): 592 ( ARP_OP_REPLY ): 594 ( ARP_OP_REVREQUEST ): 596 ( ARP_OP_REVREPLY ): 598 ( ARP_OP_INVREQUEST ): 600 ( ARP_OP_INVREPLY ): 606 } } 608  $t_icmp_ck ( icmp_hdr * icmp_h ) 610 `RTE_LOG ( INFO , LIBARP , " ICMP:ype=%d (%s) code=%d id=%d seqnum=%d\n", 611 icmp_h -> icmp_ty , 612 ( icmp_h -> icmp_ty = IP_ICMP_ECHO_REPLY ? "Reply" : 613 ( icmp_h -> icmp_ty == 614 IP_ICMP_ECHO_REQUEST ? "Reqest" : "Undef")), 615 icmp_h -> icmp_code , `CHECK_ENDIAN_16 (icmp_h-> icmp_idt ), 616 `CHECK_ENDIAN_16 ( icmp_h -> icmp_q_nb )); 617 } } 619  $t_v4_h ( v4_hdr * _h ) 621  icmp_hdr * icmp_h = 622 ( icmp_hdr *)((*) _h + ( v4_hdr )); 623 `RTE_LOG ( INFO , LIBARP , " IPv4: Version=%d HLEN=%d Type=%d Length=%d\n", 624 ( _h -> vsi_ihl & 0xf0) >> 4, (ip_h->version_ihl & 0x0f), 625 _h -> ty_of_rvi , `e_u_to_be_16 (_h-> tٮ_ngth )); 626 i( _h -> xt_o_id = IPPROTO_ICMP ) { 627 `t_icmp_ck ( icmp_h ); 629 } } 631  $t_p_ck ( p_hdr * p_h ) 633 `RTE_LOG ( INFO , LIBARP , " ARP: hrd=%droto=0x%04x hln=%d " 635 `CHECK_ENDIAN_16 ( p_h -> p_hrd ), 636 `CHECK_ENDIAN_16 ( p_h -> p_o ),_h-> p_h , 637 p_h -> p_n , `CHECK_ENDIAN_16 ׽_h-> p_ ), 638 `p__me ( p_h -> p_ )); 640 i( `CHECK_ENDIAN_16 ( p_h -> p_hrd ! ARP_HRD_ETHER ) { 641 `RTE_LOG ( INFO , LIBARP , 643 ( p_h -> p_hrd )); 644 } i( `CHECK_ENDIAN_16 ( p_h -> p_o ! ETHER_TYPE_IPv4 ) { 645 `RTE_LOG ( INFO , LIBARP , 647 ( p_h -> p_o )); 648 } i( p_h -> p_h != 6) { 649 `RTE_LOG ( INFO , LIBARP , 651 p_h -> p_h ); 652 } i( p_h -> p_n != 4) { 653 `RTE_LOG ( INFO , LIBARP , 655 p_h -> p_n ); 657 `RTE_LOG ( INFO , LIBARP , 659 p_h -> p_da . p_sha . addr_bys [0], 660 p_h -> p_da . p_sha . addr_bys [1], 661 p_h -> p_da . p_sha . addr_bys [2], 662 p_h -> p_da . p_sha . addr_bys [3], 663 p_h -> p_da . p_sha . addr_bys [4], 664 p_h -> p_da . p_sha . addr_bys [5]); 665 `RTE_LOG ( INFO , LIBARP , " sip=%d.%d.%d.%d\n", 666 ( `CHECK_ENDIAN_32 ( p_h -> p_da . p_s ) >> 24) & 0xFF, 667 ( `CHECK_ENDIAN_32 ( p_h -> p_da . p_s ) >> 16) & 0xFF, 668 ( `CHECK_ENDIAN_32 ( p_h -> p_da . p_s ) >> 8) & 0xFF, 669 `CHECK_ENDIAN_32 ( p_h -> p_da . p_s ) & 0xFF); 670 `RTE_LOG ( INFO , LIBARP , 672 p_h -> p_da . p_tha . addr_bys [0], 673 p_h -> p_da . p_tha . addr_bys [1], 674 p_h -> p_da . p_tha . addr_bys [2], 675 p_h -> p_da . p_tha . addr_bys [3], 676 p_h -> p_da . p_tha . addr_bys [4], 677 p_h -> p_da . p_tha . addr_bys [5]); 678 `RTE_LOG ( INFO , LIBARP , "ip=%d.%d.%d.%d\n", 679 ( `CHECK_ENDIAN_32 ( p_h -> p_da . p_t ) >> 24) & 0xFF, 680 ( `CHECK_ENDIAN_32 ( p_h -> p_da . p_t ) >> 16) & 0xFF, 681 ( `CHECK_ENDIAN_32 ( p_h -> p_da . p_t ) >> 8) & 0xFF, 682 `CHECK_ENDIAN_32 ( p_h -> p_da . p_t ) & 0xFF); 684 } } 686  $t_h ( h_hdr * h_h ) 688 `RTE_LOG ( INFO , LIBARP , " ETH: src=%02X:%02X:%02X:%02X:%02X:%02X", 689 h_h -> s_addr . addr_bys [0], 690 h_h -> s_addr . addr_bys [1], 691 h_h -> s_addr . addr_bys [2], 692 h_h -> s_addr . addr_bys [3], 693 h_h -> s_addr . addr_bys [4],th_h->s_addr.addr_bytes[5]); 694 `RTE_LOG ( INFO , LIBARP , " dst=%02X:%02X:%02X:%02X:%02X:%02X\n", 695 h_h -> d_addr . addr_bys [0], 696 h_h -> d_addr . addr_bys [1], 697 h_h -> d_addr . addr_bys [2], 698 h_h -> d_addr . addr_bys [3], 699 h_h -> d_addr . addr_bys [4],th_h->d_addr.addr_bytes[5]); 701 } } 704 $t_mbuf (cڡ * rx_tx , ut8_t ptid ,  e_mbuf * mbuf , 705  le ) 707  h_hdr * h_h = `e_pktmbuf_mtod ( mbuf , ether_hdr *); 708  p_hdr * p_h = 709 ( p_hdr *)((*) h_h + ( h_hdr )); 710  v4_hdr * v4_h = 711 ( v4_hdr *)((*) h_h + ( h_hdr )); 713 `RTE_LOG ( INFO , LIBARP , "%s(%d): onort %dkt-len=%ub-segs=%u\n", 714 rx_tx , le , ptid , mbuf -> pkt_n , mbuf-> nb_gs ); 715 `t_h ( h_h ); 716  `e_u_to_be_16 ( h_h -> h_ty )) { 717  ETHER_TYPE_IPv4 : 718 `t_v4_h ( v4_h ); 720  ETHER_TYPE_ARP : 721 `t_p_ck ( p_h ); 724 `RTE_LOG ( INFO , LIBARP , " unknownacketype\n"); 727 `fush ( dout ); 728 } } 730  p_y_da * $ve_p_y ( p_key_v4 p_key ) 732  p_y_da * t_p_da = NULL ; 733 p_key . fr1 = 0; 734 p_key . fr2 = 0; 735 p_key . fr3 = 0; 737  t = `e_hash_lookup_da ( p_hash_hd , & p_key , 738 (**)& t_p_da ); 739 i( t < 0) { 743 i( t_p_da -> mode = DYNAMIC_ARP ) { 744  p_tim_key back_key ; 745 back_key . pt_id = t_p_da -> pt ; 746 back_key . = t_p_da ->ip; 748 i( `e_tim_t ( t_p_da -> tim , 749 ( p_timeout * `e_g_tsc_hz ()), 750 SINGLE , tim_lce , 751 p_tim_back , 752 & back_key ) < 0) 753 i( ARPICMP_DEBUG ) 754 `RTE_LOG ( INFO , LIBARP , 758  t_p_da ; 761  NULL ; 762 } } 764  nd_y_da * $ve_nd_y ( nd_key_v6 nd_key ) 766  nd_y_da * t_nd_da = NULL ; 767 nd_key . fr1 = 0; 768 nd_key . fr2 = 0; 769 nd_key . fr3 = 0; 770  i = 0; 773  t = `e_hash_lookup_da ( nd_hash_hd , & nd_key , 774 (**)& t_nd_da ); 775 i( t < 0) { 779 i( t_nd_da -> mode = DYNAMIC_ND ) { 780  nd_tim_key back_key ; 781 back_key . pt_id = t_nd_da -> pt ; 783  i = 0; i < ND_IPV6_ADDR_SIZE ; i++) { 784 back_key . v6 [ i ] = t_nd_da ->ipv6[i]; 788 i( e_tim_t 789 ( t_nd_da -> tim , 790 ( p_timeout * `e_g_tsc_hz ()), SINGLE , 791 tim_lce , nd_tim_back , & back_key ) < 0) 792 i( ARPICMP_DEBUG ) 793 `RTE_LOG ( INFO , LIBARP , 796  t_nd_da ; 799  NULL ; 800 } } 802  $t_p_b () 804 cڡ * xt_key ; 805 * xt_da ; 806 ut32_t = 0; 808 tf 810 tf 812 `tf ("\tport hwddr status ipddr\n"); 813 tf 816  `e_hash_e ( p_hash_hd , & xt_key , & xt_da , & ) 819  p_y_da * tmp_p_da = 820 ( p_y_da *) xt_da ; 821  p_key_v4 tmp_p_key ; 822 `memy (& tmp_p_key , xt_key , ( p_key_v4 )); 823 tf 825 tmp_p_da -> pt ,mp_p_da-> h_addr . addr_bys [0], 826 tmp_p_da -> h_addr . addr_bys [1], 827 tmp_p_da -> h_addr . addr_bys [2], 828 tmp_p_da -> h_addr . addr_bys [3], 829 tmp_p_da -> h_addr . addr_bys [4], 830 tmp_p_da -> h_addr . addr_bys [5], 831 tmp_p_da -> us == 832 COMPLETE ? "COMPLETE" : "INCOMPLETE", 833 ( tmp_p_da -> >> 24), 834 (( tmp_p_da -> & 0x00ff0000) >> 16), 835 (( tmp_p_da -> & 0x0000ff00) >> 8), 836 (( tmp_p_da -> & 0x000000ff))); 839 ut32_t i = 0; 840 `tf ("\nARPoutgab ha%drs\n", p_rou_tbl_dex ); 841 `tf ("\nIP_Address Mask Port NH_IP_Address\n"); 842  i = 0; i < p_rou_tbl_dex ; i++) { 843 `tf ("0x%x 0x%x %d 0x%x\n", 844 lib_p_rou_b [ i ]. , 845 lib_p_rou_b [ i ]. mask , 846 lib_p_rou_b [ i ]. pt ,ib_p_rou_b[i]. nh ); 849 tf 851 lib_p_g_mac_q , lib_p_nh_found , lib_p_no_nh_found , 852 lib_p_p_y_found , lib_p_no_p_y_found , 853 lib_p_puϋ_ed , lib_p_de_ed , 854 lib_p_dui_found ); 856 `tf ("ARPab key i%lu\n", ( p_key_v4 )); 857 } } 860  $t_nd_b () 862 cڡ * xt_key ; 863 * xt_da ; 864 ut32_t = 0; 865 ut8_t ii = 0, j = 0, k = 0; 866 tf 868 `tf ("\tport hwddr status ipddr\n"); 870 tf 872  `e_hash_e ( nd_hash_hd , & xt_key , & xt_da , & ) >= 875  nd_y_da * tmp_nd_da = 876 ( nd_y_da *) xt_da ; 877  nd_key_v6 tmp_nd_key ; 878 `memy (& tmp_nd_key , xt_key , ( nd_key_v6 )); 879 `tf ("\t%4d %02X:%02X:%02X:%02X:%02X:%02X %10s\n", 880 tmp_nd_da -> pt , 881 tmp_nd_da -> h_addr . addr_bys [0], 882 tmp_nd_da -> h_addr . addr_bys [1], 883 tmp_nd_da -> h_addr . addr_bys [2], 884 tmp_nd_da -> h_addr . addr_bys [3], 885 tmp_nd_da -> h_addr . addr_bys [4], 886 tmp_nd_da -> h_addr . addr_bys [5], 887 tmp_nd_da -> us == 888 COMPLETE ? "COMPLETE" : "INCOMPLETE"); 889 `tf ("\t\t\t\t\t\t"); 890  ii = 0; i< ND_IPV6_ADDR_SIZE ; ii += 2) { 891 `tf ("%02X%02X ", tmp_nd_da -> v6 [ ii ], 892 tmp_nd_da -> v6 [ ii + 1]); 894 `tf ("\n"); 897 ut32_t i = 0; 898 `tf ("\n\nND IPV6outingable has %dntries\n", 899 nd_rou_tbl_dex ); 900 tf 902  i = 0; i < nd_rou_tbl_dex ; i++) { 903 `tf ("\n"); 905  j = 0; j < ND_IPV6_ADDR_SIZE ; j += 2) { 906 `RTE_LOG ( INFO , LIBARP , "%02X%02X ", 907 lib_nd_rou_b [ i ]. v6 [ j ], 908 lib_nd_rou_b [ i ]. v6 [ j + 1]); 911 tf 913 lib_nd_rou_b [ i ]. dth ,ib_nd_rou_b[i]. pt ); 914 `tf ("\t\t\t\t\t\t\t\t\t"); 915  k = 0; k < ND_IPV6_ADDR_SIZE ; k += 2) { 916 `tf ("%02X%02X ", lib_nd_rou_b [ i ]. nhv6 [ k ], 917 lib_nd_rou_b [ i ]. v6 [ k + 1]); 920 tf 922 lib_nd_g_mac_q , lib_nd_nh_found , lib_nd_no_nh_found , 923 lib_nd_nd_y_found , lib_nd_no_p_y_found , 924 lib_nd_puϋ_ed , lib_nd_de_ed , 925 lib_nd_dui_found ); 926 `tf ("NDab key i%lu\n\n", ( nd_key_v6 )); 927 } } 929  $move_p_y ( ut32_t addr , ut8_t ptid , * g ) 932  p_key_v4 p_key ; 933 p_key . pt_id = ptid ; 934 p_key . = addr ; 935 p_key . fr1 = 0; 936 p_key . fr2 = 0; 937 p_key . fr3 = 0; 939 lib_p_de_ed ++; 941  p_y_da * t_p_da = NULL ; 943  t = `e_hash_lookup_da ( p_hash_hd , & p_key , 944 (**)& t_p_da ); 945 i( t < 0) { 949 i( t_p_da -> mode = DYNAMIC_ARP ) { 950 i( t_p_da -> y_cou == 3) { 951 `e_tim_ ( t_p_da -> tim ); 952 `e_ ( t_p_da -> tim_key ); 953 i( ARPICMP_DEBUG ) { 954 `RTE_LOG ( INFO , LIBARP , 956 ( p_key . >> 24), 957 (( p_key . & 0x00ff0000) >> 959 (( p_key . & 0x0000ff00) >> 961 (( p_key . & 0x000000ff)), 962 p_key . pt_id ); 964 `e_hash_d_key ( p_hash_hd , & p_key ); 967 t_p_da -> y_cou ++; 968 i( ARPICMP_DEBUG ) 969 `RTE_LOG ( INFO , LIBARP , 971 t_p_da -> y_cou ); 973 i( ARPICMP_DEBUG ) 974 `RTE_LOG ( INFO , LIBARP , 976 ARP_TIMER_EXPIRY ); 977 i( ifm_chk_pt_v4_abd 978 ( t_p_da -> pt )) { 979 `que_p ( t_p_da -> pt , 980 t_p_da -> ); 982 i( ARPICMP_DEBUG ) 983 `RTE_LOG ( INFO , LIBARP , 985 __FUNCTION__ , 986 t_p_da -> pt ); 988 i( `e_tim_t ( t_p_da -> tim , 989 ( p_timeout * 990 `e_g_tsc_hz ()), SINGLE , 991 tim_lce , 992 p_tim_back , 993 g ) < 0) 994 i( ARPICMP_DEBUG ) 995 `RTE_LOG ( INFO , LIBARP , 1000 `e_hash_d_key ( p_hash_hd , & p_key ); 1003 } } 1006  $move_nd_y_v6 ( ut8_t v6addr [], ut8_ ptid ) 1008  i = 0; 1009  nd_y_da * t_nd_da = NULL ; 1010  nd_key_v6 nd_key ; 1011 nd_key . pt_id = ptid ; 1013  i = 0; i < ND_IPV6_ADDR_SIZE ; i++) { 1014 nd_key . v6 [ i ] = v6addr [i]; 1017 nd_key . fr1 = 0; 1018 nd_key . fr2 = 0; 1019 nd_key . fr3 = 0; 1021 lib_nd_de_ed ++; 1023 i( NDIPV6_DEBUG ) { 1024 `RTE_LOG ( INFO , LIBARP , 1026 nd_key . pt_id ); 1027  i = 0; i < ND_IPV6_ADDR_SIZE ; i += 2) { 1028 `RTE_LOG ( INFO , LIBARP , "%02X%02X ", nd_key . v6 [ i ], 1029 nd_key . v6 [ i + 1]); 1032  nd_tim_key back_key ; 1033 back_key . pt_id = ptid ; 1035  i = 0; i < ND_IPV6_ADDR_SIZE ; i++) { 1036 back_key . v6 [ i ] = v6addr [i]; 1039  t = `e_hash_lookup_da ( p_hash_hd , & back_key , 1040 (**)& t_nd_da ); 1041 i( t < 0) { 1044 i( t_nd_da -> mode = DYNAMIC_ND ) { 1045 `e_tim_ ( t_nd_da -> tim ); 1046 `e_ ( t_nd_da -> tim ); 1049 `e_hash_d_key ( nd_hash_hd , & nd_key ); 1050 } } 1053 $puϋ_p_y (cڡ  h_addr * hw_addr , ut32_t addr , 1054 ut8_t ptid , ut8_ mode ) 1056  p_key_v4 p_key ; 1057 p_key . pt_id = ptid ; 1058 p_key . = addr ; 1059 p_key . fr1 = 0; 1060 p_key . fr2 = 0; 1061 p_key . fr3 = 0; 1063 lib_p_puϋ_ed ++; 1065 i( ARPICMP_DEBUG ) 1066 `RTE_LOG ( INFO , LIBARP , "populate_arp_entry ip %x,ort %d\n", 1067 p_key . ,_key. pt_id ); 1069  p_y_da * w_p_da = `ve_p_y ( p_key ); 1070 i( w_p_da && (ew_p_da-> mode = STATIC_ARP 1071 && mode = DYNAMIC_ARP || ( w_p_da ->mode == DYNAMIC_ARP 1072 && mode = STATIC_ARP ))) { 1073 i( ARPICMP_DEBUG ) 1074 `RTE_LOG ( INFO , LIBARP ,"populate_arp_entry: ARPntrylreadyxists(%d %d)\n", 1075 w_p_da -> mode , mode); 1080 i( mode = DYNAMIC_ARP ) { 1081 i( w_p_da 1082 && `is_me_h_addr (& w_p_da -> h_addr , hw_addr )) { 1083 i( ARPICMP_DEBUG ) { 1084 `RTE_LOG ( INFO , LIBARP , 1086 ( p_key . >> 24), 1087 (( p_key . & 0x00ff0000) >> 16), 1088 (( p_key . & 0x0000ff00) >> 8), 1089 (( p_key . & 0x000000ff)), 1090 p_key . pt_id ); 1092 lib_p_dui_found ++; 1093 w_p_da -> y_cou = 0; 1094 i( `e_tim_t ( w_p_da -> tim , 1095 ( p_timeout * `e_g_tsc_hz ()), 1096 SINGLE , tim_lce , 1097 p_tim_back , 1098 w_p_da -> tim_key ) < 0) 1099 i( ARPICMP_DEBUG ) 1100 `RTE_LOG ( INFO , LIBARP , 1105 ut32_t size = 1106 `RTE_CACHE_LINE_ROUNDUP (( p_y_da )); 1107 w_p_da = `e_zmloc ( NULL , size , RTE_CACHE_LINE_SIZE ); 1108 w_p_da -> h_addr = * hw_addr ; 1109 w_p_da -> us = COMPLETE ; 1110 w_p_da -> pt = ptid ; 1111 w_p_da -> = addr ; 1112 w_p_da -> mode = mode; 1113 i( e_mempo_g 1114 ( tim_mempo_p , (**)&( w_p_da -> tim )) < 0) { 1115 `RTE_LOG ( INFO , LIBARP , 1120 `e_hash_add_key_da ( p_hash_hd , & p_key , w_p_da ); 1121 i( ARPICMP_DEBUG ) { 1122 `RTE_LOG ( INFO , LIBARP , 1124 ( p_key . >> 24), 1125 (( p_key . & 0x00ff0000) >> 16), 1126 (( p_key . & 0x0000ff00) >> 8), 1127 (( p_key . & 0x000000ff)),_key. pt_id ); 1130 `sve_l2_adj ( addr , ptid , hw_addr ); 1132 `e_tim_ ( w_p_da -> tim ); 1133  p_tim_key * back_key = 1134 ( p_tim_key *) `e_mloc ( NULL , 1136 p_tim_key *), 1137 RTE_CACHE_LINE_SIZE ); 1138 back_key -> pt_id = ptid ; 1139 back_key -> = addr ; 1141 i( ARPICMP_DEBUG ) 1142 `RTE_LOG ( INFO , LIBARP , "TIMER STARTED FOR %u seconds\n", 1143 ARP_TIMER_EXPIRY ); 1144 i( e_tim_t 1145 ( w_p_da -> tim , ( p_timeout * `e_g_tsc_hz ()), 1146 SINGLE , tim_lce , p_tim_back , back_key ) < 0) 1147 i( ARPICMP_DEBUG ) 1148 `RTE_LOG ( INFO , LIBARP , 1151 w_p_da -> tim_key = back_key ; 1153 i( w_p_da 1154 && `is_me_h_addr (& w_p_da -> h_addr , hw_addr )) { 1155 i( ARPICMP_DEBUG ) { 1156 `RTE_LOG ( INFO , LIBARP , 1158 ( p_key . >> 24), 1159 (( p_key . & 0x00ff0000) >> 16), 1160 (( p_key . & 0x0000ff00) >> 8), 1161 (( p_key . & 0x000000ff)), 1162 p_key . pt_id ); 1164 lib_p_dui_found ++; 1166 ut32_t size = 1167 `RTE_CACHE_LINE_ROUNDUP ( 1168 ( p_y_da )); 1169 w_p_da = 1170 `e_zmloc ( NULL , size , RTE_CACHE_LINE_SIZE ); 1171 w_p_da -> h_addr = * hw_addr ; 1172 w_p_da -> us = COMPLETE ; 1173 w_p_da -> pt = ptid ; 1174 w_p_da -> = addr ; 1175 w_p_da -> mode = mode; 1177 `e_hash_add_key_da ( p_hash_hd , & p_key , 1178 w_p_da ); 1179 i( ARPICMP_DEBUG ) { 1180 `RTE_LOG ( INFO , LIBARP , 1182 ( p_key . >> 24), 1183 (( p_key . & 0x00ff0000) >> 16), 1184 (( p_key . & 0x0000ff00) >> 8), 1185 (( p_key . & 0x000000ff)), 1186 p_key . pt_id ); 1189 `sve_l2_adj ( addr , ptid , hw_addr ); 1192 i( ARPICMP_DEBUG ) { 1194 `RTE_LOG ( INFO , LIBARP , 1196 w_p_da -> h_addr . addr_bys [0], 1197 w_p_da -> h_addr . addr_bys [1], 1198 w_p_da -> h_addr . addr_bys [2], 1199 w_p_da -> h_addr . addr_bys [3], 1200 w_p_da -> h_addr . addr_bys [4], 1201 w_p_da -> h_addr . addr_bys [5], 1202 ( p_key . >> 24), ((arp_key.ip & 0x00ff0000) >> 16), 1203 (( p_key . & 0x0000ff00) >> 8), 1204 (( p_key . & 0x000000ff)), ptid ); 1205 `puts (""); 1207 } } 1216  $puϋ_nd_y (cڡ  h_addr * hw_addr , ut8_t v6 [], 1217 ut8_t ptid , ut8_ mode ) 1222 ut8_t i ; 1223  nd_key_v6 nd_key ; 1224 nd_key . pt_id = ptid ; 1226  i = 0; i < ND_IPV6_ADDR_SIZE ; i++) 1227 nd_key . v6 [ i ] = ipv6[i]; 1230 nd_key . fr1 = 0; 1231 nd_key . fr2 = 0; 1232 nd_key . fr3 = 0; 1234 lib_nd_puϋ_ed ++; 1237  nd_y_da * w_nd_da = `ve_nd_y ( nd_key ); 1239 i( mode = DYNAMIC_ND ) { 1240 i( w_nd_da 1241 && `is_me_h_addr (& w_nd_da -> h_addr , hw_addr )) { 1243 i( NDIPV6_DEBUG ) { 1244 `RTE_LOG ( INFO , LIBARP , 1246 nd_key . pt_id ); 1247  i = 0; i < ND_IPV6_ADDR_SIZE ; i += 2) { 1249 `RTE_LOG ( INFO , LIBARP , "%02X%02X ", 1250 nd_key . v6 [ i ], 1251 nd_key . v6 [ i + 1]); 1255 lib_nd_dui_found ++; 1256 `RTE_LOG ( INFO , LIBARP , "nd_entryxists\n"); 1259 ut32_t size = 1260 `RTE_CACHE_LINE_ROUNDUP (( nd_y_da )); 1261 w_nd_da = `e_zmloc ( NULL , size , RTE_CACHE_LINE_SIZE ); 1264 w_nd_da -> h_addr = * hw_addr ; 1265 w_nd_da -> us = COMPLETE ; 1266 w_nd_da -> pt = ptid ; 1267 w_nd_da -> mode = mode; 1268 i( e_mempo_g 1269 ( tim_mempo_p , (**)&( w_nd_da -> tim )) < 0) { 1270 `RTE_LOG ( INFO , LIBARP , 1275 i( NDIPV6_DEBUG ) 1276 `RTE_LOG ( INFO , LIBARP , "populate_nd_entry ipv6="); 1278  i = 0; i < ND_IPV6_ADDR_SIZE ; i++) { 1279 w_nd_da -> v6 [ i ] = ipv6[i]; 1282 i( NDIPV6_DEBUG ) { 1283  i = 0; i < ND_IPV6_ADDR_SIZE ; i += 2) { 1285 `RTE_LOG ( INFO , LIBARP , "%02X%02X ", 1286 w_nd_da -> v6 [ i ], 1287 w_nd_da -> v6 [ i + 1]); 1292 `e_hash_add_key_da ( nd_hash_hd , & nd_key , w_nd_da ); 1296 `e_tim_ ( w_nd_da -> tim ); 1297  nd_tim_key * back_key = 1298 ( nd_tim_key *) `e_mloc ( NULL , 1299 ( nd_tim_key 1301 RTE_CACHE_LINE_SIZE ); 1302 back_key -> pt_id = ptid ; 1304  i = 0; i < ND_IPV6_ADDR_SIZE ; i++) { 1305 back_key -> v6 [ i ] = ipv6[i]; 1307 i( e_tim_t 1308 ( w_nd_da -> tim , ( p_timeout * `e_g_tsc_hz ()), 1309 SINGLE , tim_lce , nd_tim_back , back_key ) < 0) 1310 `RTE_LOG ( INFO , LIBARP , "Err : Timerlreadyunning\n"); 1312 i( w_nd_da 1313 && `is_me_h_addr (& w_nd_da -> h_addr , hw_addr )) { 1314 i( NDIPV6_DEBUG ) { 1315 `RTE_LOG ( INFO , LIBARP , 1317 nd_key . pt_id ); 1318  i = 0; i < ND_IPV6_ADDR_SIZE ; i += 2) { 1320 `RTE_LOG ( INFO , LIBARP , "%02X%02X ", 1321 nd_key . v6 [ i ], 1322 nd_key . v6 [ i + 1]); 1326 lib_nd_dui_found ++; 1328 ut32_t size = 1329 `RTE_CACHE_LINE_ROUNDUP ( 1330 ( nd_y_da )); 1331 w_nd_da = 1332 `e_zmloc ( NULL , size , RTE_CACHE_LINE_SIZE ); 1335 w_nd_da -> h_addr = * hw_addr ; 1336 w_nd_da -> us = COMPLETE ; 1337 w_nd_da -> pt = ptid ; 1338 w_nd_da -> mode = mode; 1339  i = 0; i < ND_IPV6_ADDR_SIZE ; i++) { 1340 w_nd_da -> v6 [ i ] = ipv6[i]; 1344 `e_hash_add_key_da ( nd_hash_hd , & nd_key , 1345 w_nd_da ); 1349 i( NDIPV6_DEBUG ) 1350 tf 1355 tf 1357 w_nd_da -> h_addr . addr_bys [0], 1358 w_nd_da -> h_addr . addr_bys [1], 1359 w_nd_da -> h_addr . addr_bys [2], 1360 w_nd_da -> h_addr . addr_bys [3], 1361 w_nd_da -> h_addr . addr_bys [4], 1362 w_nd_da -> h_addr . addr_bys [5], ptid ); 1363 `RTE_LOG ( INFO , LIBARP , "\tipv6="); 1364  i = 0; i < ND_IPV6_ADDR_SIZE ; i += 2) { 1365 w_nd_da -> v6 [ i ] = ipv6[i]; 1366 `RTE_LOG ( INFO , LIBARP , "%02X%02X ", w_nd_da -> v6 [ i ], 1367 w_nd_da -> v6 [ i + 1]); 1370 `RTE_LOG ( INFO , LIBARP , "\n"); 1372 `puts (""); 1374 } } 1376  $t_pkt1 ( e_mbuf * pkt ) 1378 ut8_t * rd = `RTE_MBUF_METADATA_UINT8_PTR ( pkt , 0); 1379  i = 0, j = 0; 1380 `RTE_LOG ( INFO , LIBARP , "\nPacket Contents...\n"); 1381  i = 0; i < 20; i++) { 1382  j = 0; j < 20; j++) 1383 `RTE_LOG ( INFO , LIBARP , "%02x ", rd [(20 * i + j ]); 1384 `RTE_LOG ( INFO , LIBARP , "\n"); 1386 } } 1388  h_addr gbrd_h_addr = { 1389 . addr_bys [0] = 0xFF, 1390 . gaddr_bys [1] = 0xFF, 1391 . gaddr_bys [2] = 0xFF, 1392 . gaddr_bys [3] = 0xFF, 1393 . gaddr_bys [4] = 0xFF, 1394 . gaddr_bys [5] = 0xFF, 1397 cڡ  h_addr gnu_h_addr = { 1398 . addr_bys [0] = 0x00, 1399 . gaddr_bys [1] = 0x00, 1400 . gaddr_bys [2] = 0x00, 1401 . gaddr_bys [3] = 0x00, 1402 . gaddr_bys [4] = 0x00, 1403 . gaddr_bys [5] = 0x00, 1406  #MAX_NUM_MAC_ADDRESS 16 ) 1407  h_addr glk_hw_addr [ MAX_NUM_MAC_ADDRESS ] = { 1408 {. addr_bys = {0x90, 0xe2, 0xba, 0x54, 0x67, 0xc8} }, 1409 {. gaddr_bys = {0x90, 0xe2, 0xba, 0x54, 0x67, 0xc9} }, 1410 {. gaddr_bys = {0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11} }, 1411 {. gaddr_bys = {0x12, 0x13, 0x14, 0x15, 0x16, 0x17} }, 1412 {. gaddr_bys = {0x22, 0x33, 0x44, 0x55, 0x66, 0x77} }, 1413 {. gaddr_bys = {0x12, 0x13, 0x14, 0x15, 0x16, 0x17} }, 1414 {. gaddr_bys = {0x22, 0x33, 0x44, 0x55, 0x66, 0x77} }, 1415 {. gaddr_bys = {0x90, 0xe2, 0xba, 0x54, 0x67, 0xc9} }, 1416 {. gaddr_bys = {0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11} }, 1417 {. gaddr_bys = {0x12, 0x13, 0x14, 0x15, 0x16, 0x17} }, 1418 {. gaddr_bys = {0x22, 0x33, 0x44, 0x55, 0x66, 0x77} }, 1419 {. gaddr_bys = {0x12, 0x13, 0x14, 0x15, 0x16, 0x17} }, 1420 {. gaddr_bys = {0x22, 0x33, 0x44, 0x55, 0x66, 0x77} }, 1421 {. gaddr_bys = {0x12, 0x13, 0x14, 0x15, 0x16, 0x17} }, 1422 {. gaddr_bys = {0x22, 0x33, 0x44, 0x55, 0x66, 0x77} }, 1423 {. gaddr_bys = {0x18, 0x19, 0x1a, 0x1b, 0xcd, 0xef} } 1426  h_addr * $g_lk_hw_addr ( ut8_t out_pt ) 1428  & lk_hw_addr [ out_pt ]; 1429 } } 1431  $que_p ( ut8_t pt_id , ut32_t ) 1434  h_hdr * h_h ; 1435  p_hdr * p_h ; 1437 l2_phy_r_t * lk ; 1438 lk = `ifm_g_pt ( pt_id ); 1439  e_mbuf * p_pkt = lib_p_pkt ; 1441 i( p_pkt = NULL ) { 1442 i( ARPICMP_DEBUG ) 1443 `RTE_LOG ( INFO , LIBARP , 1448 h_h = `e_pktmbuf_mtod ( p_pkt ,  h_hdr *); 1450 `h_addr_cy (& brd_h_addr , & h_h -> d_addr ); 1451 `h_addr_cy (( h_addr *) 1452 & lk -> maddr [0], & h_h -> s_addr ); 1453 h_h -> h_ty = `CHECK_ENDIAN_16 ( ETHER_TYPE_ARP ); 1455 p_h = ( p_hdr *)((*) h_h + ( h_hdr )); 1456 p_h -> p_hrd = `CHECK_ENDIAN_16 ( ARP_HRD_ETHER ); 1457 p_h -> p_o = `CHECK_ENDIAN_16 ( ETHER_TYPE_IPv4 ); 1458 p_h -> p_h = ETHER_ADDR_LEN ; 1459 p_h -> p_n = ( ut32_t ); 1460 p_h -> p_ = `CHECK_ENDIAN_16 ( ARP_OP_REQUEST ); 1462 `h_addr_cy (( h_addr *) 1463 & lk -> maddr [0], & p_h -> p_da . p_sha ); 1464 i( lk &&k-> v4_li ) { 1465 p_h -> p_da . p_s = 1466 ((( v4li_t *( lk -> v4_li ))-> addr ); 1468 `h_addr_cy (& nu_h_addr , & p_h -> p_da . p_tha ); 1469 p_h -> p_da . p_t = `e_u_to_be_32 ( ); 1470 i( ARPICMP_DEBUG ) 1471 `RTE_LOG ( INFO , LIBARP , "arpip:%xrp sip :%x\n", 1472 p_h -> p_da . p_t ,_h->p_da. p_s ); 1474 p_pkt -> pkt_n = 42; 1475 p_pkt -> da_n = 42; 1477 i( ARPICMP_DEBUG ) { 1478 `RTE_LOG ( INFO , LIBARP , "Sendingrpequest\n"); 1479 `t_mbuf ("TX", pt_id , p_pkt , __LINE__ ); 1481 i( lk ) 1482 lk -> `sm_sg_pkt ֚k, p_pkt ); 1483 } } 1485  e_mbuf * $que_echo ( ut32_t pt_id , ut32_ ) 1487  h_hdr * h_h ; 1488  v4_hdr * _h ; 1489  icmp_hdr * icmp_h ; 1490 l2_phy_r_t * pt = `ifm_g_pt ( pt_id ); 1492  e_mbuf * icmp_pkt = lib_p_pkt ; 1493 i( icmp_pkt = NULL ) { 1494 i( ARPICMP_DEBUG ) 1495 `RTE_LOG ( INFO , LIBARP , 1497  NULL ; 1500 h_h = `e_pktmbuf_mtod ( icmp_pkt ,  h_hdr *); 1502 _h = ( v4_hdr *)((*) h_h + ( h_hdr )); 1503 icmp_h = ( icmp_hdr *)((*) _h + ( v4_hdr )); 1505 _h -> vsi_ihl = IP_VHL_DEF ; 1506 _h -> ty_of_rvi = 0; 1507 _h -> tٮ_ngth = 1508 `e_u_to_be_16 (( v4_hdr + ( icmp_hdr )); 1509 _h -> ck_id = 0xaabb; 1510 _h -> agmt_offt = 0x0000; 1511 _h -> time_to_live = 64; 1512 _h -> xt_o_id = IPPROTO_ICMP ; 1513 i( pt &&t-> v4_li ) 1514 _h -> c_addr = 1515 `e_u_to_be_32 ((( v4li_t * pt -> v4_li )-> addr ); 1516 _h -> d_addr = `e_u_to_be_32 ( ); 1518 _h -> hdr_checksum = 0; 1519 _h -> hdr_checksum = `e_v4_cksum (ip_h); 1521 icmp_h -> icmp_ty = IP_ICMP_ECHO_REQUEST ; 1522 icmp_h -> icmp_code = 0; 1523 icmp_h -> icmp_idt = 0xdead; 1524 icmp_h -> icmp_q_nb = 0xbeef; 1526 icmp_h -> icmp_cksum = ~ `e_w_cksum (icmp_h, ( icmp_hdr )); 1528 icmp_pkt -> pkt_n = 1529 ( h_hdr + ( v4_hdr ) + 1530 ( icmp_hdr ); 1531 icmp_pkt -> da_n = icmp_pkt-> pkt_n ; 1533 `t_mbuf ("TX", 0, icmp_pkt , __LINE__ ); 1535  icmp_pkt ; 1536 } } 1543  e_mbuf * $nd_icmp_de_uėchab_msg ( ut32_t c_ , 1544 ut32_t de_ ) 1546  h_hdr * h_h ; 1547  v4_hdr * _h ; 1548  icmp_hdr * icmp_h ; 1549  e_mbuf * icmp_pkt = lib_p_pkt ; 1551 i( icmp_pkt = NULL ) { 1552 i( ARPICMP_DEBUG ) 1553 `RTE_LOG ( INFO , LIBARP , 1555  NULL ; 1558 h_h = `e_pktmbuf_mtod ( icmp_pkt ,  h_hdr *); 1559 _h = ( v4_hdr *)((*) h_h + ( h_hdr )); 1560 icmp_h = ( icmp_hdr *)((*) _h + ( v4_hdr )); 1562 _h -> vsi_ihl = IP_VHL_DEF ; 1563 _h -> ty_of_rvi = 0; 1564 _h -> tٮ_ngth = 1565 `e_u_to_be_16 (( v4_hdr + ( icmp_hdr )); 1566 _h -> ck_id = 0xaabb; 1567 _h -> agmt_offt = 0x0000; 1568 _h -> time_to_live = 64; 1569 _h -> xt_o_id = 1; 1571 _h -> d_addr = `e_bsw32 ( de_ ); 1572 _h -> c_addr = `e_bsw32 ( c_ ); 1574 _h -> hdr_checksum = 0; 1575 _h -> hdr_checksum = `e_v4_cksum (ip_h); 1577 icmp_h -> icmp_ty = 3; 1578 icmp_h -> icmp_code = 13; 1580 icmp_h -> icmp_cksum = ~ `e_w_cksum (icmp_h, ( icmp_hdr )); 1582 icmp_pkt -> pkt_n = ( h_hdr + ( v4_hdr ) + 1583 ( icmp_hdr ); 1584 icmp_pkt -> da_n = icmp_pkt-> pkt_n ; 1586  icmp_pkt ; 1587 } } 1590 $oss_picmp_pkt_r ( e_mbuf ** pkt , ut16_t pkt_num , 1591 ut64_t pkt_mask , l2_phy_r_t * pt ) 1593 `RTE_SET_USED ( pkt_num ); 1594 i( ARPICMP_DEBUG ) 1595 `RTE_LOG ( INFO , LIBARP , 1597 i( pkt_mask ) { 1598 i( ARPICMP_DEBUG ) 1599 `RTE_LOG ( INFO , LIBARP , 1603 ut64_t pkts_f_oss = pkt_mask ; 1604 ; pkts_f_oss ;) { 1606 ut8_t pos = (ut8_t `__but_z ( pkts_f_oss ); 1607 ut64_t pkts_mask = 1LLU << pos ; 1608 pkts_f_oss &~ pkts_mask ; 1609 `oss_picmp_pkt ( pkt [ pos ], pt ); 1612 } } 1614  $oss_picmp_pkt ( e_mbuf * pkt , l2_phy_r_t * pt ) 1616 ut8_t _pt_id = pkt -> pt ; 1617  h_hdr * h_h ; 1618  p_hdr * p_h ; 1619  v4_hdr * _h ; 1620  icmp_hdr * icmp_h ; 1622 ut32_t cksum ; 1623 ut32_t _addr ; 1625 ut32_t q_t ; 1627 h_h = `e_pktmbuf_mtod ( pkt ,  h_hdr *); 1629 i( h_h -> h_ty = `e_u_to_be_16 ( ETHER_TYPE_ARP )) { 1630 i( ARPICMP_DEBUG ) 1631 `RTE_LOG ( INFO , LIBARP , "%s,ortid %u. Line %d\n\r", 1632 __FUNCTION__ , pt -> pmdid , __LINE__ ); 1633 p_h = 1634 ( p_hdr *)((*) h_h + 1635 ( h_hdr )); 1636 i( `CHECK_ENDIAN_16 ( p_h -> p_hrd ! ARP_HRD_ETHER ) 1637 `RTE_LOG ( INFO , LIBARP , 1639 i( `CHECK_ENDIAN_16 ( p_h -> p_o ! ETHER_TYPE_IPv4 ) 1640 `RTE_LOG ( INFO , LIBARP , 1642 i( p_h -> p_h != 6) 1643 `RTE_LOG ( INFO , LIBARP , 1645 i( p_h -> p_n != 4) 1646 `RTE_LOG ( INFO , LIBARP , 1649 i( pt -> v4_li = NULL ) { 1650 `RTE_LOG ( INFO , LIBARP , 1655 i( p_h -> p_da . p_t != 1656 (( v4li_t *( pt -> v4_li ))-> addr ) { 1657 i( p_h -> p_da . p_t =p_h->p_da. p_s ) { 1658 `puϋ_p_y ( 1659 ( h_addr *)& p_h -> p_da . p_sha , 1660 `e_u_to_be_32 ( p_h -> p_da . p_s ), 1661 _pt_id , 1662 DYNAMIC_ARP ); 1665 `RTE_LOG ( INFO , LIBARP ,"ARPequested IPddress mismatches interface IP - discarding\n"); 1670 i( p_h -> p_ == 1671 `e_u_to_be_16 ( ARP_OP_REQUEST )) { 1672 i( ARPICMP_DEBUG ) { 1673 `RTE_LOG ( INFO , LIBARP , 1675 __FUNCTION__ , pt -> pmdid , 1676 __LINE__ ); 1678 `RTE_LOG ( INFO , LIBARP , 1680 p_h -> p_ , 1681 e_u_to_be_16 1682 ( ARP_OP_REQUEST )); 1683 `t_mbuf ("RX", _pt_id , pkt , 1684 __LINE__ ); 1687 `puϋ_p_y (( h_addr *) 1688 & p_h -> p_da . p_sha , 1689 e_u_to_be_32 1690 ( p_h -> p_da . p_s ), 1691 _pt_id , DYNAMIC_ARP ); 1694 q_t = p_h -> p_da . p_t ; 1695 `h_addr_cy (& h_h -> s_addr , &h_h-> d_addr ); 1696 `h_addr_cy (( h_addr *)& pt -> maddr [0], & h_h -> s_addr ); 1697 p_h -> p_ = `e_u_to_be_16 ( ARP_OP_REPLY ); 1698 `h_addr_cy (& h_h -> s_addr , 1699 & p_h -> p_da . p_sha ); 1700 p_h -> p_da . p_t = 1701 p_h -> p_da . p_s ; 1702 p_h -> p_da . p_s = q_t ; 1703 `h_addr_cy (& h_h -> d_addr , 1704 & p_h -> p_da . p_tha ); 1706 i( ARPICMP_DEBUG ) 1707 `t_mbuf ("TX ARP REPLY PKT", 1708 pt -> pmdid , pkt , __LINE__ ); 1709 pt -> `sm_bulk_pkts t, & pkt , 1); 1710 i( ARPICMP_DEBUG ) 1711 `t_mbuf ("TX", pt -> pmdid , pkt , 1712 __LINE__ ); 1715 } i( p_h -> p_ == 1716 `e_u_to_be_16 ( ARP_OP_REPLY )) { 1717 i( ARPICMP_DEBUG ) { 1718 `RTE_LOG ( INFO , LIBARP , 1720 `t_mbuf ("RX", pt -> pmdid , pkt , 1721 __LINE__ ); 1723 `puϋ_p_y (( h_addr *) 1724 & p_h -> p_da . p_sha , 1725 `e_bsw32 ( p_h -> 1726 p_da . p_s ), 1727 _pt_id , DYNAMIC_ARP ); 1731 i( ARPICMP_DEBUG ) 1732 `RTE_LOG ( INFO , LIBARP , 1734 p_h -> p_ ); 1738 `e_pktmbuf_ ( pkt ); 1740 _h = 1741 ( v4_hdr *)((*) h_h + 1742 ( h_hdr )); 1743 icmp_h = 1744 ( icmp_hdr *)((*) _h + ( v4_hdr )); 1746 i( h_h -> h_ty = `e_u_to_be_16 ( ETHER_TYPE_IPv4 )) { 1748 i( _h -> xt_o_id ! IPPROTO_ICMP ) { 1749 i( ARPICMP_DEBUG ) { 1750 `RTE_LOG ( INFO , LIBARP , 1753 } i(( _h -> vsi_ihl & 0xf0! IP_VERSION_4 ) { 1754 i( ARPICMP_DEBUG ) { 1755 `RTE_LOG ( INFO , LIBARP , 1758 } i(( _h -> vsi_ihl & 0x0f! IP_HDRLEN ) { 1759 i( ARPICMP_DEBUG ) { 1760 `RTE_LOG ( INFO , LIBARP , 1764 i( icmp_h -> icmp_ty = IP_ICMP_ECHO_REQUEST 1765 && icmp_h -> icmp_code == 0) { 1766 i( ARPICMP_DEBUG ) 1767 `t_mbuf ("RX", _pt_id , 1768 pkt , __LINE__ ); 1770 _addr = _h -> c_addr ; 1771 `h_addr_cy (& h_h -> s_addr , 1772 & h_h -> d_addr ); 1773 `h_addr_cy (( h_addr *) 1774 & pt -> maddr [0], 1775 & h_h -> s_addr ); 1776 i( ARPICMP_DEBUG ) 1777 `RTE_LOG ( INFO , LIBARP , 1779 __FUNCTION__ , 1780 pt -> pmdid , __LINE__ ); 1782 i( is_mui_v4_addr 1783 ( _h -> d_addr )) { 1784 ut32_t _c ; 1786 _c = 1787 `e_be_to_u_32 ( _addr ); 1788 i(( _c & 0x00000003) == 1) 1789 _c = 1790 ( _c & 1794 _c = 1795 ( _c & 1798 _h -> c_addr = 1799 `e_u_to_be_32 ( _c ); 1800 _h -> d_addr = _addr ; 1802 _h -> hdr_checksum = 0; 1803 _h -> hdr_checksum = 1804 ~ `e_w_cksum ( _h , 1806 v4_hdr )); 1808 i( ARPICMP_DEBUG ) 1809 `RTE_LOG ( INFO , LIBARP , 1811 __FUNCTION__ , 1812 pt -> pmdid , 1813 __LINE__ ); 1814 _h -> c_addr = ip_h-> d_addr ; 1815 _h -> d_addr = _addr ; 1818 icmp_h -> icmp_ty = IP_ICMP_ECHO_REPLY ; 1819 cksum = ~ icmp_h -> icmp_cksum & 0xffff; 1820 cksum += 1821 ~ `hts ( IP_ICMP_ECHO_REQUEST << 8) & 1823 cksum + `hts ( IP_ICMP_ECHO_REPLY << 8); 1824 cksum = 1825 ( cksum & 0xffff) + (cksum >> 16); 1826 cksum = 1827 ( cksum & 0xffff) + (cksum >> 16); 1828 icmp_h -> icmp_cksum = ~ cksum ; 1830 i( ARPICMP_DEBUG ) 1831 t_mbuf 1833 _pt_id , pkt , __LINE__ ); 1834 pt -> `sm_bulk_pkts t, & pkt , 1); 1835 i( ARPICMP_DEBUG ) 1836 `t_mbuf ("TX", pt -> pmdid , 1837 pkt , __LINE__ ); 1840 } i( icmp_h -> icmp_ty == 1841 IP_ICMP_ECHO_REPLY 1842 && icmp_h -> icmp_code == 0) { 1843 i( ARPICMP_DEBUG ) 1844 `t_mbuf ("RX", _pt_id , 1845 pkt , __LINE__ ); 1847  p_key_v4 p_key ; 1848 p_key . pt_id = _pt_id ; 1849 p_key . = 1850 `e_bsw32 ( _h -> c_addr ); 1851 p_key . fr1 = 0; 1852 p_key . fr2 = 0; 1853 p_key . fr3 = 0; 1855  p_y_da * p_y = 1856 `ve_p_y ( p_key ); 1857 i( p_y = NULL ) { 1858 i( ARPICMP_DEBUG ) 1859 `RTE_LOG ( INFO , LIBARP , 1861 p_key . , 1862 p_key . pt_id ); 1865 p_y -> us = COMPLETE ; 1870 `e_pktmbuf_ ( pkt ); 1872 } } 1885  $my___v6 ( af , cڡ * c , * d ) 1887  af ) { 1888  AF_INET : 1889  `__v4 ( c , d ); 1890  AF_INET6 : 1891  `__v6 ( c , d ); 1893 o = EAFNOSUPPORT ; 1897 } } 1909  $__v4 (cڡ * c , * d ) 1911 cڡ  digs [] = "0123456789"; 1912  w_dig , os , ch ; 1913  tmp [ INADDRSZ ], * ; 1915 w_dig = 0; 1916 os = 0; 1917 *( = tmp ) = 0; 1918 ( ch = * c ++) != '\0') { 1919 cڡ * pch ; 1921 pch = `rchr ( digs , ch ); 1922 i( pch ! NULL ) { 1923  w = * * 10 + ( pch - digs ); 1925 i( w > 255) 1927 i(! w_dig ) { 1928 i(++ os > 4) 1930 w_dig = 1; 1932 * = () w ; 1933 } i( ch ='.' && w_dig ) { 1934 i( os == 4) 1936 *++ = 0; 1937 w_dig = 0; 1941 i( os < 4) 1944 `memy ( d , tmp , INADDRSZ ); 1946 } } 1961  $__v6 (cڡ * c , * d ) 1963 cڡ  xdigs_l [] = "0123456789abcdef", 1964 xdigs_u [] = "0123456789ABCDEF"; 1965  tmp [ IN6ADDRSZ ], * = 0, * dp = 0, * cp = 0; 1966 cڡ * xdigs = 0, * cuok = 0; 1967  ch = 0, w_xdig = 0, cou_xdig = 0; 1968  v = 0; 1969  dblo_cou = 0; 1971 `memt (( = tmp ), '\0', IN6ADDRSZ ); 1972 dp = + IN6ADDRSZ ; 1973 cp = NULL ; 1975 i(* c == ':') 1976 i(*++ c != ':') 1978 cuok = c ; 1979 w_xdig = cou_xdig = 0; 1980 v = 0; 1982 ( ch = * c ++) != '\0') { 1983 cڡ * pch ; 1985 pch = `rchr (( xdigs = xdigs_l ), ch ); 1986 i( pch = NULL ) 1987 pch = `rchr (( xdigs = xdigs_u ), ch ); 1988 i( pch ! NULL ) { 1989 i( cou_xdig >= 4) 1991 v <<= 4; 1992 v |( pch - xdigs ); 1993 i( v > 0xffff) 1995 w_xdig = 1; 1996 cou_xdig ++; 1999 i( ch == ':') { 2000 cuok = c ; 2001 i(! w_xdig ) { 2002 i( cp ) 2004 cp = ; 2006 } i(* c == '\0') { 2009 i( + ( t16_t > dp ) 2011 * ++ = ()(( v >> 8) & 0xff); 2012 * ++ = ()( v & 0xff); 2013 w_xdig = 0; 2014 cou_xdig = 0; 2015 v = 0; 2016 dblo_cou ++; 2019 i( ch ='.' && (( + INADDRSZ < dp ) && 2020 `__v4 ( cuok , ) > 0) { 2021 + INADDRSZ ; 2022 w_xdig = 0; 2023 dblo_cou += 2; 2028 i( w_xdig ) { 2029 i( + ( t16_t > dp ) 2031 * ++ = ()(( v >> 8) & 0xff); 2032 * ++ = ()( v & 0xff); 2033 dblo_cou ++; 2035 i( cp ! NULL ) { 2037 i( dblo_cou == 8) 2044 cڡ  n = - cp ; 2045  i ; 2047  i = 1; i < n ; i++) { 2048 dp [- i ] = cp [ n - i]; 2049 cp [ n - i ] = 0; 2051 = dp ; 2053 i( ! dp ) 2055 `memy ( d , tmp , IN6ADDRSZ ); 2057 } } 2059  $p_r_gs ( pe_ms * ms ) 2061 ut32_t p_rou_tbl_e = 0; 2062 ut32_t nd_rou_tbl_e = 0; 2063 ut32_t pts_mac_li_e = 0; 2064 ut32_t numArg ; 2065 ut32_t n_vnf_thads_e = 0; 2067 ut32_t pktq__v_e = 0; 2068 ut32_t v_to_pub_m_e = 0; 2070 ut8_t n_v__pt = 0; 2071  i ; 2072  i = 0; i < PIPELINE_MAX_PORT_IN ; i++) { 2073 _pt_d_a [ i ] = 0; 2074 v_to_pub_m [ i ] = 0xff; 2075 pub_to_v_m [ i ] = 0xff; 2078 `RTE_SET_USED ( pts_mac_li_e ); 2079 `RTE_SET_USED ( nd_rou_tbl_e ); 2080 `RTE_SET_USED ( p_rou_tbl_e ); 2081  numArg = 0;umArg < ms -> n_gs ;umArg++) { 2082 * g_me = ms -> gs_me [ numArg ]; 2083 * g_vue = ms -> gs_vue [ numArg ]; 2086 i( `rcmp ( g_me , "arp_timer_expiry") == 0) { 2087 p_timeout = `oi ( g_vue ); 2091 i( `rcmp ( g_me , "pktq_in_prv") == 0) { 2092 i( pktq__v_e ) { 2093 tf 2097 pktq__v_e = 1; 2099  rxpt = 0, j = 0; 2100  phy_pt_num [5]; 2101 * tok = `ok ( g_vue , "RXQ"); 2102  tok ) { 2103 j = 0; 2104 ( j < 4&& ( tok [j] != '.')) { 2105 phy_pt_num [ j ] = tok [j]; 2106 j ++; 2108 phy_pt_num [ j ] = '\0'; 2109 rxpt = `oi ( phy_pt_num ); 2110 v__pt_a [ n_v__pt ++] = rxpt ; 2111 i( rxpt < 0) 2112 rxpt = 0; 2113 tf 2115 tok , phy_pt_num , rxpt ); 2116 v__pt_a [ n_v__pt ++] = rxpt ; 2117 if( rxpt < PIPELINE_MAX_PORT_IN ) 2118 _pt_d_a [ rxpt ] = 1; 2119 tok = `ok ( NULL , "RXQ"); 2122 i( n_v__pt == 0) { 2123 tf 2131 i( `rcmp ( g_me , "prv_to_pub_map") == 0) { 2132 i( v_to_pub_m_e ) { 2133 tf 2137 v_to_pub_m_e = 1; 2139  rxpt = 0, txpt = 0, j = 0, k = 0; 2140  rx_phy_pt_num [5]; 2141  tx_phy_pt_num [5]; 2142 * tok = `ok ( g_vue , "("); 2143  tok ) { 2144 j = 0; 2145 ( j < 4&& ( tok [j] != ',')) { 2146 rx_phy_pt_num [ j ] = tok [j]; 2147 j ++; 2149 rx_phy_pt_num [ j ] = '\0'; 2150 rxpt = `oi ( rx_phy_pt_num ); 2151 i( rxpt < 0) 2152 rxpt = 0; 2154 j ++; 2155 k = 0; 2156 ( k < 4&& ( tok [ j + k] != ')')) { 2157 tx_phy_pt_num [ k ] = tok [ j + k]; 2158 k ++; 2160 tx_phy_pt_num [ k ] = '\0'; 2161 txpt = `oi ( tx_phy_pt_num ); 2162 i( txpt < 0) 2163 txpt = 0; 2165 `RTE_LOG ( INFO , LIBARP , "token: %s," 2168 tok , rx_phy_pt_num , rxpt , 2169 tx_phy_pt_num , txpt ); 2171 i(( rxpt > PIPELINE_MAX_PORT_IN ) || 2172 ( txpt > PIPELINE_MAX_PORT_IN ) || 2173 ( _pt_d_a [ rxpt ] != 1)) { 2174 tf 2176 rxpt , txpt , 2177 _pt_d_a [ rxpt ]); 2181 v_to_pub_m [ rxpt ] = txpt ; 2182 pub_to_v_m [ txpt ] = rxpt ; 2183 tok = `ok ( NULL , "("); 2189 i( `rcmp ( g_me , "n_vnf_threads") == 0) { 2190 i( n_vnf_thads_e ) 2192 n_vnf_thads_e = 1; 2193 `im ( g_vue ); 2194 num_vnf_thads = `oi ( g_vue ); 2195 i( num_vnf_thads <= 0) { 2196 `RTE_LOG ( INFO , LIBARP , 2200 `RTE_LOG ( INFO , LIBARP , "n_vnf_threads: 0x%x\n", 2201 num_vnf_thads ); 2205 i( `rcmp ( g_me , "lib_arp_debug") == 0) { 2206 ARPICMP_DEBUG = `oi ( g_vue ); 2212 i( `rcmp ( g_me , "ports_mac_list") == 0) { 2213 pts_mac_li_e = 1; 2215 ut32_t i = 0, j = 0, k = 0, MAC_NUM_BYTES = 6; 2217  byS [ MAC_NUM_BYTES ][3]; 2218 ut32_t by [ MAC_NUM_BYTES ]; 2220 * tok = `ok ( g_vue , " "); 2221  tok ) { 2222 k = 0; 2223  i = 0; i < MAC_NUM_BYTES ; i++) { 2224  j = 0; j < 2; j++) { 2225 byS [ i ][ j ] = tok [ k ++]; 2227 byS [ i ][ j ] = '\0'; 2228 k ++; 2231  i = 0; i < MAC_NUM_BYTES ; i++) { 2232 by [ i ] = `oul ( byS [i], NULL , 16); 2235 i( ARPICMP_DEBUG ) { 2236 `RTE_LOG ( INFO , LIBARP , "token: %s", 2237 tok ); 2238  i = 0; i < MAC_NUM_BYTES ; i++) 2239 `RTE_LOG ( INFO , LIBARP , 2240 ", by[%u] %u", i , 2241 by [ i ]); 2242 `RTE_LOG ( INFO , LIBARP , "\n"); 2245  i = 0; i < MAC_NUM_BYTES ; i++) 2246 lk_hw_addr 2247 [ lk_hw_addr_y_idx ]. addr_bys 2248 [ i ] = by [i]; 2250 lk_hw_addr_y_idx ++; 2251 tok = `ok ( NULL , " "); 2258 i( `rcmp ( g_me , "arp_route_tbl") == 0) { 2259 p_rou_tbl_e = 1; 2261 ut32_t de_ = 0, mask = 0, tx_pt = 0, nh_ = 2262 0, i = 0, j = 0, k = 0, l = 0; 2263 ut32_t p_rou_tbl_r_max_n = 10; 2264  de__r [ p_rou_tbl_r_max_n ]; 2265  mask_r [ p_rou_tbl_r_max_n ]; 2266  tx_pt_r [ p_rou_tbl_r_max_n ]; 2267  nh__r [ p_rou_tbl_r_max_n ]; 2268 * tok = `ok ( g_vue , "("); 2269  tok ) { 2270 i = 0; 2271 ( i < ( p_rou_tbl_r_max_n - 1)) 2272 && ( tok [ i ] != ',')) { 2273 de__r [ i ] = tok [i]; 2274 i ++; 2276 de__r [ i ] = '\0'; 2277 de_ = `oul ( de__r , NULL , 16); 2279 i ++; 2280 j = 0; 2281 ( j < ( p_rou_tbl_r_max_n - 1)) 2282 && ( tok [ i + j ] != ',')) { 2283 mask_r [ j ] = tok [ i + j]; 2284 j ++; 2286 mask_r [ j ] = '\0'; 2287 mask = `oul ( mask_r , NULL , 16); 2289 j ++; 2290 k = 0; 2291 ( k < ( p_rou_tbl_r_max_n - 1)) 2292 && ( tok [ i + j + k ] != ',')) { 2293 tx_pt_r [ k ] = tok [ i + j + k]; 2294 k ++; 2296 tx_pt_r [ k ] = '\0'; 2297 tx_pt = `oul ( tx_pt_r , NULL , 16); 2299 k ++; 2300 l = 0; 2301 ( l < ( p_rou_tbl_r_max_n - 1)) 2302 && ( tok [ i + j + k + l ] != ')')) { 2303 nh__r [ l ] = tok [ i + j + k +]; 2304 l ++; 2306 nh__r [ l ] = '\0'; 2307 nh_ = `oul ( nh__r , NULL , 16); 2310 `RTE_LOG ( INFO , LIBARP , "token: %s, " 2315 tok , de__r , de_ , 2316 mask_r , mask , tx_pt_r , 2317 tx_pt , nh__r , nh_ ); 2328 lib_p_rou_b [ p_rou_tbl_dex ]. = 2329 de_ ; 2330 lib_p_rou_b [ p_rou_tbl_dex ]. mask = 2331 mask ; 2332 lib_p_rou_b [ p_rou_tbl_dex ]. pt = 2333 tx_pt ; 2334 lib_p_rou_b [ p_rou_tbl_dex ]. nh = 2335 nh_ ; 2336 p_rou_tbl_dex ++; 2337 tok = `ok ( NULL , "("); 2344 i( `rcmp ( g_me , "nd_route_tbl") == 0) { 2345 nd_rou_tbl_e = 1; 2347 ut8_t de_v6 [16], dth = 0, tx_pt = 2348 0, nh_v6 [16], i = 0, j = 0, k = 0, l = 0; 2349 ut8_t nd_rou_tbl_r_max_n = 128; 2350  de_v6_r [ nd_rou_tbl_r_max_n ]; 2351  dth_r [ nd_rou_tbl_r_max_n ]; 2352  tx_pt_r [ nd_rou_tbl_r_max_n ]; 2353  nh_v6_r [ nd_rou_tbl_r_max_n ]; 2354 * tok = `ok ( g_vue , "("); 2355  tok ) { 2356 i = 0; 2357 ( i < ( nd_rou_tbl_r_max_n - 1)) 2358 && ( tok [ i ] != ',')) { 2359 de_v6_r [ i ] = tok [i]; 2360 i ++; 2362 de_v6_r [ i ] = '\0'; 2363 `my___v6 ( AF_INET6 , de_v6_r , 2364 & de_v6 ); 2366 i ++; 2367 j = 0; 2368 ( j < ( nd_rou_tbl_r_max_n - 1)) 2369 && ( tok [ i + j ] != ',')) { 2370 dth_r [ j ] = tok [ i + j]; 2371 j ++; 2373 dth_r [ j ] = '\0'; 2375  s ; 2376  s = 0; dth_r [s] != '\0'; ++s) 2377 dth = dth * 10 + dth_r [ s ] - '0'; 2379 j ++; 2380 k = 0; 2381 ( k < ( nd_rou_tbl_r_max_n - 1)) 2382 && ( tok [ i + j + k ] != ',')) { 2383 tx_pt_r [ k ] = tok [ i + j + k]; 2384 k ++; 2386 tx_pt_r [ k ] = '\0'; 2387 tx_pt = `oul ( tx_pt_r , NULL , 16); 2389 k ++; 2390 l = 0; 2391 ( l < ( nd_rou_tbl_r_max_n - 1)) 2392 && ( tok [ i + j + k + l ] != ')')) { 2393 nh_v6_r [ l ] = tok [ i + j + k +]; 2394 l ++; 2396 nh_v6_r [ l ] = '\0'; 2397 `my___v6 ( AF_INET6 , nh_v6_r , 2398 & nh_v6 ); 2401  i = 0; i < 16; i++) { 2402 lib_nd_rou_b 2403 [ nd_rou_tbl_dex ]. v6 [ i ] = 2404 de_v6 [ i ]; 2405 lib_nd_rou_b 2406 [ nd_rou_tbl_dex ]. nhv6 [ i ] = 2407 nh_v6 [ i ]; 2409 lib_nd_rou_b [ nd_rou_tbl_dex ]. dth = 2410 dth ; 2411 lib_nd_rou_b [ nd_rou_tbl_dex ]. pt = 2412 tx_pt ; 2414 nd_rou_tbl_dex ++; 2415 tok = `ok ( NULL , "("); 2434 } } 2436  $lib_p_ ( pe_ms * ms , 2437 __e_unud  p_ms * p ) 2440 `RTE_LOG ( INFO , LIBARP , "ARP initialization ...\n"); 2443 i( `p_r_gs ( ms )) { 2444 `RTE_LOG ( INFO , LIBARP , "arp_parse_args failed ...\n"); 2449 lib_p_pktmbuf_tx_po = 2450 `e_pktmbuf_po_ ("lib_p_mbuf_tx_po", NB_ARPICMP_MBUF , 32, 2451 0, RTE_MBUF_DEFAULT_BUF_SIZE , 2452 `e_sock_id ()); 2454 i( lib_p_pktmbuf_tx_po = NULL ) { 2455 `RTE_LOG ( INFO , LIBARP , "ARP mbufool create failed.\n"); 2459 lib_p_pkt = `e_pktmbuf_loc ( lib_p_pktmbuf_tx_po ); 2460 i( lib_p_pkt = NULL ) { 2461 `RTE_LOG ( INFO , LIBARP , "ARPib_arp_pktlloc failed.\n"); 2465 p_hash_ms . sock_id = `e_sock_id (); 2466 p_hash_ms . s = MAX_NUM_ARP_ENTRIES ; 2467 p_hash_ms . key_n = ( p_key_v4 ); 2468 p_hash_hd = `e_hash_ (& p_hash_ms ); 2470 i( p_hash_hd = NULL ) { 2471 `RTE_LOG ( INFO , LIBARP , 2473 p_hash_ms . sock_id ); 2475 `RTE_LOG ( INFO , LIBARP , "arp_hash_handle %p\n\n", 2476 (*) p_hash_hd ); 2481 tim_mempo_p = `e_mempo_ ("timer_mempool_arp", 2482 tim_objs_mempo_cou , 2483 ( e_tim ), 2485 NULL , NULL, 2486 NULL , NULL, `e_sock_id (), 0); 2487 i( tim_mempo_p = NULL ) { 2488 `e_nic ("timer_mempool createrror\n"); 2490 `e_tim_subsyem_ (); 2491 `li_add_ty ( ETHER_TYPE_ARP , oss_picmp_pkt_r ); 2494 nd_hash_ms . sock_id = `e_sock_id (); 2495 nd_hash_ms . s = MAX_NUM_ND_ENTRIES ; 2496 nd_hash_ms . key_n = ( nd_key_v6 ); 2497 nd_hash_hd = `e_hash_ (& nd_hash_ms ); 2498 i( nd_hash_hd = NULL ) { 2499 `RTE_LOG ( INFO , LIBARP , 2501 nd_hash_ms . sock_id ); 2503 `RTE_LOG ( INFO , LIBARP , "nd_hash_handle %p\n\n", 2504 (*) nd_hash_hd ); 2508 } } 2510  $p_tim_back ( e_tim * tim , * g ) 2512  p_tim_key * move_key = (p_tim_key *) g ; 2513 i( ARPICMP_DEBUG ) 2514 `RTE_LOG ( INFO , LIBARP , "ARP TIMER callback :xpire :%d\n", 2515 () tim -> expe ); 2516 i( ARPICMP_DEBUG ) 2517 `RTE_LOG ( INFO , LIBARP , 2519 ( move_key -> >> 24), 2520 (( move_key -> & 0x00ff0000) >> 16), 2521 (( move_key -> & 0x0000ff00) >> 8), 2522 (( move_key -> & 0x000000ff)),emove_key-> pt_id ); 2523 `move_p_y (( ut32_t move_key -> , 2524 ( ut8_t move_key -> pt_id , g ); 2526 } } 2528  $nd_tim_back ( e_tim * tim , * g ) 2530  nd_tim_key * move_key = (nd_tim_key *) g ; 2531 i( ARPICMP_DEBUG ) 2532 `RTE_LOG ( INFO , LIBARP , "ndime callback :xpire :%d\n", 2533 () tim -> expe ); 2534 `move_nd_y_v6 ( move_key -> v6 ,emove_key-> pt_id ); 2536 } } 2538  $_p_b () 2541  i ; 2542  i = 0; i < MAX_ARP_DATA_ENTRY_TABLE ; i++) { 2543 `puϋ_p_y ((cڡ  h_addr *) 2544 & p_y_da_b [ i ]. h_addr , 2545 p_y_da_b [ i ]. , 2546 ( ut8_t p_y_da_b [ i ]. pt , 2547 STATIC_ARP ); 2549 `t_p_b (); 2551 } } 2553  $_nd_b () 2556  i ; 2557  i = 0; i < MAX_ND_DATA_ENTRY_TABLE ; i++) { 2558 `puϋ_nd_y ((cڡ  h_addr *) 2559 nd_y_da_b [ i ]. h_addr , 2560 nd_y_da_b [ i ]. v6 , 2561 ( ut8_t nd_y_da_b [ i ]. pt , 2562 STATIC_ND ); 2564 `t_nd_b (); 2566 } } 2568  $nd_gtuous_p ( l2_phy_r_t * pt ) 2570  h_hdr * h_h ; 2571  p_hdr * p_h ; 2573  e_mbuf * p_pkt = lib_p_pkt ; 2575 i( pt = NULL ) { 2576 `RTE_LOG ( INFO , LIBARP , "PORT ID DOWN.. %s\n", __FUNCTION__ ); 2581 i( p_pkt = NULL ) { 2582 i( ARPICMP_DEBUG ) 2583 `RTE_LOG ( INFO , LIBARP , 2588 h_h = `e_pktmbuf_mtod ( p_pkt ,  h_hdr *); 2590 `h_addr_cy (& brd_h_addr , & h_h -> d_addr ); 2591 `h_addr_cy (( h_addr *) 2592 & pt -> maddr [0], & h_h -> s_addr ); 2593 h_h -> h_ty = `CHECK_ENDIAN_16 ( ETHER_TYPE_ARP ); 2595 p_h = ( p_hdr *)((*) h_h + ( h_hdr )); 2596 p_h -> p_hrd = `CHECK_ENDIAN_16 ( ARP_HRD_ETHER ); 2597 p_h -> p_o = `CHECK_ENDIAN_16 ( ETHER_TYPE_IPv4 ); 2598 p_h -> p_h = ETHER_ADDR_LEN ; 2599 p_h -> p_n = ( ut32_t ); 2600 p_h -> p_ = `CHECK_ENDIAN_16 ( ARP_OP_REQUEST ); 2602 `h_addr_cy (( h_addr *) 2603 & pt -> maddr [0], & p_h -> p_da . p_sha ); 2604 i( pt -> v4_li = NULL ) { 2605 i( ARPICMP_DEBUG ) 2606 `RTE_LOG ( INFO , LIBARP , "port->ipv4_list is NULL.. %s\n", 2607 __FUNCTION__ ); 2610 p_h -> p_da . p_s = ((( v4li_t *( pt -> v4_li ))-> addr ); 2611 `h_addr_cy (& nu_h_addr , & p_h -> p_da . p_tha ); 2613 p_h -> p_da . p_t = 0; 2617 p_pkt -> pkt_n = 42; 2618 p_pkt -> da_n = 42; 2620 i( ARPICMP_DEBUG ) { 2621 `RTE_LOG ( INFO , LIBARP , "SENDING GRATUITOUS ARP REQUEST\n"); 2622 `t_mbuf ("TX", pt -> pmdid , p_pkt , __LINE__ ); 2624 pt -> `sm_sg_pkt t, p_pkt ); 2625 } } 2627  $t_pdebug ( ag ) 2629 i( ag ) { 2630 `RTE_LOG ( INFO , LIBARP , "Debugsurned on\n\r"); 2631 ARPICMP_DEBUG = 1; 2632 NDIPV6_DEBUG = 1; 2635 `RTE_LOG ( INFO , LIBARP , "Debugsurned off\n\r"); 2636 ARPICMP_DEBUG = 0; 2637 NDIPV6_DEBUG = 0; 2639 } } 2641  $t_imeout ( ut32_t timeout_v ) 2643 i( timeout_v == 0) { 2644 `RTE_LOG ( INFO , LIBARP , "Cannot be zero...\n\r"); 2647 i( ARPICMP_DEBUG ) 2648 `RTE_LOG ( INFO , LIBARP , 2650 p_timeout , timeout_v ); 2651 p_timeout = timeout_v ; 2652 i( ARPICMP_DEBUG ) 2653 `RTE_LOG ( INFO , LIBARP , "set_arptimeout:rp_timeout %u\n\r", 2654 p_timeout ); 2655 } } @VIL/l2l3_stack/lib_arp.h 17 #ide __INCLUDE_LIB_ARP_H__ 18  #__INCLUDE_LIB_ARP_H__ ) 20  ~ 21  ~"e_h.h " 22  ~"l2_o.h " 23  ~"p.h " 25  #ND_IPV6_ADDR_SIZE 16 ) 26  #ND_IPV6_TIMER_EXPIRY 300 ) 27  #ARP_TIMER_EXPIRY 1800 ) 28  #TIMER_MILLISECOND 1 ) 29  #RTE_LOGTYPE_LIBARP RTE_LOGTYPE_USER1 ) 30  #MAX_ND_RT_ENTRY 16 ) 31  #MAX_ARP_RT_ENTRY 16 ) 37  slib_p_rou_b_y { 38 ut32_t m ; 39 ut32_t mmask ; 40 ut32_t mpt ; 41 ut32_t mnh ; 48  slib_nd_rou_b_y { 49 ut8_t mv6 [16]; 50 ut8_t mdth ; 51 ut32_t mpt ; 52 ut8_t mnhv6 [16]; 55  lib_nd_rou_b_y lib_nd_rou_b [ MAX_ND_RT_ENTRY ]; 56  lib_p_rou_b_y lib_p_rou_b [ MAX_ARP_RT_ENTRY ]; 59 mARP_FOUND , 60 mARP_NOT_FOUND , 61 mNH_NOT_FOUND , 64 ep_key_ty { 65 mARP_IPV4 , 66 mND_IPV6 , 69  sp_key_v4 { 70 ut32_t m ; 71 ut8_t mpt_id ; 72 ut8_t mfr1 ; 73 ut8_t mfr2 ; 74 ut8_t mfr3 ; 80  snd_key_v6 { 81 ut8_t mv6 [ ND_IPV6_ADDR_SIZE ]; 82 ut8_t mpt_id ; 83 ut8_t mfr1 ; 84 ut8_t mfr2 ; 85 ut8_t mfr3 ; 91  sp_key { 92 p_key_ty mty ; 94  p_key_v4 mv4 ; 95 } mkey ; 103  snd_tim_key { 104 ut8_t mv6 [ ND_IPV6_ADDR_SIZE ]; 105 ut8_t mpt_id ; 106 } g__e_che_igd ; 112  sp_tim_key { 113 ut32_t m ; 114 ut8_t mpt_id ; 115 } g__e_che_igd ; 117 ut32_t ARPICMP_DEBUG ; 119  #COMPLETE 1 ) 120  #INCOMPLETE 0 ) 122 ut32_t NDIPV6_DEBUG ; 124  #ICMPv6_COMPLETE 1 ) 125  #ICMPv6_INCOMPLETE 0 ) 126  #STATIC_ARP 1 ) 127  #DYNAMIC_ARP 0 ) 128  #STATIC_ND 1 ) 129  #DYNAMIC_ND 0 ) 136  sp_y_da { 137  h_addr mh_addr ; 138 ut32_t m ; 139 ut8_t mpt ; 140 ut8_t mus ; 141 ut8_t mmode ; 142 ut8_t my_cou ; 143  e_tim * mtim ; 144  p_tim_key * mtim_key ; 145 } __ibu__ (( cked )); 152  sb_p_y_da { 153 ut8_t mh_addr [6]; 154 ut8_t mpt ; 155 ut8_t mus ; 156 ut32_t m ; 157 } __ibu__ (( cked )); 164  snd_y_da { 165  h_addr mh_addr ; 166 ut8_t mpt ; 167 ut8_t mus ; 168 ut8_t mmode ; 169 ut8_t mv6 [ ND_IPV6_ADDR_SIZE ]; 170  e_tim * mtim ; 171 } __ibu__ (( cked )); 179  sb_nd_y_da { 180 ut8_t mh_addr [6]; 181 ut8_t mpt ; 182 ut8_t mus ; 183 ut8_t mv6 [ ND_IPV6_ADDR_SIZE ]; 184  e_tim * mtim ; 185 } __ibu__ (( cked )); 201  g_de_mac_addss (cڡ ut32_t addr , ut32_* phy_pt , 202  h_addr * hw_addr , ut32_t * nh ); 216  g_de_mac_addr_pt (cڡ ut32_t addr , 217 ut32_t * phy_pt ,  h_addr * hw_addr ); 230  g_de_mac_addr (cڡ ut32_t addr , ut32_* phy_pt , 231  h_addr * hw_addr ); 246  g_de_mac_addss_v6 ( ut8_t v6addr [], ut32_t * phy_pt , 247  h_addr * hw_addr , ut8_t nhv6 []); 262  g_de_mac_addss_v6_pt ( ut8_t v6addr [], ut32_t * phy_pt , 263  h_addr * hw_addr , 264 ut8_t nhv6 []); 272  h_addr * g_lk_hw_addr ( ut8_t out_pt ); 279  t_p_b (); 286  t_nd_b (); 295  move_p_y ( ut32_t addr , ut8_t ptid , * g ); 305  move_nd_y_v6 ( ut8_t v6addr [], ut8_ ptid ); 318  puϋ_p_y (cڡ  h_addr * hw_addr , ut32_t addr , 319 ut8_t ptid , ut8_ mode ); 333  puϋ_nd_y (cڡ  h_addr * hw_addr , ut8_t [], 334 ut8_t ptid , ut8_ mode ); 344  que_p ( ut8_t pt_id , ut32_t ); 353  e_mbuf * que_echo ( ut32_t pt_id , ut32_ ); 362  e_mbuf * que_icmpv6_echo ( ut8_t v6 [], l2_phy_r_t * pt ); 371  e_mbuf * que_nd ( ut8_t v6 [], l2_phy_r_t * pt ); 382  oss_picmp_pkt ( e_mbuf * pkt , l2_phy_r_t * pt ); 390  p_y_da * ve_p_y (cڡ  p_key_v4 p_key ); 399  nd_y_da * ve_nd_y ( nd_key_v6 nd_key ); 405  lib_p_ ( pe_ms * ms ,  p_ms * p ); 407  t_pt_to_ldb_m ( ut8_t pe_num ); 412 ut8_t g_pt_to_ldb_m (ut8_ phy_pt_id ); 414  t_phy_pt_m ( ut8_t pe_num , ut8_* m ); 415  t_phy_out_m ( ut8_t pe_num , ut8_* m ); 421 ut8_t g_ldb_out_id (ut8_ au_phy_pt ); 422 ut8_t g_vnf_t_num (ut8_ pe_num ); 424  pes_pt_fo (); 425  pes_m_fo (); 434  p_tim_back ( e_tim *, * g ); 443  nd_tim_back ( e_tim * tim , * g ); 449  _p_b (); 454  _nd_b (); 467  oss_picmp_pkt_r ( e_mbuf ** pkt , ut16_t pkt_num , 468 ut64_t pkt_mask , l2_phy_r_t * pt ); 475  nd_gtuous_p ( l2_phy_r_t * pt ); 481  t_pdebug ( ag ); 487  t_imeout ( ut32_t timeout_v ); 495 ut32_t g_nh (uint32_t, uint32_t *); 505  g_nh_v6 ( ut8_t v6 [], ut32_t * pt , ut8_ nhv6 []); @VIL/l2l3_stack/lib_icmpv6.c 18  ~"lib_icmpv6.h " 20  $t_pkt ( ut8_t * rd ) 22  i = 0, j = 0; 24 `tf ("Packet Contents:\n"); 26  i = 0; i < 20; i++) { 27  j = 0; j < 20; j++) 28 `tf ("%02x ", rd [(20 * i + j ]); 30 `tf ("\n"); 32 } } 34  ut16_t $icmpv6_v6_nd_checksum ( e_mbuf * pkt ) 36  h_hdr * h_h ; 37  v6_hdr * v6_h ; 38  icmpv6_hdr * icmpv6_h ; 40 size_t tm , offt ; 41 ut8_t * tmack , * ack ; 43 h_h = `e_pktmbuf_mtod ( pkt ,  h_hdr *); 44 v6_h = ( v6_hdr *)((*) h_h + ( h_hdr )); 45 icmpv6_h = 46 ( icmpv6_hdr *)((*) v6_h + ( v6_hdr )); 48 ut32_t yldn = 0x20; 49 yldn = `e_bsw32 (payloadlen); 51 tm = 40 + ( icmpv6_hdr + ( icmpv6_nd_hdr ); 52 tm = `RTE_CACHE_LINE_ROUNDUP (tmplen); 53 tmack = `e_zmloc ( NULL , tm , RTE_CACHE_LINE_SIZE ); 54 ack = tmack ; 56 offt = 16; 57 `memy ( ack , & v6_h -> c_addr [0], offt ); 58 ack + offt ; 59 `memy ( ack , & v6_h -> d_addr [0], offt ); 60 ack + offt ; 61 * ack = 0; 62 ack ++; 63 * ack = 0; 64 ack ++; 65 * ack = 0; 66 ack ++; 67 `memy ( ack , & v6_h -> o , 1); 68 ack ++; 69 `memy ( ack , & yldn , 4); 70 ack += 4; 71 `memy ( ack , icmpv6_h , 72 ( icmpv6_hdr + ( icmpv6_nd_hdr )); 74 i( ARPICMP_DEBUG ) 75 `t_pkt ( tmack ); 77  `e_w_cksum ( tmack , tm ); 78 } } 80  ut16_t $icmpv6_v6_echo_checksum ( e_mbuf * pkt ) 82  h_hdr * h_h ; 83  v6_hdr * v6_h ; 84  icmpv6_hdr * icmpv6_h ; 86 size_t tm , offt ; 87 ut8_t * tmack , * ack ; 89 h_h = `e_pktmbuf_mtod ( pkt ,  h_hdr *); 90 v6_h = ( v6_hdr *)((*) h_h + ( h_hdr )); 91 icmpv6_h = 92 ( icmpv6_hdr *)((*) v6_h + ( v6_hdr )); 94 ut32_t yldn = `e_bsw16 ( v6_h -> yld_n ); 95 ut32_t yldn_sw = `e_bsw32 ( yldn ); 97 i( ARPICMP_DEBUG ) 98 `tf ("%s:ayldn: %u\n", __FUNCTION__ , yldn ); 100 tm = 40 + yldn ; 101 tm = `RTE_CACHE_LINE_ROUNDUP (tmplen); 102 tmack = `e_zmloc ( NULL , tm , RTE_CACHE_LINE_SIZE ); 103 ack = tmack ; 105 offt = 16; 106 `memy ( ack , & v6_h -> c_addr [0], offt ); 107 ack + offt ; 108 `memy ( ack , & v6_h -> d_addr [0], offt ); 109 ack + offt ; 110 * ack = 0; 111 ack ++; 112 * ack = 0; 113 ack ++; 114 * ack = 0; 115 ack ++; 116 `memy ( ack , & v6_h -> o , 1); 117 ack ++; 118 `memy ( ack , & yldn_sw , 4); 119 ack += 4; 120 `memy ( ack , icmpv6_h , yldn ); 122 i( ARPICMP_DEBUG ) 123 `t_pkt ( tmack ); 125  `e_w_cksum ( tmack , tm ); 126 } } 128  $oss_icmpv6_pkt ( e_mbuf * pkt , l2_phy_r_t * pt ) 131  h_hdr * h_h ; 132  v6_hdr * v6_h ; 133  icmpv6_hdr * icmpv6_h ; 134  icmpv6_nd_hdr * icmpv6_nd_h ; 135 ut8_t v6_addr [16]; 136 ut8_t i = 0; 137 ut8_t q_tv6 [16]; 140 i( pt = NULL ) { 141 `tf ("port is NULL"); 143 } i( pt -> v6_li = NULL ) { 144 `tf ("IPV6ddressot configured onink\n"); 148 h_h = `e_pktmbuf_mtod ( pkt ,  h_hdr *); 149 v6_h = ( v6_hdr *)((*) h_h + ( h_hdr )); 150 icmpv6_h = 151 ( icmpv6_hdr *)((*) v6_h + ( v6_hdr )); 153 i(( icmpv6_h -> icmpv6_ty = ICMPV6_ECHO_REQUEST ) 154 && ( icmpv6_h -> icmpv6_code == 0)) { 155  i = 0; i < 16; i++) { 156 v6_addr [ i ] = v6_h -> c_addr [i]; 159 `h_addr_cy (& h_h -> s_addr , &h_h-> d_addr ); 160 `h_addr_cy (( h_addr *)& pt -> maddr [0], 161 & h_h -> s_addr ); 163  i = 0; i < 16; i++) 164 v6_h -> c_addr [ i ] = ipv6_h-> d_addr [i]; 165  i = 0; i < 16; i++) 166 v6_h -> d_addr [ i ] = v6_addr [i]; 168 icmpv6_h -> icmpv6_ty = ICMPV6_ECHO_REPLY ; 169 icmpv6_h -> icmpv6_cksum = 0; 170 icmpv6_h -> icmpv6_cksum = ~ `icmpv6_v6_echo_checksum ( pkt ); 171 pt -> `sm_bulk_pkts t, & pkt , 1); 174 } i(( icmpv6_h -> icmpv6_ty = ICMPV6_ECHO_REPLY ) 175 && ( icmpv6_h -> icmpv6_code == 0)) { 176  nd_key_v6 nd_key ; 177 nd_key . pt_id = pt -> pmdid ; 178  i = 0; i < ND_IPV6_ADDR_SIZE ; i++) { 179 nd_key . v6 [ i ] = v6_h -> c_addr [i]; 182 nd_key . fr1 = 0; 183 nd_key . fr2 = 0; 184 nd_key . fr3 = 0; 187  nd_y_da * w_nd_da = `ve_nd_y ( nd_key ); 188 i( w_nd_da = NULL ) { 189 tf 191 nd_key . pt_id ); 192  i = 0; i < ND_IPV6_ADDR_SIZE ; i += 2) { 193 `tf ("%02X%02X ", nd_key . v6 [ i ], 194 nd_key . v6 [ i + 1]); 199 w_nd_da -> us = COMPLETE ; 200 } i(( icmpv6_h -> icmpv6_ty = ICMPV6_NEIGHBOR_SOLICITATION ) 201 && ( icmpv6_h -> icmpv6_code == 0)) { 203 icmpv6_nd_h = 204 ( icmpv6_nd_hdr *)((*) icmpv6_h + 205 ( icmpv6_hdr )); 206  h_addr * c_hw_addr = & h_h -> s_addr ; 207 ut8_t c_v6 [16], d_v6 [16]; 208 ut16_t mui_addr ; 210  i = 0; i < ND_IPV6_ADDR_SIZE ; i++) 211 c_v6 [ i ] = v6_h -> c_addr [i]; 212  i = 0; i < ND_IPV6_ADDR_SIZE ; i++) 213 d_v6 [ i ] = v6_h -> d_addr [i]; 215 mui_addr = d_v6 [0]; 218 i(( IPV6_MULTICAST & (( mui_addr << 8| d_v6 [1])) 219 || ! `memcmp (& pt -> maddr [0], & h_h -> d_addr , 6)) { 220 `puϋ_nd_y ( c_hw_addr , c_v6 , pt -> pmdid , 221 DYNAMIC_ND ); 224  i = 0; i < ND_IPV6_ADDR_SIZE ; i++) 225 q_tv6 [ i ] = icmpv6_nd_h -> rg_v6 [i]; 227 i(! memcmp 228 (& q_tv6 [0], 229 &(( v6li_t * pt -> v6_li )-> addr [0], 232 `h_addr_cy (& h_h -> s_addr , &h_h-> d_addr ); 233 `h_addr_cy (( h_addr *)& pt -> 234 maddr [0], & h_h -> s_addr ); 237  i = 0; i < ND_IPV6_ADDR_SIZE ; i++) 238 v6_h -> d_addr [ i ] = 239 v6_h -> c_addr [ i ]; 240  i = 0; i < ND_IPV6_ADDR_SIZE ; i++) 241 v6_h -> c_addr [ i ] = q_tv6 [i]; 242 icmpv6_h -> icmpv6_ty = 243 ICMPV6_NEIGHBOR_ADVERTISEMENT ; 244 icmpv6_nd_h -> ty = e_Tg_Lk_Lay_Addss ; 245 icmpv6_nd_h -> ngth = 1; 246 `memy (& icmpv6_nd_h -> lk_y_addr [0], 247 & pt -> maddr [0], 6); 248 icmpv6_nd_h -> icmpv6_rved = 0; 249 icmpv6_nd_h -> icmpv6_rved |= 250 e_u_to_be_32 251 ( NEIGHBOR_ROUTER_OVERRIDE_SET ); 253 icmpv6_h -> icmpv6_cksum = 0; 254 icmpv6_h -> icmpv6_cksum = 255 ~ `icmpv6_v6_nd_checksum ( pkt ); 257 pt -> `sm_bulk_pkts t, & pkt , 1); 259 } i( ARPICMP_DEBUG ) { 260 tf 266 i( ARPICMP_DEBUG ) { 267 tf 272 } i(( icmpv6_h -> icmpv6_ty = ICMPV6_NEIGHBOR_ADVERTISEMENT ) 273 && ( icmpv6_h -> icmpv6_code == 0)) { 274  h_addr * c_hw_addr = & h_h -> s_addr ; 275 ut8_t v6 [16]; 276  i = 0; i < ND_IPV6_ADDR_SIZE ; i++) { 277 v6 [ i ] = v6_h -> c_addr [i]; 280 `puϋ_nd_y ( c_hw_addr , v6 , pt -> pmdid , DYNAMIC_ND ); 282 i( ARPICMP_DEBUG ) { 283 `tf ("ICMPv6 Type %d Not Supported yet !!!\n", 284 icmpv6_h -> icmpv6_ty ); 288 `e_pktmbuf_ ( pkt ); 289 } } 291  e_mbuf * $que_icmpv6_echo ( ut8_t v6 [], l2_phy_r_t * pt ) 293  h_hdr * h_h ; 294  v6_hdr * v6_h ; 295  icmpv6_hdr * icmpv6_h ; 296  icmpv6_fo_hdr * icmpv6_fo_h ; 297  i ; 298 ut8_t * icmp_da ; 300  e_mbuf * icmpv6_pkt = lib_icmpv6_pkt ; 301 i( icmpv6_pkt = NULL ) { 302 i( ARPICMP_DEBUG ) 303 `tf ("Errorllocating icmpv6_pktte_mbuf\n"); 304  NULL ; 307 h_h = `e_pktmbuf_mtod ( icmpv6_pkt ,  h_hdr *); 309 v6_h = ( v6_hdr *)((*) h_h + ( h_hdr )); 310 icmpv6_h = 311 ( icmpv6_hdr *)((*) v6_h + ( v6_hdr )); 312 icmpv6_fo_h = 313 ( icmpv6_fo_hdr *)((*) icmpv6_h + 314 ( icmpv6_hdr )); 316 `h_addr_cy (( h_addr *)& pt -> maddr [0], & h_h -> s_addr ); 317 h_h -> h_ty = `e_bsw16 (0x86dd); 318  i = 0; i < 6; i++) { 319 h_h -> d_addr . addr_bys [ i ] = 0; 322 v6_h -> vtc_ow = `e_bsw32 (0x60000000); 323 v6_h -> yld_n = `e_bsw16 (64); 324 v6_h -> o = 58; 325 v6_h -> h_lims = 64; 327  i = 0; i < 16; i++) { 328 v6_h -> c_addr [ i ] = 0x0; 329 v6_h -> d_addr [ i ] = v6 [i]; 332 icmpv6_h -> icmpv6_ty = ICMPV6_ECHO_REQUEST ; 333 icmpv6_h -> icmpv6_code = 0; 334 icmpv6_fo_h -> icmpv6_idt = `e_bsw16 (0x5151); 335 icmpv6_fo_h -> icmpv6_q_nb = `e_bsw16 (0x1); 337 icmp_da = ( ut8_t * icmpv6_h + 8; 338  i = 0; i < 56; i++) { 339 * icmp_da = i + 1; 340 icmp_da ++; 342 icmpv6_h -> icmpv6_cksum = 0; 343 icmpv6_h -> icmpv6_cksum = ~ `icmpv6_v6_echo_checksum ( icmpv6_pkt ); 345 icmpv6_pkt -> pkt_n = 346 ( h_hdr + ( v6_hdr ) + 64; 347 icmpv6_pkt -> da_n = icmpv6_pkt-> pkt_n ; 349  icmpv6_pkt ; 350 } } 352  e_mbuf * $que_nd ( ut8_t v6 [], l2_phy_r_t * pt ) 354  h_hdr * h_h ; 355  v6_hdr * v6_h ; 356  icmpv6_hdr * icmpv6_h ; 357  icmpv6_nd_hdr * icmpv6_nd_h ; 358  i ; 360  e_mbuf * icmpv6_pkt = lib_icmpv6_pkt ; 361 i( icmpv6_pkt = NULL ) { 362 i( ARPICMP_DEBUG ) 363 `tf ("Errorllocating icmpv6_pktte_mbuf\n"); 364  NULL ; 367 h_h = `e_pktmbuf_mtod ( icmpv6_pkt ,  h_hdr *); 369 v6_h = ( v6_hdr *)((*) h_h + ( h_hdr )); 370 icmpv6_h = 371 ( icmpv6_hdr *)((*) v6_h + ( v6_hdr )); 372 icmpv6_nd_h = 373 ( icmpv6_nd_hdr *)((*) icmpv6_h + 374 ( icmpv6_hdr )); 376 `h_addr_cy (( h_addr *)& pt -> maddr [0], & h_h -> s_addr ); 377 h_h -> h_ty = `e_bsw16 (0x86dd); 378  i = 0; i < 6; i++) { 379 h_h -> d_addr . addr_bys [ i ] = 0; 382 v6_h -> vtc_ow = 0x60000000; 383 v6_h -> yld_n = `e_bsw16 (32); 384 v6_h -> o = 58; 385 v6_h -> h_lims = 64; 387  i = 0; i < 16; i++) { 388 v6_h -> c_addr [ i ] = 0x0; 389 v6_h -> d_addr [ i ] = v6 [i]; 392 icmpv6_h -> icmpv6_ty = ICMPV6_NEIGHBOR_SOLICITATION ; 393 icmpv6_h -> icmpv6_code = 0; 395 icmpv6_nd_h -> icmpv6_rved = 0x0; 396  i = 0; i < ND_IPV6_ADDR_SIZE ; i++) 397 icmpv6_nd_h -> rg_v6 [ i ] = v6 [i]; 398 icmpv6_nd_h -> ty = e_Sour_Lk_Lay_Addss ; 399 icmpv6_nd_h -> ngth = 1; 400 `memy (& icmpv6_nd_h -> lk_y_addr [0], & pt -> maddr [0], 6); 402 icmpv6_h -> icmpv6_cksum = 0; 403 icmpv6_h -> icmpv6_cksum = ~ `icmpv6_v6_nd_checksum ( icmpv6_pkt ); 405 icmpv6_pkt -> pkt_n = 406 ( h_hdr + ( v6_hdr ) + 32; 407 icmpv6_pkt -> da_n = icmpv6_pkt-> pkt_n ; 409  icmpv6_pkt ; 410 } } @VIL/l2l3_stack/lib_icmpv6.h 17  ~ 18  ~ 19  ~ 20  ~ 21  ~ 22  ~ 23  ~ 24  ~ 25  ~ 26  ~ 27  ~ 28  ~ 29  ~ 30  ~ 31  ~ 32  ~ 33  ~ 34  ~"lib_p.h " 35  ~ 36  ~"e_h.h " 42  sicmpv6_hdr { 43 ut8_t micmpv6_ty ; 44 ut8_t micmpv6_code ; 45 ut16_t micmpv6_cksum ; 46 } __ibu__ (( __cked__ )); 51  sicmpv6_fo_hdr { 52 ut16_t micmpv6_idt ; 53 ut16_t micmpv6_q_nb ; 54 } __ibu__ (( __cked__ )); 59  sicmpv6_nd_hdr { 61 ut32_t micmpv6_rved ; 63 ut8_t mrg_v6 [16]; 64 ut8_t mty ; 65 ut8_t mngth ; 66 ut8_t mlk_y_addr [6]; 67 } __ibu__ (( __cked__ )); 70  #ICMPV6_PROTOCOL_ID 58 ) 71  #ICMPV6_ECHO_REQUEST 0x0080 ) 72  #ICMPV6_ECHO_REPLY 0x0081 ) 73  #ICMPV6_NEIGHBOR_SOLICITATION 0x0087 ) 74  #ICMPV6_NEIGHBOR_ADVERTISEMENT 0x0088 ) 75  #IPV6_MULTICAST 0xFF02 ) 77  #NEIGHBOR_SOLICITATION_SET 0x40000000 ) 78  #NEIGHBOR_ROUTER_OVERRIDE_SET 0xa0000000 ) 79 eicmpv6_lk_y_Addss_ty { 80 me_Sour_Lk_Lay_Addss = 1, 81 me_Tg_Lk_Lay_Addss , 82 me_Lk_Lay_Addss 88 ut8_t is_mui_v6_addr (ut8_ v6 []); 93  sicmpv6_pt_addss { 94 ut32_t mv6 [16]; 95 ut64_t mmac_addr ; 101  icmpv6_pt_addss gicmpv6_pt_addss [ RTE_MAX_ETHPORTS ]; 103  #MAX_NUM_ICMPv6_ENTRIES 64 ) 104  e_mbuf * glib_icmpv6_pkt ; 113  oss_icmpv6_pkt ( e_mbuf * pkt , l2_phy_r_t * pt ); @VIL/l2l3_stack/main_l2l3.c 17 #ide __INCLUDE_MAIN__ 18  #__INCLUDE_MAIN_H__ ) 20  ~ 21  ~ 22  ~ 23  ~ 24  ~ 25  ~ 26  ~ 27  ~ 28  ~ 29  ~ 30  ~ 31  ~ 33  ~ 34  ~ 35  ~ 36  ~ 37  ~ 38  ~ 39  ~ 40  ~ 41  ~ 42  ~ 43  ~ 44  ~ 45  ~ 46  ~ 47  ~ 48  ~ 49  ~ 50  ~ 51  ~ 52  ~ 53  ~ 54  ~ 55  ~ 56  ~ 57  ~ 58  ~ 59  ~ 60  ~ 61  ~ 62  ~ 63  ~ 64  ~"lib_p.h " 65  ~"l2_o.h " 66  ~"r.h " 67  ~"l3fwd_comm.h " 68  ~"l3fwd_m4.h " 69  ~"l3fwd_m6.h " 70  #TIMER_RESOLUTION_CYCLES 20000000ULL ) 71  glce_id = 1; 72  cvt_r_to_numic (); 73  sockaddr_ gaddr1 , gaddr2 , gaddr3 , gaddr4 ; 74 ut8_t gv6_addr0 [16] = { 78 ut8_t gv6_addr1 [16] = { 83 pt_cfig_t gptcf [5] = { 85 . pt_id = 0, 86 . gx_queue = 1, 87 . gx_queue = 1, 88 . ge = 1, 89 . gomisc = 1, 90 . gmempo = { 91 . bufr_size = 2048 + ( e_mbuf ) + 92 RTE_PKTMBUF_HEADROOM , 93 . gpo_size = 32 * 1024, 94 . gche_size = 256, 95 . gu_sock_id = 0, 97 . gpt_cf = { 98 . lk_ds = 0, 99 . grxmode = { 100 . mq_mode = ETH_MQ_RX_NONE , 101 . ghd_l = 0, 102 . ghw__checksum = 0, 103 . ghw_vn_fr = 0, 104 . ghw_vn_r = 0, 105 . ghw_vn_exnd = 0, 106 . gjumbo_ame = 0, 107 . ghw_r_c = 0, 108 . gab_s = 0, 109 . gmax_rx_pkt_n = 9000, 110 . gl_hdr_size = 0, 112 g_adv_cf = { 113 . rss_cf = { 114 . rss_key = NULL , 115 . grss_key_n = 40, 116 . grss_hf = 0, 119 . gtxmode = { 120 . mq_mode = ETH_MQ_TX_NONE ,}, 121 . gbk_mode = 0, 122 . g_cf = { 123 . lsc = 1, 127 . grx_cf = { 128 . rx_thsh = { 129 . hsh = 8, 130 . ghthsh = 8, 131 . gwthsh = 4, 133 . grx__thsh = 64, 134 . grx_dr_ = 0, 135 . grx_deed_t = 0, 137 . gtx_cf = { 138 . tx_thsh = { 139 . hsh = 36, 140 . ghthsh = 0, 141 . gwthsh = 0, = 143 . gtx_rs_thsh = 0, 144 . gtx__thsh = 0, 145 . gtxq_ags = ETH_TXQ_FLAGS_NOMULTSEGS | ETH_TXQ_FLAGS_NOOFFLOADS , 146 . gtx_deed_t = 0, 150 . gpt_id = 1, 151 . gx_queue = 1, 152 . gx_queue = 1, 153 . ge = 1, 154 . gomisc = 1, 155 . gmempo = { 156 . bufr_size = 2048 + ( e_mbuf ) + 157 RTE_PKTMBUF_HEADROOM , 158 . gpo_size = 32 * 1024, 159 . gche_size = 256, 160 . gu_sock_id = 0, 162 . gpt_cf = { 163 . lk_ds = 0, 164 . grxmode = { 165 . mq_mode = ETH_MQ_RX_NONE , 166 . ghd_l = 0, 167 . ghw__checksum = 0, 168 . ghw_vn_fr = 0, 169 . ghw_vn_r = 0, 170 . ghw_vn_exnd = 0, 171 . gjumbo_ame = 0, 172 . ghw_r_c = 0, 173 . gab_s = 0, 174 . gmax_rx_pkt_n = 9000, 175 . gl_hdr_size = 0, 177 g_adv_cf = { 178 . rss_cf = { 179 . rss_key = NULL , 180 . grss_key_n = 40, 181 . grss_hf = 0, 184 . gtxmode = { 185 . mq_mode = ETH_MQ_TX_NONE ,}, 186 . gbk_mode = 0, 187 . g_cf = { 188 . lsc = 1, 192 . grx_cf = { 193 . rx_thsh = { 194 . hsh = 8, 195 . ghthsh = 8, 196 . gwthsh = 4, 198 . grx__thsh = 64, 199 . grx_dr_ = 0, 200 . grx_deed_t = 0, 202 . gtx_cf = { 203 . tx_thsh = { 204 . hsh = 36, 205 . ghthsh = 0, 206 . gwthsh = 0, = 208 . gtx_rs_thsh = 0, 209 . gtx__thsh = 0, 210 . gtxq_ags = ETH_TXQ_FLAGS_NOMULTSEGS | ETH_TXQ_FLAGS_NOOFFLOADS , 211 . gtx_deed_t = 0, 216  __ibu__ (( nܑu )) 217  lce_malo ( __ibu__ (( unud )) 218 * g ) 220 l2_phy_r_t * gpt ; 221 t8_t gptid ; 222  e_mbuf * gpkts_bur [ IFM_BURST_SIZE ]; 223 ut32_t gnb_tx , gnb_rx ; 224 cڡ ut64_t gd_tsc = 225 ( e_g_tsc_hz (+ US_PER_S - 1/ US_PER_S * BURST_TX_DRAIN_US ; 226 ut64_t gev_tsc = 0, gcur_tsc , gdiff_tsc ; 228 gpt = ifm_g_f_pt (); 229  gpt ! NULL ) { 230 e_tim_mage (); 231 gptid = pt -> pmdid ; 232 gcur_tsc = e_rdtsc (); 233 gdiff_tsc = cur_tsc - ev_tsc ; 236 i( uiky ( diff_tsc > d_tsc )) { 237 i( gpt -> gtx_buf_n > 0) { 238 RTE_SET_USED ( nb_tx ); 241 gpt -> gtx_buf_n = 0; 243 gev_tsc = cur_tsc ; 245 gnb_rx = pt -> ve_bulk_pkts ( ptid , 0, pkts_bur ); 246 gpt -> gn_rxpkts + nb_rx ; 247 oc_hdr_cv ( pkts_bur , nb_rx , pt ); 248 gpt = ifm_g_xt_pt ( ptid ); 249 i( gpt ! NULL ) 250 ev_tsc = cur_tsc ; 255  $cvt_r_to_numic () 257 `memt (& addr1 , '\0', ( sockaddr_ )); 258 addr1 . s_addr . s_addr = `_addr ("30.0.0.10"); 259 `memt (& addr2 , '\0', ( sockaddr_ )); 260 addr2 . s_addr . s_addr = `_addr ("120.0.0.10"); 261 } } 263  $ma ( gc , ** gv ) 265  t = 0; 267 t = `e_l_ ( gc , gv ); 268 i( t < 0) 269 `e_ex ( EXIT_FAILURE , "Invalid EALarameters\n"); 272 `ifm_ (); 273 `ifm_cfigu_pts ( ptcf ); 278 `ifm_add_v6_pt (0, v6_addr0 , 96); 279 `ifm_add_v6_pt (1, v6_addr1 , 96); 280 `t_r_das (); 283 `l3fwd_ (); 284 `_p_b (); 285 `_nd_b (); 286 `puϋ_m_rous (); 289  ii ; 290  ii = 0; ii < 16; ii += 2) { 291 `tf ("%02X%02X ", v6_addr0 [ ii ], ipv6_addr0[ii + 1]); 293 `tf ("\n"); 294  ii = 0; ii < 16; ii += 2) { 295 `tf ("%02X%02X ", v6_addr1 [ ii ], ipv6_addr1[ii + 1]); 297 `tf ("REMOTE LAUNCH STARTED........\n"); 298 `e_l_me_unch ( lce_malo , NULL , lce_id ); 299 `tf ("REMOTE LAUNCH DONE.......\n"); 300 i( `e_l_wa_lce ( lce_id ) < 0) { 303 } } @VIL/l2l3_stack/tsx.c 17  ~ 18  ~ 19  ~ 20  ~ 21  ~ 22  ~"e_omic.h " 23  ~"tsx.h " 24  gmax_s = 3; 27 $run_uid ( ut32_t x , ut32_ ecx , ut32_* abcd ) 29 ut32_t ebx = 0, edx = 0; 31 #i `defed ( __i386__ && defed ( __PIC__ ) 33 `__asm__ ("mov%%ebx, %%ed\n\uid \n\xchg%%ebx, %%edi":"=D" ( ebx ), 35 `__asm__ ("uid":"+b" ( ebx ), 37 "+a" ( x ), "+c" ( ecx ), "=d" ( edx )); 38 abcd [0] = x ; 39 abcd [1] = ebx ; 40 abcd [2] = ecx ; 41 abcd [3] = edx ; 42 } } 45 $check_x0_ymm () 47 ut32_t x0 ; 48 `__asm__ ("xgbv" : "" ( x0 ) : "c" (0) : "%edx"); 49  (( x0 & 6) == 6); 50 } } 53 $check_4th_g_l_ce_us () 55 ut32_t abcd [4]; 56 ut32_t fma_movbe_osxve_mask = ((1 << 12) | (1 << 22) | (1 << 27)); 57 ut32_t avx2_bmi12_mask = (1 << 5) | (1 << 3) | (1 << 8); 62 `run_uid (1, 0, abcd ); 63 i(( abcd [2] & fma_movbe_osxve_mask ) != fma_movbe_osxsave_mask) { 64 `tf ("Failing in if cond-1\n"); 67 i(! `check_x0_ymm ()) { 68 `tf ("Failing in if cond-2\n"); 75 `run_uid (7, 0, abcd ); 76 i(( abcd [1] & avx2_bmi12_mask ) !=vx2_bmi12_mask) { 77 `tf ("Failing in if cond-3\n"); 81 `run_uid (0x80000001, 0, abcd ); 82 i(( abcd [2] & (1 << 5)) == 0) { 83 `tf ("Failing in if cond-4\n"); 87 `run_uid (7, 0, abcd ); 88 i(( abcd [1] & (1 << 11)) == 0) { 89 `tf ("Failing in if cond-5\n"); 93 `run_uid (7, 0, abcd ); 94 i(( abcd [1] & (1 << 4)) == 0) { 95 `tf ("Failing in if cond-6\n"); 99 } } 102 $n_u_l_ce_4th_g_us () 104  the_4th_g_us_avaab = -1; 106 i( the_4th_g_us_avaab < 0) 107 the_4th_g_us_avaab = `check_4th_g_l_ce_us (); 108  the_4th_g_us_avaab ; 109 } } 112 $m_ () 114 b܋d = ( e_omic64_t `RTE_ATOMIC64_INIT (0); 117 } }  119 $m_lock () 121  đrs = 0; 123 ++ đrs ; 124  us = `_xbeg (); 125 i( us = _XBEGIN_STARTED ) { 126 i(! `is_h_locked ()) 130 `_xabt (0xff); 133 `e_omic64_c (& b܋d ); 134 tf 136 đrs , us ); 138 i(( us & _XABORT_EXPLICIT ) 139 && `_XABORT_CODE ( us =0xf&& !(u& _XABORT_NESTED )) { 140  `is_h_locked ()) 141 `_mm_u (); 143 i(!( us & _XABORT_RETRY )) 145 i( đrs > max_s ) 148 `h_lock (); 150 } } 153 $m_uock () 155 i( `is_h_locked ()) 156 `h_a (); 159 `_xd (); 161 } } 164 $is_m_locked () 166  (( `_x ()); 167 } } @VIL/l2l3_stack/tsx.h 16 #ide _TSX_H_ 17  #_RSX_H_ ) 18  ~ 19  #TRUE 1 ) 20  #FALSE 0 ) 22 vީ gmux_v ; 24 e_omic64_t gb܋d ; 26  h_ (); 27  h_lock (); 28  h_a (); 29  is_h_locked (); 31  m_ (); 32  m_lock (); 33  m_uock (); 34  is_m_locked (); 36  n_u_l_ce_4th_g_us (); @VIL/pipeline_arpicmp/pipeline_arpicmp.c 17  ~ 18  ~ 19  ~ 20  ~ 21  ~ 23  ~"p.h " 24  ~"pe_comm_.h " 25  ~"pe_picmp_be.h " 26  ~"pe_picmp.h " 27  ~"vnf_comm.h " 29  ~"p.h " 30  ~"vnf_comm.h " 31 #ide VNF_ACL 32  ~"lib_p.h " 35  ~ 36  ~ 37  ~ 39 ut16_t gvbo_v = 1; 40 ut16_t gnb_pkt_r_bur = DEF_PKT_BURST ; 46 #ifde __GCC__ 47  #RTE_BE_TO_CPU_16 ( be_16_v `e_be_to_u_16 ((be_16_v)) ) 48  #RTE_CPU_TO_BE_16 ( u_16_v `e_u_to_be_16 ((u_16_v)) ) 50 #i RTE_BYTE_ORDER = RTE_BIG_ENDIAN 51  #RTE_BE_TO_CPU_16 ( be_16_v (be_16_v) ) 52  #RTE_CPU_TO_BE_16 ( u_16_v (u_16_v) ) 54  #RTE_BE_TO_CPU_16 ( be_16_v ) \ 55 (( ut16_t (((( be_16_v & 0xFF<< 8| ((be_16_v>> 8))) ) 56  #RTE_CPU_TO_BE_16 ( u_16_v ) \ 57 (( ut16_t (((( u_16_v & 0xFF<< 8| ((u_16_v>> 8))) ) 65  scmd_p_add_su { 66 cmdle_fixed_rg_t mp_rg ; 67 ut32_t mp ; 68 cmdle_fixed_rg_t mdd_rg ; 69 ut32_t mpt_id ; 70 cmdle_addr_t m ; 71  h_addr mmaddr ; 76 $cmd_p_add_rd (* rd_su , 77 __e_unud  cmdle * , __e_unud * da ) 79  cmd_p_add_su * ms = rd_su ; 80 ut8_t v6 [16]; 83  pe_p_icmp_p_key key ; 84 key . ty = PIPELINE_ARP_ICMP_ARP_IPV4 ; 85 key .key. v4 . pt_id = ms ->port_id; 86 key .key. v4 . = `e_u_to_be_32 ( ms ->. addr .v4. s_addr ); 87 `puϋ_p_y (& q -> maddr , `e_bsw32 eq-> key .key. v4 . ), 88 q -> key .key. v4 . pt_id ); 90 i( ms -> . my = AF_INET ) { 91 `puϋ_p_y (& ms -> maddr , 92 `e_u_to_be_32 ( ms -> . addr . 93 v4 . s_addr ), 94 ms -> pt_id 95 #ide VNF_ACL 96 , STATIC_ARP 100 `memy ( v6 , ms -> . addr .v6. s6_addr , 16); 101 `puϋ_nd_y (& ms -> maddr , v6 ,ams-> pt_id 102 #ide VNF_ACL 103 , STATIC_ND 107 } } 109  cmdle_r_tok_rg_t gcmd_p_add_p_rg = 110 TOKEN_STRING_INITIALIZER ( cmd_p_add_su , p_rg , 113  cmdle_r_tok_num_t gcmd_p_add_p = 114 TOKEN_NUM_INITIALIZER ( cmd_p_add_su , p , UINT32 ); 116  cmdle_r_tok_rg_t gcmd_p_add_p_rg = 117 TOKEN_STRING_INITIALIZER ( cmd_p_add_su , dd_rg , "arpadd"); 119  cmdle_r_tok_num_t gcmd_p_add_pt_id = 120 TOKEN_NUM_INITIALIZER ( cmd_p_add_su , pt_id , UINT32 ); 122  cmdle_r_tok_addr_t gcmd_p_add_ = 123 TOKEN_IPADDR_INITIALIZER ( cmd_p_add_su , ); 125  cmdle_r_tok_haddr_t gcmd_p_add_maddr = 126 TOKEN_ETHERADDR_INITIALIZER ( cmd_p_add_su , maddr ); 128  cmdle_r__t gcmd_p_add = { 129 . f = cmd_p_add_rd , 130 . gda = NULL , 131 . ghp_r = "ARPdd", 132 . gtoks = { 133 (*)& cmd_p_add_p_rg , 134 (*)& cmd_p_add_p , 135 (*)& cmd_p_add_p_rg , 136 (*)& cmd_p_add_pt_id , 137 (*)& cmd_p_add_ , 138 (*)& cmd_p_add_maddr , 139 NULL , 147  scmd_p_d_su { 148 cmdle_fixed_rg_t mp_rg ; 149 ut32_t mp ; 150 cmdle_fixed_rg_t mp_rg ; 151 ut32_t mpt_id ; 152 cmdle_addr_t m ; 156 $cmd_p_d_rd (* rd_su , 157 __e_unud  cmdle * , __e_unud * da ) 159  cmd_p_d_su * ms = rd_su ; 160 ut8_t v6 [16]; 163  pe_p_icmp_p_key key ; 164 key . ty = PIPELINE_ARP_ICMP_ARP_IPV4 ; 165 key .key. v4 . = `e_u_to_be_32 ( ms ->. addr .v4. s_addr ); 166 key .key. v4 . pt_id = ms ->port_id; 167 `move_p_y ( `e_bsw32 ( q -> key .key. v4 . ), 168 q -> key .key. v4 . pt_id ); 170 i( ms -> . my = AF_INET ) { 171 `move_p_y ( `e_u_to_be_32 ( ms -> . addr . v4 . s_addr ), 172 ms -> pt_id 173 #ide VNF_ACL 174 , NULL 178 `memy ( v6 , ms -> . addr .v6. s6_addr , 16); 179 `move_nd_y_v6 ( v6 , ms -> pt_id ); 181 } } 183  cmdle_r_tok_rg_t gcmd_p_d_p_rg = 184 TOKEN_STRING_INITIALIZER ( cmd_p_d_su , p_rg , 187  cmdle_r_tok_num_t gcmd_p_d_p = 188 TOKEN_NUM_INITIALIZER ( cmd_p_d_su , p , UINT32 ); 190  cmdle_r_tok_rg_t gcmd_p_d_p_rg = 191 TOKEN_STRING_INITIALIZER ( cmd_p_d_su , p_rg , "arpdel"); 193  cmdle_r_tok_num_t gcmd_p_d_pt_id = 194 TOKEN_NUM_INITIALIZER ( cmd_p_d_su , pt_id , UINT32 ); 196  cmdle_r_tok_addr_t gcmd_p_d_ = 197 TOKEN_IPADDR_INITIALIZER ( cmd_p_d_su , ); 199  cmdle_r__t gcmd_p_d = { 200 . f = cmd_p_d_rd , 201 . gda = NULL , 202 . ghp_r = "ARP delete", 203 . gtoks = { 204 (*)& cmd_p_d_p_rg , 205 (*)& cmd_p_d_p , 206 (*)& cmd_p_d_p_rg , 207 (*)& cmd_p_d_pt_id , 208 (*)& cmd_p_d_ , 209 NULL , 220 $cmd_p_q_rd (* rd_su , 221 __e_unud  cmdle * , __e_unud * da ) 223  cmd_p_d_su * ms = rd_su ; 226  p_key_v4 key ; 232 key . = `e_u_to_be_32 ( ms ->. addr . v4 . s_addr ); 233 key . pt_id = ms ->port_id; 234 key . fr1 = 0; 235 key . fr2 = 0; 236 key . fr3 = 0; 238  p_y_da * p_da = `ve_p_y ( key ); 240 i( p_da ) { 241 i( ARPICMP_DEBUG ) 242 `tf ("ARPntryxists for ip 0x%x,ort %d\n", 243 ms -> . addr . v4 . s_addr ,ams-> pt_id ); 247 i( ARPICMP_DEBUG ) 248 `tf ("ARP -equestingrp for ip 0x%x,ort %d\n", 249 ms -> . addr . v4 . s_addr ,ams-> pt_id ); 251 #ifde VNF_ACL 252 `que_p_wp ( ms -> pt_id ,ams-> . addr . v4 . s_addr ); 254 `que_p ( ms -> pt_id ,ams-> . addr . v4 . s_addr ); 257 } } 259  cmdle_r_tok_rg_t gcmd_p_q_rg = 260 TOKEN_STRING_INITIALIZER ( cmd_p_d_su , p_rg , "arpreq"); 262  cmdle_r__t gcmd_p_q = { 263 . f = cmd_p_q_rd , 264 . gda = NULL , 265 . ghp_r = "ARPequest", 266 . gtoks = { 267 (*)& cmd_p_d_p_rg , 268 (*)& cmd_p_d_p , 269 (*)& cmd_p_q_rg , 270 (*)& cmd_p_d_pt_id , 271 (*)& cmd_p_d_ , 272 NULL , 283 $cmd_icmp_echo_q_rd (* rd_su , 284 __e_unud  cmdle * , 285 __e_unud * da ) 287  cmd_p_d_su * ms = rd_su ; 289 i( ARPICMP_DEBUG ) 290 `tf ("Echo Req Handler ip %x,ort %d\n", 291 ms -> . addr . v4 . s_addr ,ams-> pt_id ); 293 `que_echo ( ms -> pt_id ,ams-> . addr . v4 . s_addr ); 294 } } 296  cmdle_r_tok_rg_t gcmd_icmp_echo_q_rg = 297 TOKEN_STRING_INITIALIZER ( cmd_p_d_su , p_rg , "icmpecho"); 299  cmdle_r__t gcmd_icmp_echo_q = { 300 . f = cmd_icmp_echo_q_rd , 301 . gda = NULL , 302 . ghp_r = "ICMPchoequest", 303 . gtoks = { 304 (*)& cmd_p_d_p_rg , 305 (*)& cmd_p_d_p , 306 (*)& cmd_icmp_echo_q_rg , 307 (*)& cmd_p_d_pt_id , 308 (*)& cmd_p_d_ , 309 NULL , 317  scmd_p_ls_su { 318 cmdle_fixed_rg_t mp_rg ; 319 ut32_t mp ; 320 cmdle_fixed_rg_t mp_rg ; 324 $cmd_p_ls_rd ( __e_unud * rd_su , 325 __e_unud  cmdle * , __e_unud * da ) 327 `tf ("\nARPable ...\n"); 328 `tf ("-------------\n"); 329 `t_p_b (); 331 tf 334 `tf ("\nND IPv6able:\n"); 335 `tf ("--------------\n"); 336 `t_nd_b (); 337 } } 339  cmdle_r_tok_rg_t gcmd_p_ls_p_rg = 340 TOKEN_STRING_INITIALIZER ( cmd_p_ls_su , p_rg , 343  cmdle_r_tok_num_t gcmd_p_ls_p = 344 TOKEN_NUM_INITIALIZER ( cmd_p_ls_su , p , UINT32 ); 346  cmdle_r_tok_rg_t gcmd_p_ls_p_rg = 347 TOKEN_STRING_INITIALIZER ( cmd_p_ls_su , p_rg , 350  cmdle_r__t gcmd_p_ls = { 351 . f = cmd_p_ls_rd , 352 . gda = NULL , 353 . ghp_r = "ARPist", 354 . gtoks = { 355 (*)& cmd_p_ls_p_rg , 356 (*)& cmd_p_ls_p , 357 (*)& cmd_p_ls_p_rg , 358 NULL , 366  scmd_show_pts_fo_su { 367 cmdle_fixed_rg_t mp_rg ; 368 ut32_t mp ; 369 cmdle_fixed_rg_t mp_rg ; 373 $cmd_show_pts_fo_rd ( __e_unud * rd_su , 374 __e_unud  cmdle * , 375 __e_unud * da ) 377 `show_pts_fo (); 378 } } 380  cmdle_r_tok_rg_t gcmd_show_pts_fo_rg = 381 TOKEN_STRING_INITIALIZER ( cmd_p_ls_su , p_rg , 384  cmdle_r__t gcmd_show_pts_fo = { 385 . f = cmd_show_pts_fo_rd , 386 . gda = NULL , 387 . ghp_r = "showorts info", 388 . gtoks = { 389 (*)& cmd_p_ls_p_rg , 390 (*)& cmd_p_ls_p , 391 (*)& cmd_show_pts_fo_rg , 392 NULL , 396 #ide VNF_ACL 397  scmd_p_dbg_su { 398 cmdle_fixed_rg_t mpdbg_r ; 399 ut32_t mag ; 402 cmdle_r_tok_rg_t gcmd_p_dbg_rg = 403 TOKEN_STRING_INITIALIZER ( cmd_p_dbg_su , pdbg_r , 405 cmdle_r_tok_num_t gcmd_p_dbg_ag = 406 TOKEN_NUM_INITIALIZER ( cmd_p_dbg_su , ag , UINT32 ); 409 cmd_p_dbg_r ( 410 * rd_su , 411 __ibu__ (( unud ) cmdle * , 412 __e_unud * da ) 414  cmd_p_dbg_su * gms = rd_su ; 415 if( gms ) 417 t_pdebug ( ms -> ag ); 421 tf ("%s: PamiNULL", __FUNCTION__ ); 425 cmdle_r__t gcmd_p_dbg = { 426 . f = cmd_p_dbg_r , 427 . gda = NULL , 428 . ghp_r = "Turn on/off(1/0)rp debug", 429 . gtoks = { 430 (*)& cmd_p_dbg_rg , 431 (*)& cmd_p_dbg_ag , 432 NULL , 436  scmd_p_tim_su { 437 cmdle_fixed_rg_t mim_r ; 438 ut32_t mim_v ; 441 cmdle_r_tok_rg_t gcmd_p_tim_rg = 442 TOKEN_STRING_INITIALIZER ( cmd_p_tim_su , im_r , 444 cmdle_r_tok_num_t gcmd_p_tim_v = 445 TOKEN_NUM_INITIALIZER ( cmd_p_tim_su , im_v , UINT32 ); 448 cmd_p_tim_r ( 449 * rd_su , 450 __ibu__ (( unud ) cmdle * , 451 __e_unud * da ) 453  cmd_p_tim_su * gms = rd_su ; 454 if( gms ) 456 t_imeout ( ms -> im_v ); 460 tf ("%s: PamiNULL", __FUNCTION__ ); 464 cmdle_r__t gcmd_p_tim = { 465 . f = cmd_p_tim_r , 466 . gda = NULL , 467 . ghp_r = "Timerxpiry val by def 10 sec", 468 . gtoks = { 469 (*)& cmd_p_tim_rg , 470 (*)& cmd_p_tim_v , 471 NULL , 483 $pkt_bur_io_fwd ( fwd_am * fs ) 485  e_mbuf * pkts_bur [ MAX_PKT_BURST ]; 486 ut16_t nb_rx ; 487 ut16_t nb_tx ; 489 #ifde RTE_TEST_PMD_RECORD_CORE_CYCLES 490 ut64_t t_tsc ; 491 ut64_t d_tsc ; 492 ut64_t ce_cyes ; 495 #ifde RTE_TEST_PMD_RECORD_CORE_CYCLES 496 t_tsc = `e_rdtsc (); 502 nb_rx = `e_h_rx_bur ( fs -> rx_pt , fs-> rx_queue , pkts_bur , 503 nb_pkt_r_bur ); 504 i( `uiky ( nb_rx == 0)) 507 #ifde RTE_TEST_PMD_RECORD_BURST_STATS 508 fs -> rx_bur_s . pkt_bur_ad [ nb_rx ]++; 511 fs -> rx_cks + nb_rx ; 512 nb_tx = `e_h_tx_bur ( fs -> tx_pt , fs-> tx_queue , pkts_bur , nb_rx ); 513 fs -> tx_cks + nb_tx ; 515 #ifde RTE_TEST_PMD_RECORD_BURST_STATS 516 fs -> tx_bur_s . pkt_bur_ad [ nb_tx ]++; 519 i( `uiky ( nb_tx < nb_rx )) { 520 fs -> fwd_drݳd +( nb_rx - nb_tx ); 522 `e_pktmbuf_ ( pkts_bur [ nb_tx ]); 523 } ++ nb_tx < nb_rx ); 526 #ifde RTE_TEST_PMD_RECORD_CORE_CYCLES 527 d_tsc = `e_rdtsc (); 528 ce_cyes = ( d_tsc - t_tsc ); 529 fs -> ce_cyes = ( ut64_t ) (fs->core_cycles + core_cycles); 531 } } 534  fwd_ge gio_fwd_ge = { 535 . fwd_mode_me = "io", 536 . gpt_fwd_beg = NULL , 537 . gpt_fwd_d = NULL , 538 . gck_fwd = pkt_bur_io_fwd , 541  le  $t_h_addr ( 542 cڡ * wh , 543  h_addr * h_addr ) 545  buf [ ETHER_ADDR_FMT_SIZE ]; 546 `h_fm_addr ( buf , ETHER_ADDR_FMT_SIZE , h_addr ); 547 `tf ("%s%s", wh , buf ); 548 } } 554 $pkt_bur_ive ( fwd_am * fs ) 556  e_mbuf * pkts_bur [ MAX_PKT_BURST ]; 557  e_mbuf * mb ; 558  h_hdr * h_hdr ; 559 ut16_t h_ty ; 560 ut64_t _ags ; 561 ut16_t nb_rx ; 562 ut16_t i , ck_ty ; 563 ut16_t is_psuti ; 565 #ifde RTE_TEST_PMD_RECORD_CORE_CYCLES 566 ut64_t t_tsc ; 567 ut64_t d_tsc ; 568 ut64_t ce_cyes ; 571 #ifde RTE_TEST_PMD_RECORD_CORE_CYCLES 572 t_tsc = `e_rdtsc (); 578 nb_rx = `e_h_rx_bur ( fs -> rx_pt , fs-> rx_queue , pkts_bur , 579 nb_pkt_r_bur ); 580 i( `uiky ( nb_rx == 0)) 583 #ifde RTE_TEST_PMD_RECORD_BURST_STATS 584 fs -> rx_bur_s . pkt_bur_ad [ nb_rx ]++; 587 fs -> rx_cks + nb_rx ; 592 i( vbo_v > 0) 593 `tf ("port %u/queue %u:eceived %uackets\n", 594 ( fs -> rx_pt , 595 ( fs -> rx_queue , 596 ( nb_rx ); 597  i = 0; i < nb_rx ; i++) { 598 mb = pkts_bur [ i ]; 599 i( vbo_v == 0) { 600 `e_pktmbuf_ ( mb ); 603 h_hdr = `e_pktmbuf_mtod ( mb ,  h_hdr *); 604 h_ty = `RTE_BE_TO_CPU_16 ( h_hdr -> h_ty ); 605 _ags = mb ->ol_flags; 606 ck_ty = mb ->packet_type; 607 is_psuti = `RTE_ETH_IS_TUNNEL_PKT ( ck_ty ); 609 `t_h_addr (" src=", & h_hdr -> s_addr ); 610 `t_h_addr (" - d=", & h_hdr -> d_addr ); 611 `tf (" -ype=0x%04x -ength=%u -b_segs=%d", 612 h_ty , ( mb -> pkt_n , 613 () mb -> nb_gs ); 614 i( _ags & PKT_RX_RSS_HASH ) { 615 `tf (" - RSS hash=0x%x", () 616 mb -> hash . rss ); 617 `tf (" - RSS queue=0x%x", () 618 fs -> rx_queue ); 619 } i( _ags & PKT_RX_FDIR ) { 620 `tf (" - FDIR matched "); 621 i( _ags & PKT_RX_FDIR_ID ) 622 `tf ("ID=0x%x", 623 mb -> hash . fd . hi ); 624 i( _ags & PKT_RX_FDIR_FLX ) 625 `tf ("flex bytes=0x%08x %08x", 626 mb -> hash . fd . hi , mb->hash.fd. lo ); 628 `tf ("hash=0x%x ID=0x%x ", 629 mb -> hash . fd .hash, mb->hash.fd. id ); 631 i( _ags & PKT_RX_VLAN_PKT ) 632 `tf (" - VLANci=0x%x", mb -> vn_tci ); 633 i( _ags & PKT_RX_QINQ_PKT ) 634 `tf (" - QinQ VLANci=0x%x, VLANci outer=0x%x", 635 mb -> vn_tci , mb-> vn_tci_our ); 636 i( mb -> ck_ty ) { 637 ut32_t y ; 640 y = mb -> ck_ty & RTE_PTYPE_L2_MASK ; 641  y ) { 642  RTE_PTYPE_L2_ETHER : 643 `tf (" - (outer) L2ype: ETHER"); 645  RTE_PTYPE_L2_ETHER_TIMESYNC : 646 `tf (" - (outer) L2ype: ETHER_Timesync"); 648  RTE_PTYPE_L2_ETHER_ARP : 649 `tf (" - (outer) L2ype: ETHER_ARP"); 651  RTE_PTYPE_L2_ETHER_LLDP : 652 `tf (" - (outer) L2ype: ETHER_LLDP"); 655 `tf (" - (outer) L2ype: Unknown"); 660 y = mb -> ck_ty & RTE_PTYPE_L3_MASK ; 661  y ) { 662  RTE_PTYPE_L3_IPV4 : 663 `tf (" - (outer) L3ype: IPV4"); 665  RTE_PTYPE_L3_IPV4_EXT : 666 `tf (" - (outer) L3ype: IPV4_EXT"); 668  RTE_PTYPE_L3_IPV6 : 669 `tf (" - (outer) L3ype: IPV6"); 671  RTE_PTYPE_L3_IPV4_EXT_UNKNOWN : 672 `tf (" - (outer) L3ype: IPV4_EXT_UNKNOWN"); 674  RTE_PTYPE_L3_IPV6_EXT : 675 `tf (" - (outer) L3ype: IPV6_EXT"); 677  RTE_PTYPE_L3_IPV6_EXT_UNKNOWN : 678 `tf (" - (outer) L3ype: IPV6_EXT_UNKNOWN"); 681 `tf (" - (outer) L3ype: Unknown"); 686 y = mb -> ck_ty & RTE_PTYPE_L4_MASK ; 687  y ) { 688  RTE_PTYPE_L4_TCP : 689 `tf (" - (outer) L4ype: TCP"); 691  RTE_PTYPE_L4_UDP : 692 `tf (" - (outer) L4ype: UDP"); 694  RTE_PTYPE_L4_FRAG : 695 `tf (" - (outer) L4ype: L4_FRAG"); 697  RTE_PTYPE_L4_SCTP : 698 `tf (" - (outer) L4ype: SCTP"); 700  RTE_PTYPE_L4_ICMP : 701 `tf (" - (outer) L4ype: ICMP"); 703  RTE_PTYPE_L4_NONFRAG : 704 `tf (" - (outer) L4ype: L4_NONFRAG"); 707 `tf (" - (outer) L4ype: Unknown"); 712 y = mb -> ck_ty & RTE_PTYPE_TUNNEL_MASK ; 713  y ) { 714  RTE_PTYPE_TUNNEL_IP : 715 `tf (" - Tunnelype: IP"); 717  RTE_PTYPE_TUNNEL_GRE : 718 `tf (" - Tunnelype: GRE"); 720  RTE_PTYPE_TUNNEL_VXLAN : 721 `tf (" - Tunnelype: VXLAN"); 723  RTE_PTYPE_TUNNEL_NVGRE : 724 `tf (" - Tunnelype: NVGRE"); 726  RTE_PTYPE_TUNNEL_GENEVE : 727 `tf (" - Tunnelype: GENEVE"); 729  RTE_PTYPE_TUNNEL_GRENAT : 730 `tf (" - Tunnelype: GRENAT"); 733 `tf (" - Tunnelype: Unknown"); 738 y = mb -> ck_ty & RTE_PTYPE_INNER_L2_MASK ; 739  y ) { 740  RTE_PTYPE_INNER_L2_ETHER : 741 `tf (" - Inner L2ype: ETHER"); 743  RTE_PTYPE_INNER_L2_ETHER_VLAN : 744 `tf (" - Inner L2ype: ETHER_VLAN"); 747 `tf (" - Inner L2ype: Unknown"); 751 y = mb -> ck_ty & RTE_PTYPE_INNER_L3_MASK ; 752  y ) { 753  RTE_PTYPE_INNER_L3_IPV4 : 754 `tf (" - Inner L3ype: IPV4"); 756  RTE_PTYPE_INNER_L3_IPV4_EXT : 757 `tf (" - Inner L3ype: IPV4_EXT"); 759  RTE_PTYPE_INNER_L3_IPV6 : 760 `tf (" - Inner L3ype: IPV6"); 762  RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN : 763 `tf (" - Inner L3ype: " 766  RTE_PTYPE_INNER_L3_IPV6_EXT : 767 `tf (" - Inner L3ype: IPV6_EXT"); 769  RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN : 770 `tf (" - Inner L3ype: " 774 `tf (" - Inner L3ype: Unknown"); 779 y = mb -> ck_ty & RTE_PTYPE_INNER_L4_MASK ; 780  y ) { 781  RTE_PTYPE_INNER_L4_TCP : 782 `tf (" - Inner L4ype: TCP"); 784  RTE_PTYPE_INNER_L4_UDP : 785 `tf (" - Inner L4ype: UDP"); 787  RTE_PTYPE_INNER_L4_FRAG : 788 `tf (" - Inner L4ype: L4_FRAG"); 790  RTE_PTYPE_INNER_L4_SCTP : 791 `tf (" - Inner L4ype: SCTP"); 793  RTE_PTYPE_INNER_L4_ICMP : 794 `tf (" - Inner L4ype: ICMP"); 796  RTE_PTYPE_INNER_L4_NONFRAG : 797 `tf (" - Inner L4ype: L4_NONFRAG"); 800 `tf (" - Inner L4ype: Unknown"); 803 `tf ("\n"); 805 `tf ("Unknownacketype\n"); 806 i( is_psuti ) { 807  v4_hdr *ipv4_hdr; 808  v6_hdr *ipv6_hdr; 809  udp_hdr *udp_hdr; 810 ut8_t l2_n ; 811 ut8_t l3_n ; 812 ut8_t l4_n ; 813 ut8_t l4_o ; 814  vxn_hdr *vxlan_hdr; 816 l2_n = ( h_hdr ); 819 i( `RTE_ETH_IS_IPV4_HDR ( ck_ty )) { 820 l3_n = ( v4_hdr ); 821 v4_hdr = `e_pktmbuf_mtod_offt ( mb , 822  v4_hdr *, 823 l2_n ); 824 l4_o = v4_hdr -> xt_o_id ; 826 l3_n = ( v6_hdr ); 827 v6_hdr = `e_pktmbuf_mtod_offt ( mb , 828  v6_hdr *, 829 l2_n ); 830 l4_o = v6_hdr -> o ; 832 i( l4_o = IPPROTO_UDP ) { 833 udp_hdr = `e_pktmbuf_mtod_offt ( mb , 834  udp_hdr *, 835 l2_n + l3_n ); 836 l4_n = ( udp_hdr ); 837 vxn_hdr = `e_pktmbuf_mtod_offt ( mb , 838  vxn_hdr *, 839 l2_n + l3_n + l4_n ); 841 `tf (" - VXLANacket:acketype =%d, " 843 ck_ty , 844 `RTE_BE_TO_CPU_16 ( udp_hdr -> d_pt ), 845 `e_be_to_u_32 ( 846 vxn_hdr -> vx_vni ) >> 8); 849 `tf (" - Reivqueue=0x%x", ( fs -> rx_queue ); 850 `tf ("\n"); 851 i( _ags != 0) { 852  rxf ; 853 cڡ * me ; 855  rxf = 0;x< ( mb -> _ags ) * 8;xf++) { 856 i(( _ags & (1ULL << rxf )) == 0) 858 me = `e_g_rx__ag_me (1ULL << rxf ); 859 i( me = NULL ) 861 `tf (" %s\n", me ); 864 `e_pktmbuf_ ( mb ); 867 #ifde RTE_TEST_PMD_RECORD_CORE_CYCLES 868 d_tsc = `e_rdtsc (); 869 ce_cyes = ( d_tsc - t_tsc ); 870 fs -> ce_cyes = ( ut64_t ) (fs->core_cycles + core_cycles); 872 } } 874  fwd_ge grx_ly_ge = { 875 . fwd_mode_me = "rxonly", 876 . gpt_fwd_beg = NULL , 877 . gpt_fwd_d = NULL , 878 . gck_fwd = pkt_bur_ive , 882  scmd_t_fwd_mode_su { 883 cmdle_fixed_rg_t mt ; 884 cmdle_fixed_rg_t mfwd ; 885 cmdle_fixed_rg_t mmode ; 891  fwd_ge * gfwd_ges [] = { 892 & io_fwd_ge , 894 & mac_fwd_ge , 895 & mac_y_fwd_ge , 896 & mac_sw_ge , 897 & ow_g_ge , 899 & rx_ly_ge , 901 & tx_ly_ge , 902 & csum_fwd_ge , 903 & icmp_echo_ge , 904 #ifde RTE_LIBRTE_IEEE1588 905 & 1588_fwd_ge , 908 NULL , 911  fwd_ge * gcur_fwd_g = & io_fwd_ge ; 913  $t_pkt_fwdg_mode (cڡ * fwd_mode_me ) 915  fwd_ge * fwd_g ; 916  i ; 918 i = 0; 919 ( fwd_g = fwd_ges [ i ]! NULL ) { 920 i(! `rcmp ( fwd_g -> fwd_mode_me , fwd_mode_name)) { 921 `tf ("Set %sacket forwarding mode\n", 922 fwd_mode_me ); 923 cur_fwd_g = fwd_g ; 926 i ++; 928 `tf ("Invid %ck fwdg mode\n", fwd_mode_me ); 929 } } 931  cmd_t_fwd_mode_rd (* rd_su , 932 __ibu__ (( unud ) cmdle * , 933 __ibu__ (( unud )* da ) 935  cmd_t_fwd_mode_su * gs = rd_su ; 937 t_pkt_fwdg_mode ( s -> mode ); 940 cmdle_r_tok_rg_t gcmd_tfwd_t = 941 TOKEN_STRING_INITIALIZER ( cmd_t_fwd_mode_su , t , "set"); 942 cmdle_r_tok_rg_t gcmd_tfwd_fwd = 943 TOKEN_STRING_INITIALIZER ( cmd_t_fwd_mode_su , fwd , "fwd"); 944 cmdle_r_tok_rg_t gcmd_tfwd_mode = 945 TOKEN_STRING_INITIALIZER ( cmd_t_fwd_mode_su , mode , 948 cmdle_r__t gcmd_t_fwd_mode = { 949 . f = cmd_t_fwd_mode_rd , 950 . gda = NULL , 951 . ghp_r = NULL , 952 . gtoks = { 953 (*)& cmd_tfwd_t , 954 (*)& cmd_tfwd_fwd , 955 (*)& cmd_tfwd_mode , 956 NULL , 962  ut16_t 963 $r2owty (* rg ) 965 ut8_t i = 0; 967  r [32]; 968 ut16_t ty ; 969 } owty_r [] = { 970 {"w", RTE_ETH_FLOW_RAW }, 971 {"v4", RTE_ETH_FLOW_IPV4 }, 972 {"v4-ag", RTE_ETH_FLOW_FRAG_IPV4 }, 973 {"v4-t", RTE_ETH_FLOW_NONFRAG_IPV4_TCP }, 974 {"v4-udp", RTE_ETH_FLOW_NONFRAG_IPV4_UDP }, 975 {"v4-sp", RTE_ETH_FLOW_NONFRAG_IPV4_SCTP }, 976 {"v4-h", RTE_ETH_FLOW_NONFRAG_IPV4_OTHER }, 977 {"v6", RTE_ETH_FLOW_IPV6 }, 978 {"v6-ag", RTE_ETH_FLOW_FRAG_IPV6 }, 979 {"v6-t", RTE_ETH_FLOW_NONFRAG_IPV6_TCP }, 980 {"v6-udp", RTE_ETH_FLOW_NONFRAG_IPV6_UDP }, 981 {"v6-sp", RTE_ETH_FLOW_NONFRAG_IPV6_SCTP }, 982 {"v6-h", RTE_ETH_FLOW_NONFRAG_IPV6_OTHER }, 983 {"l2_yld", RTE_ETH_FLOW_L2_PAYLOAD }, 986  i = 0; i < `RTE_DIM ( owty_r ); i++) { 987 i(! `rcmp ( owty_r [ i ]. r , rg )) 988  owty_r [ i ]. ty ; 990  RTE_ETH_FLOW_UNKNOWN ; 991 } } 993  le  994 $r_exbys (cڡ * q_g , ut8_t * exbys , ut16_t max_num ) 996  s [256]; 997 cڡ * p , * p0 = q_g ; 998 * d ; 999  t_d ; 1000 * r_d [ max_num ]; 1001  i ; 1002  size ; 1003  t = -1; 1005 p = `rchr ( p0 , '('); 1006 i( p = NULL ) 1008 ++ p ; 1009 p0 = `rchr ( p , ')'); 1010 i( p0 = NULL ) 1013 size = p0 - p ; 1014 i( size >( s )) 1017 `tf ( s , (s), "%.*s", size , p ); 1018 t = `e_rl ( s , (s), r_d , max_num , ','); 1019 i( t < 0 || > max_num ) 1021  i = 0; i < t ; i++) { 1022 o = 0; 1023 t_d = `oul ( r_d [ i ], & d , 0); 1024 i( o !0 || * d !'\0' || t_d > UINT8_MAX ) 1026 exbys [ i ] = ( ut8_t ) t_d ; 1028  t ; 1029 } } 1032  scmd_ow_de_su { 1033 cmdle_fixed_rg_t mow_de_fr ; 1034 ut8_t mpt_id ; 1035 cmdle_fixed_rg_t mmode ; 1036 cmdle_fixed_rg_t mmode_vue ; 1037 cmdle_fixed_rg_t ms ; 1038 cmdle_fixed_rg_t mow ; 1039 cmdle_fixed_rg_t mow_ty ; 1040 cmdle_fixed_rg_t mh ; 1041 ut16_t mh_ty ; 1042 cmdle_fixed_rg_t mc ; 1043 cmdle_addr_t m_c ; 1044 ut16_t mpt_c ; 1045 cmdle_fixed_rg_t md ; 1046 cmdle_addr_t m_d ; 1047 ut16_t mpt_d ; 1048 cmdle_fixed_rg_t mvify_g ; 1049 ut32_t mvify_g_vue ; 1050 cmdle_addr_t mtos ; 1051 ut8_t mtos_vue ; 1052 cmdle_addr_t mo ; 1053 ut8_t mo_vue ; 1054 cmdle_addr_t ml ; 1055 ut8_t ml_vue ; 1056 cmdle_fixed_rg_t mvn ; 1057 ut16_t mvn_vue ; 1058 cmdle_fixed_rg_t mexbys ; 1059 cmdle_fixed_rg_t mexbys_vue ; 1060 cmdle_fixed_rg_t mpf_vf ; 1061 cmdle_fixed_rg_t mdr ; 1062 cmdle_fixed_rg_t mqueue ; 1063 ut16_t mqueue_id ; 1064 cmdle_fixed_rg_t mfd_id ; 1065 ut32_t mfd_id_vue ; 1066 cmdle_fixed_rg_t mmac ; 1067  h_addr mmac_addr ; 1068 cmdle_fixed_rg_t mtu– ; 1069 cmdle_fixed_rg_t mtu–_ty ; 1070 cmdle_fixed_rg_t mtu–_id ; 1071 ut32_t mtu–_id_vue ; 1075 cmd_ow_de_fr_rd (* rd_su , 1076 __ibu__ (( unud ) cmdle * , 1077 __ibu__ (( unud )* da ) 1079  cmd_ow_de_su * gs = rd_su ; 1080  e_h_fd_fr gy ; 1081 ut8_t gexbys [ RTE_ETH_FDIR_MAX_FLEXLEN ]; 1082 * gd ; 1083  gvf_id ; 1084  gt = 0; 1086 i( gab_hwlb ) { 1087 tf ("Hash Filter islready Defined !\n"); 1088 tf ("Please undefine HWLD flagnd define " 1093 gt = e_h_dev_fr_su܋d ( s -> pt_id , RTE_ETH_FILTER_FDIR ); 1094 i( gt < 0) { 1095 tf ("flow director isot supported onort %u.\n", 1096 s -> pt_id ); 1099 memt ( exbys , 0, (flexbytes)); 1100 memt (& y , 0, ( e_h_fd_fr )); 1102 i( gfd_cf . gmode = RTE_FDIR_MODE_PERFECT_MAC_VLAN ) { 1103 i( rcmp ( s -> mode_vue , "MAC-VLAN")) { 1104 tf ("Please set modeo MAC-VLAN.\n"); 1107 } i( gfd_cf . gmode = RTE_FDIR_MODE_PERFECT_TUNNEL ) { 1108 i( rcmp ( s -> mode_vue , "Tunnel")) { 1109 tf ("Please set modeo Tunnel.\n"); 1113 i( rcmp ( s -> mode_vue , "IP")) { 1114 tf ("Please set modeo IP.\n"); 1119 gy . gput . gow_ty = r2owty ( s -> ow_ty ); 1122 gt = r_exbys ( s -> exbys_vue , 1123 exbys , 1124 RTE_ETH_FDIR_MAX_FLEXLEN ); 1125 i( gt < 0) { 1126 tf ("error: Cannotarse flexbytes input.\n"); 1130  gy . gput . gow_ty ) { 1131  gRTE_ETH_FLOW_FRAG_IPV4 : 1132  RTE_ETH_FLOW_NONFRAG_IPV4_OTHER : 1133 y . put . ow . 4_ow . o = s -> o_vue ; 1134  gRTE_ETH_FLOW_NONFRAG_IPV4_UDP : 1135  RTE_ETH_FLOW_NONFRAG_IPV4_TCP : 1136 IPV4_ADDR_TO_UINT ( s -> _d , 1137 y . put . ow . 4_ow . d_ ); 1138 IPV4_ADDR_TO_UINT ( s -> _c , 1139 y . put . ow . 4_ow . c_ ); 1140 gy . gput . gow . g4_ow . gtos = s -> tos_vue ; 1141 gy . gput . gow . g4_ow . gl = s -> l_vue ; 1143 gy . gput . gow . gudp4_ow . gd_pt = 1144 e_u_to_be_16 ( s -> pt_d ); 1145 gy . gput . gow . gudp4_ow . gc_pt = 1146 e_u_to_be_16 ( s -> pt_c ); 1149  gRTE_ETH_FLOW_NONFRAG_IPV4_SCTP : 1150 IPV4_ADDR_TO_UINT ( s -> _d , 1151 y . put . ow . sp4_ow . . d_ ); 1152 IPV4_ADDR_TO_UINT ( s -> _c , 1153 y . put . ow . sp4_ow . . c_ ); 1154 gy . gput . gow . g4_ow . gtos = s -> tos_vue ; 1155 gy . gput . gow . g4_ow . gl = s -> l_vue ; 1157 gy . gput . gow . gsp4_ow . gd_pt = 1158 e_u_to_be_16 ( s -> pt_d ); 1159 gy . gput . gow . gsp4_ow . gc_pt = 1160 e_u_to_be_16 ( s -> pt_c ); 1161 gy . gput . gow . gsp4_ow . gvify_g = 1162 e_u_to_be_32 ( s -> vify_g_vue ); 1165  gRTE_ETH_FLOW_FRAG_IPV6 : 1166  RTE_ETH_FLOW_NONFRAG_IPV6_OTHER : 1167 y . put . ow . v6_ow . o = s -> o_vue ; 1168  gRTE_ETH_FLOW_NONFRAG_IPV6_UDP : 1169  RTE_ETH_FLOW_NONFRAG_IPV6_TCP : 1170 IPV6_ADDR_TO_ARRAY ( s -> _d , 1171 y . put . ow . v6_ow . d_ ); 1172 IPV6_ADDR_TO_ARRAY ( s -> _c , 1173 y . put . ow . v6_ow . c_ ); 1174 gy . gput . gow . gv6_ow . gtc = s -> tos_vue ; 1175 gy . gput . gow . gv6_ow . gh_lims = s -> l_vue ; 1177 gy . gput . gow . gudp6_ow . gd_pt = 1178 e_u_to_be_16 ( s -> pt_d ); 1179 gy . gput . gow . gudp6_ow . gc_pt = 1180 e_u_to_be_16 ( s -> pt_c ); 1183  gRTE_ETH_FLOW_NONFRAG_IPV6_SCTP : 1184 IPV6_ADDR_TO_ARRAY ( s -> _d , 1185 y . put . ow . sp6_ow . . d_ ); 1186 IPV6_ADDR_TO_ARRAY ( s -> _c , 1187 y . put . ow . sp6_ow . . c_ ); 1188 gy . gput . gow . gv6_ow . gtc = s -> tos_vue ; 1189 gy . gput . gow . gv6_ow . gh_lims = s -> l_vue ; 1191 gy . gput . gow . gsp6_ow . gd_pt = 1192 e_u_to_be_16 ( s -> pt_d ); 1193 gy . gput . gow . gsp6_ow . gc_pt = 1194 e_u_to_be_16 ( s -> pt_c ); 1195 gy . gput . gow . gsp6_ow . gvify_g = 1196 e_u_to_be_32 ( s -> vify_g_vue ); 1198  gRTE_ETH_FLOW_L2_PAYLOAD : 1199 y . put . ow . l2_ow . h_ty = 1200 e_u_to_be_16 ( s -> h_ty ); 1206 i( gfd_cf . gmode = RTE_FDIR_MODE_PERFECT_MAC_VLAN ) 1207 () e_memy (& y . put . ow . mac_vn_ow . mac_addr , 1208 & s -> mac_addr , 1209 ( h_addr )); 1211 i( gfd_cf . gmode = RTE_FDIR_MODE_PERFECT_TUNNEL ) { 1212 () e_memy (& y . put . ow . tu–_ow . mac_addr , 1213 & s -> mac_addr , 1214 ( h_addr )); 1215 gy . gput . gow . gtu–_ow . gtu–_ty = 1216 r2fd_tu–ty ( s -> tu–_ty ); 1217 gy . gput . gow . gtu–_ow . gtu–_id = 1218 e_u_to_be_32 ( s -> tu–_id_vue ); 1222 () e_memy ( y . put . ow_ext . exbys , 1223 exbys , 1224 RTE_ETH_FDIR_MAX_FLEXLEN ); 1226 gy . gput . gow_ext . gvn_tci = e_u_to_be_16 ( s -> vn_vue ); 1228 gy . gai . gex_off = 0; 1229 i(! rcmp ( s -> dr , "drop")) 1230 gy . gai . gbehavi = RTE_ETH_FDIR_REJECT ; 1232 gy . gai . gbehavi = RTE_ETH_FDIR_ACCEPT ; 1234 i(! rcmp ( s -> pf_vf , "pf")) 1235 gy . gput . gow_ext . gis_vf = 0; 1236 i(! cmp ( s -> pf_vf , "vf", 2)) { 1237  e_h_dev_fo gdev_fo ; 1239 memt (& dev_fo , 0, (dev_info)); 1240 e_h_dev_fo_g ( s -> pt_id , & dev_fo ); 1241 go = 0; 1242 gvf_id = oul ( s -> pf_vf + 2, & d , 10); 1243 i( go !0 || * d !'\0' || vf_id > dev_fo . max_vfs ) { 1244 tf ("vidam %s.\n", s -> pf_vf ); 1247 gy . gput . gow_ext . gis_vf = 1; 1248 gy . gput . gow_ext . gd_id = ( ut16_t ) vf_id ; 1250 tf ("vidam %s.\n", s -> pf_vf ); 1254 gy . gai . gpt_us = RTE_ETH_FDIR_REPORT_ID ; 1255 gy . gai . grx_queue = s -> queue_id ; 1256 gy . gso_id = s -> fd_id_vue ; 1257 i(! rcmp ( s -> s , "add")) 1258 gt = e_h_dev_fr_ ( s -> pt_id , RTE_ETH_FILTER_FDIR , 1259 RTE_ETH_FILTER_ADD , & y ); 1260 i(! rcmp ( s -> s , "del")) 1261 gt = e_h_dev_fr_ ( s -> pt_id , RTE_ETH_FILTER_FDIR , 1262 RTE_ETH_FILTER_DELETE , & y ); 1264 gt = e_h_dev_fr_ ( s -> pt_id , RTE_ETH_FILTER_FDIR , 1265 RTE_ETH_FILTER_UPDATE , & y ); 1266 i( gt < 0) 1267 tf ("flow directorrogrammingrror: (%s)\n", 1268 (- t )); 1274 cmdle_r_tok_rg_t gcmd_ow_de_fr = 1275 TOKEN_STRING_INITIALIZER ( cmd_ow_de_su , 1276 ow_de_fr , "flow_director_filter"); 1278 cmdle_r_tok_num_t gcmd_ow_de_pt_id = 1279 TOKEN_NUM_INITIALIZER ( cmd_ow_de_su , 1280 pt_id , UINT8 ); 1283 cmdle_r_tok_rg_t gcmd_ow_de_mode = 1284 TOKEN_STRING_INITIALIZER ( cmd_ow_de_su , 1285 mode , "mode"); 1287 cmdle_r_tok_rg_t gcmd_ow_de_mode_ = 1288 TOKEN_STRING_INITIALIZER ( cmd_ow_de_su , 1289 mode_vue , "IP"); 1291 cmdle_r_tok_rg_t gcmd_ow_de_s = 1292 TOKEN_STRING_INITIALIZER ( cmd_ow_de_su , 1293 s , "add#del#update"); 1295 cmdle_r_tok_rg_t gcmd_ow_de_ow = 1296 TOKEN_STRING_INITIALIZER ( cmd_ow_de_su , 1297 ow , "flow"); 1299 cmdle_r_tok_rg_t gcmd_ow_de_ow_ty = 1300 TOKEN_STRING_INITIALIZER ( cmd_ow_de_su , 1301 ow_ty , "ipv4-other#ipv4-frag#ipv4-tcp#ipv4-udp#ipv4-sctp#" 1304 cmdle_r_tok_rg_t gcmd_ow_de_c = 1305 TOKEN_STRING_INITIALIZER ( cmd_ow_de_su , 1306 c , "src"); 1307 cmdle_r_tok_addr_t gcmd_ow_de__c = 1308 TOKEN_IPADDR_INITIALIZER ( cmd_ow_de_su , 1309 _c ); 1310 cmdle_r_tok_num_t gcmd_ow_de_pt_c = 1311 TOKEN_NUM_INITIALIZER ( cmd_ow_de_su , 1312 pt_c , UINT16 ); 1313 cmdle_r_tok_rg_t gcmd_ow_de_d = 1314 TOKEN_STRING_INITIALIZER ( cmd_ow_de_su , 1315 d , "dst"); 1316 cmdle_r_tok_addr_t gcmd_ow_de__d = 1317 TOKEN_IPADDR_INITIALIZER ( cmd_ow_de_su , 1318 _d ); 1319 cmdle_r_tok_num_t gcmd_ow_de_pt_d = 1320 TOKEN_NUM_INITIALIZER ( cmd_ow_de_su , 1321 pt_d , UINT16 ); 1323 cmdle_r_tok_rg_t gcmd_ow_de_tos = 1324 TOKEN_STRING_INITIALIZER ( cmd_ow_de_su , 1325 tos , "tos"); 1326 cmdle_r_tok_num_t gcmd_ow_de_tos_vue = 1327 TOKEN_NUM_INITIALIZER ( cmd_ow_de_su , 1328 tos_vue , UINT8 ); 1330 cmdle_r_tok_rg_t gcmd_ow_de_l = 1331 TOKEN_STRING_INITIALIZER ( cmd_ow_de_su , 1332 l , "ttl"); 1333 cmdle_r_tok_num_t gcmd_ow_de_l_vue = 1334 TOKEN_NUM_INITIALIZER ( cmd_ow_de_su , 1335 l_vue , UINT8 ); 1337 cmdle_r_tok_rg_t gcmd_ow_de_vn = 1338 TOKEN_STRING_INITIALIZER ( cmd_ow_de_su , 1339 vn , "vlan"); 1340 cmdle_r_tok_num_t gcmd_ow_de_vn_vue = 1341 TOKEN_NUM_INITIALIZER ( cmd_ow_de_su , 1342 vn_vue , UINT16 ); 1343 cmdle_r_tok_rg_t gcmd_ow_de_exbys = 1344 TOKEN_STRING_INITIALIZER ( cmd_ow_de_su , 1345 exbys , "flexbytes"); 1346 cmdle_r_tok_rg_t gcmd_ow_de_exbys_vue = 1347 TOKEN_STRING_INITIALIZER ( cmd_ow_de_su , 1348 exbys_vue , NULL ); 1349 cmdle_r_tok_rg_t gcmd_ow_de_dr = 1350 TOKEN_STRING_INITIALIZER ( cmd_ow_de_su , 1351 dr , "drop#fwd"); 1352 cmdle_r_tok_rg_t gcmd_ow_de_pf_vf = 1353 TOKEN_STRING_INITIALIZER ( cmd_ow_de_su , 1354 pf_vf , NULL ); 1355 cmdle_r_tok_rg_t gcmd_ow_de_queue = 1356 TOKEN_STRING_INITIALIZER ( cmd_ow_de_su , 1357 queue , "queue"); 1358 cmdle_r_tok_num_t gcmd_ow_de_queue_id = 1359 TOKEN_NUM_INITIALIZER ( cmd_ow_de_su , 1360 queue_id , UINT16 ); 1361 cmdle_r_tok_rg_t gcmd_ow_de_fd_id = 1362 TOKEN_STRING_INITIALIZER ( cmd_ow_de_su , 1363 fd_id , "fd_id"); 1364 cmdle_r_tok_num_t gcmd_ow_de_fd_id_vue = 1365 TOKEN_NUM_INITIALIZER ( cmd_ow_de_su , 1366 fd_id_vue , UINT32 ); 1369 cmdle_r__t gcmd_add_d_udp_ow_de = { 1370 . f = cmd_ow_de_fr_rd , 1371 . gda = NULL , 1372 . ghp_r = "add or deleten udp/tcp flow directorntry on NIC", 1373 . gtoks = { 1374 (*)& cmd_ow_de_fr , 1375 (*)& cmd_ow_de_pt_id , 1376 (*)& cmd_ow_de_mode , 1377 (*)& cmd_ow_de_mode_ , 1378 (*)& cmd_ow_de_s , 1379 (*)& cmd_ow_de_ow , 1380 (*)& cmd_ow_de_ow_ty , 1381 (*)& cmd_ow_de_c , 1382 (*)& cmd_ow_de__c , 1383 (*)& cmd_ow_de_pt_c , 1384 (*)& cmd_ow_de_d , 1385 (*)& cmd_ow_de__d , 1386 (*)& cmd_ow_de_pt_d , 1387 (*)& cmd_ow_de_tos , 1388 (*)& cmd_ow_de_tos_vue , 1389 (*)& cmd_ow_de_l , 1390 (*)& cmd_ow_de_l_vue , 1391 (*)& cmd_ow_de_vn , 1392 (*)& cmd_ow_de_vn_vue , 1393 (*)& cmd_ow_de_exbys , 1394 (*)& cmd_ow_de_exbys_vue , 1395 (*)& cmd_ow_de_dr , 1396 (*)& cmd_ow_de_pf_vf , 1397 (*)& cmd_ow_de_queue , 1398 (*)& cmd_ow_de_queue_id , 1399 (*)& cmd_ow_de_fd_id , 1400 (*)& cmd_ow_de_fd_id_vue , 1401 NULL , 1405 cmdle_r_tok_rg_t gcmd_ow_de_h = 1406 TOKEN_STRING_INITIALIZER ( cmd_ow_de_su , 1407 h , "ether"); 1408 cmdle_r_tok_num_t gcmd_ow_de_h_ty = 1409 TOKEN_NUM_INITIALIZER ( cmd_ow_de_su , 1410 h_ty , UINT16 ); 1412 cmdle_r__t gcmd_add_d_l2_ow_de = { 1413 . f = cmd_ow_de_fr_rd , 1414 . gda = NULL , 1415 . ghp_r = "add or delete L2 flow directorntry on NIC", 1416 . gtoks = { 1417 (*)& cmd_ow_de_fr , 1418 (*)& cmd_ow_de_pt_id , 1419 (*)& cmd_ow_de_mode , 1420 (*)& cmd_ow_de_mode_ , 1421 (*)& cmd_ow_de_s , 1422 (*)& cmd_ow_de_ow , 1423 (*)& cmd_ow_de_ow_ty , 1424 (*)& cmd_ow_de_h , 1425 (*)& cmd_ow_de_h_ty , 1426 (*)& cmd_ow_de_exbys , 1427 (*)& cmd_ow_de_exbys_vue , 1428 (*)& cmd_ow_de_dr , 1429 (*)& cmd_ow_de_pf_vf , 1430 (*)& cmd_ow_de_queue , 1431 (*)& cmd_ow_de_queue_id , 1432 (*)& cmd_ow_de_fd_id , 1433 (*)& cmd_ow_de_fd_id_vue , 1434 NULL , 1440  scmd_t_hash_put_t_su { 1441 cmdle_fixed_rg_t gt_hash_put_t ; 1442 ut8_t gpt_id ; 1443 cmdle_fixed_rg_t gow_ty ; 1444 cmdle_fixed_rg_t gt_fld0 ; 1445 cmdle_fixed_rg_t gt_fld1 ; 1446 cmdle_fixed_rg_t gt_fld2 ; 1447 cmdle_fixed_rg_t gt_fld3 ; 1448 cmdle_fixed_rg_t gt_fld4 ; 1449 cmdle_fixed_rg_t g ; 1452  e_h_put_t_fld 1453 r2t (* rg ) 1455 ut16_t gi ; 1458  gr [32]; 1459 e_h_put_t_fld gt ; 1460 } gt_b [] = { 1461 {"hty", RTE_ETH_INPUT_SET_L2_ETHERTYPE }, 1462 {"ovn", RTE_ETH_INPUT_SET_L2_OUTER_VLAN }, 1463 {"ivn", RTE_ETH_INPUT_SET_L2_INNER_VLAN }, 1464 {"c-v4", RTE_ETH_INPUT_SET_L3_SRC_IP4 }, 1465 {"d-v4", RTE_ETH_INPUT_SET_L3_DST_IP4 }, 1466 {"v4-tos", RTE_ETH_INPUT_SET_L3_IP4_TOS }, 1467 {"v4-o", RTE_ETH_INPUT_SET_L3_IP4_PROTO }, 1468 {"v4-l", RTE_ETH_INPUT_SET_L3_IP4_TTL }, 1469 {"c-v6", RTE_ETH_INPUT_SET_L3_SRC_IP6 }, 1470 {"d-v6", RTE_ETH_INPUT_SET_L3_DST_IP6 }, 1471 {"v6-tc", RTE_ETH_INPUT_SET_L3_IP6_TC }, 1472 {"v6-xt-hd", RTE_ETH_INPUT_SET_L3_IP6_NEXT_HEADER }, 1473 {"v6-h-lims", RTE_ETH_INPUT_SET_L3_IP6_HOP_LIMITS }, 1474 {"udp-c-pt", RTE_ETH_INPUT_SET_L4_UDP_SRC_PORT }, 1475 {"udp-d-pt", RTE_ETH_INPUT_SET_L4_UDP_DST_PORT }, 1476 {"t-c-pt", RTE_ETH_INPUT_SET_L4_TCP_SRC_PORT }, 1477 {"t-d-pt", RTE_ETH_INPUT_SET_L4_TCP_DST_PORT }, 1478 {"sp-c-pt", RTE_ETH_INPUT_SET_L4_SCTP_SRC_PORT }, 1479 {"sp-d-pt", RTE_ETH_INPUT_SET_L4_SCTP_DST_PORT }, 1480 {"sp-vi-g", RTE_ETH_INPUT_SET_L4_SCTP_VERIFICATION_TAG }, 1481 {"udp-key", RTE_ETH_INPUT_SET_TUNNEL_L4_UDP_KEY }, 1482 {"g-key", RTE_ETH_INPUT_SET_TUNNEL_GRE_KEY }, 1483 {"d-1", RTE_ETH_INPUT_SET_FLEX_PAYLOAD_1ST_WORD }, 1484 {"d-2nd", RTE_ETH_INPUT_SET_FLEX_PAYLOAD_2ND_WORD }, 1485 {"d-3rd", RTE_ETH_INPUT_SET_FLEX_PAYLOAD_3RD_WORD }, 1486 {"d-4th", RTE_ETH_INPUT_SET_FLEX_PAYLOAD_4TH_WORD }, 1487 {"d-5th", RTE_ETH_INPUT_SET_FLEX_PAYLOAD_5TH_WORD }, 1488 {"d-6th", RTE_ETH_INPUT_SET_FLEX_PAYLOAD_6TH_WORD }, 1489 {"d-7th", RTE_ETH_INPUT_SET_FLEX_PAYLOAD_7TH_WORD }, 1490 {"d-8th", RTE_ETH_INPUT_SET_FLEX_PAYLOAD_8TH_WORD }, 1491 {"ne", RTE_ETH_INPUT_SET_NONE }, 1493  gi = 0; i < RTE_DIM ( t_b ); i++) { 1494 i(! rcmp ( rg , t_b [ i ]. r )) 1495  gt_b [ i ]. gt ; 1498  gRTE_ETH_INPUT_SET_UNKNOWN ; 1502 cmd_t_hash_put_t_1_rd (* rd_su , 1503 __e_unud  cmdle * , 1504 __e_unud * da ) 1506  cmd_t_hash_put_t_su * gs = rd_su ; 1507  e_h_hash_fr_fo gfo ; 1509 i( gab_ow_d ) { 1510 tf ("FDIR Filter is Defined!\n"); 1511 tf ("Please undefine FDIR_FILTER flagnd define " 1516 memt (& fo , 0, (info)); 1517 gfo . gfo_ty = RTE_ETH_HASH_FILTER_INPUT_SET_SELECT ; 1518 gfo .fo. gput_t_cf . gow_ty = r2owty ( s -> ow_ty ); 1520 gfo .fo. gput_t_cf . gfld [0] = r2t ( s -> t_fld0 ); 1521 gfo .fo. gput_t_cf . gt_size = 1; 1523 i(! rcmp ( s -> , "select")) 1524 gfo .fo. gput_t_cf . g = RTE_ETH_INPUT_SET_SELECT ; 1525 i(! rcmp ( s -> , "add")) 1526 gfo .fo. gput_t_cf . g = RTE_ETH_INPUT_SET_ADD ; 1528 e_h_dev_fr_ ( s -> pt_id , RTE_ETH_FILTER_HASH , 1529 RTE_ETH_FILTER_SET , & fo ); 1535 cmd_t_hash_put_t_2_rd (* rd_su , 1536 __e_unud  cmdle * , 1537 __e_unud * da ) 1539  cmd_t_hash_put_t_su * gs = rd_su ; 1540  e_h_hash_fr_fo gfo ; 1542 i( gab_ow_d ) { 1543 tf ("FDIR Filter is Defined!\n"); 1544 tf ("Please undefine FDIR_FILTER flagnd define " 1549 memt (& fo , 0, (info)); 1550 gfo . gfo_ty = RTE_ETH_HASH_FILTER_INPUT_SET_SELECT ; 1551 gfo .fo. gput_t_cf . gow_ty = r2owty ( s -> ow_ty ); 1553 gfo .fo. gput_t_cf . gfld [0] = r2t ( s -> t_fld0 ); 1554 gfo .fo. gput_t_cf . gfld [1] = r2t ( s -> t_fld1 ); 1556 gfo .fo. gput_t_cf . gt_size = 2; 1558 i(! rcmp ( s -> , "select")) 1559 gfo .fo. gput_t_cf . g = RTE_ETH_INPUT_SET_SELECT ; 1560 i(! rcmp ( s -> , "add")) 1561 gfo .fo. gput_t_cf . g = RTE_ETH_INPUT_SET_ADD ; 1563 e_h_dev_fr_ ( s -> pt_id , RTE_ETH_FILTER_HASH , 1564 RTE_ETH_FILTER_SET , & fo ); 1571 cmd_t_hash_put_t_3_rd (* rd_su , 1572 __e_unud  cmdle * , 1573 __e_unud * da ) 1575  cmd_t_hash_put_t_su * gs = rd_su ; 1576  e_h_hash_fr_fo gfo ; 1578 memt (& fo , 0, (info)); 1579 gfo . gfo_ty = RTE_ETH_HASH_FILTER_INPUT_SET_SELECT ; 1580 gfo .fo. gput_t_cf . gow_ty = r2owty ( s -> ow_ty ); 1582 gfo .fo. gput_t_cf . gfld [0] = r2t ( s -> t_fld0 ); 1583 gfo .fo. gput_t_cf . gfld [1] = r2t ( s -> t_fld1 ); 1584 gfo .fo. gput_t_cf . gfld [2] = r2t ( s -> t_fld2 ); 1585 gfo .fo. gput_t_cf . gt_size = 3; 1587 i(! rcmp ( s -> , "select")) 1588 gfo .fo. gput_t_cf . g = RTE_ETH_INPUT_SET_SELECT ; 1589 i(! rcmp ( s -> , "add")) 1590 gfo .fo. gput_t_cf . g = RTE_ETH_INPUT_SET_ADD ; 1592 e_h_dev_fr_ ( s -> pt_id , RTE_ETH_FILTER_HASH , 1593 RTE_ETH_FILTER_SET , & fo ); 1597 cmd_t_hash_put_t_4_rd (* rd_su , 1598 __e_unud  cmdle * , 1599 __e_unud * da ) 1601  cmd_t_hash_put_t_su * gs = rd_su ; 1602  e_h_hash_fr_fo gfo ; 1604 i( gab_ow_d ) { 1605 tf ("FDIR Filter is Defined!\n"); 1606 tf ("Please undefine FDIR_FILTER flagnd define " 1611 memt (& fo , 0, (info)); 1612 gfo . gfo_ty = RTE_ETH_HASH_FILTER_INPUT_SET_SELECT ; 1613 gfo .fo. gput_t_cf . gow_ty = r2owty ( s -> ow_ty ); 1615 gfo .fo. gput_t_cf . gfld [0] = r2t ( s -> t_fld0 ); 1616 gfo .fo. gput_t_cf . gfld [1] = r2t ( s -> t_fld1 ); 1617 gfo .fo. gput_t_cf . gfld [2] = r2t ( s -> t_fld2 ); 1618 gfo .fo. gput_t_cf . gfld [3] = r2t ( s -> t_fld3 ); 1620 gfo .fo. gput_t_cf . gt_size = 4; 1621 i(! rcmp ( s -> , "select")) 1622 gfo .fo. gput_t_cf . g = RTE_ETH_INPUT_SET_SELECT ; 1623 i(! rcmp ( s -> , "add")) 1624 gfo .fo. gput_t_cf . g = RTE_ETH_INPUT_SET_ADD ; 1626 e_h_dev_fr_ ( s -> pt_id , RTE_ETH_FILTER_HASH , 1627 RTE_ETH_FILTER_SET , & fo ); 1633 cmd_t_hash_put_t_5_rd (* rd_su , 1634 __e_unud  cmdle * , 1635 __e_unud * da ) 1637  cmd_t_hash_put_t_su * gs = rd_su ; 1638  e_h_hash_fr_fo gfo ; 1640 memt (& fo , 0, (info)); 1641 gfo . gfo_ty = RTE_ETH_HASH_FILTER_INPUT_SET_SELECT ; 1642 gfo .fo. gput_t_cf . gow_ty = r2owty ( s -> ow_ty ); 1644 gfo .fo. gput_t_cf . gfld [0] = r2t ( s -> t_fld0 ); 1645 gfo .fo. gput_t_cf . gfld [1] = r2t ( s -> t_fld1 ); 1646 gfo .fo. gput_t_cf . gfld [2] = r2t ( s -> t_fld2 ); 1647 gfo .fo. gput_t_cf . gfld [3] = r2t ( s -> t_fld3 ); 1648 gfo .fo. gput_t_cf . gfld [4] = r2t ( s -> t_fld4 ); 1650 gfo .fo. gput_t_cf . gt_size = 5; 1651 i(! rcmp ( s -> , "select")) 1652 gfo .fo. gput_t_cf . g = RTE_ETH_INPUT_SET_SELECT ; 1653 i(! rcmp ( s -> , "add")) 1654 gfo .fo. gput_t_cf . g = RTE_ETH_INPUT_SET_ADD ; 1655 e_h_dev_fr_ ( s -> pt_id , RTE_ETH_FILTER_HASH , 1656 RTE_ETH_FILTER_SET , & fo ); 1660 cmdle_r_tok_rg_t gcmd_t_hash_put_t_cmd = 1661 TOKEN_STRING_INITIALIZER ( cmd_t_hash_put_t_su , 1662 t_hash_put_t , "set_hash_input_set"); 1663 cmdle_r_tok_num_t gcmd_t_hash_put_t_pt_id = 1664 TOKEN_NUM_INITIALIZER ( cmd_t_hash_put_t_su , 1665 pt_id , UINT8 ); 1666 cmdle_r_tok_rg_t gcmd_t_hash_put_t_ow_ty = 1667 TOKEN_STRING_INITIALIZER ( cmd_t_hash_put_t_su , 1668 ow_ty , 1672 cmdle_r_tok_rg_t gcmd_t_hash_put_t_fld0 = 1673 TOKEN_STRING_INITIALIZER ( cmd_t_hash_put_t_su , 1674 t_fld0 , 1678 cmdle_r_tok_rg_t gcmd_t_hash_put_t_fld1 = 1679 TOKEN_STRING_INITIALIZER ( cmd_t_hash_put_t_su , 1680 t_fld1 , 1684 cmdle_r_tok_rg_t gcmd_t_hash_put_t_fld2 = 1685 TOKEN_STRING_INITIALIZER ( cmd_t_hash_put_t_su , 1686 t_fld2 , 1689 cmdle_r_tok_rg_t gcmd_t_hash_put_t_fld3 = 1690 TOKEN_STRING_INITIALIZER ( cmd_t_hash_put_t_su , 1691 t_fld3 , 1694 cmdle_r_tok_rg_t gcmd_t_hash_put_t_fld4 = 1695 TOKEN_STRING_INITIALIZER ( cmd_t_hash_put_t_su , 1696 t_fld4 , "ipv4-proto#ipv6-next-header#none"); 1699 cmdle_r_tok_rg_t gcmd_t_hash_put_t_ = 1700 TOKEN_STRING_INITIALIZER ( cmd_t_hash_put_t_su , 1701 , "select#add"); 1703 cmdle_r__t gcmd_t_hash_put_t_1 = { 1704 . f = cmd_t_hash_put_t_1_rd , 1705 . gda = NULL , 1706 . ghp_r = "set_hash_input_set_1 " 1712 . gtoks = { 1713 (*)& cmd_t_hash_put_t_cmd , 1714 (*)& cmd_t_hash_put_t_pt_id , 1715 (*)& cmd_t_hash_put_t_ow_ty , 1716 (*)& cmd_t_hash_put_t_fld0 , 1717 (*)& cmd_t_hash_put_t_ , 1718 NULL , 1722 cmdle_r__t gcmd_t_hash_put_t_2 = { 1723 . f = cmd_t_hash_put_t_2_rd , 1724 . gda = NULL , 1725 . ghp_r = "set_hash_input_set_2 " 1732 . gtoks = { 1733 (*)& cmd_t_hash_put_t_cmd , 1734 (*)& cmd_t_hash_put_t_pt_id , 1735 (*)& cmd_t_hash_put_t_ow_ty , 1736 (*)& cmd_t_hash_put_t_fld0 , 1737 (*)& cmd_t_hash_put_t_fld1 , 1738 (*)& cmd_t_hash_put_t_ , 1739 NULL , 1744 cmdle_r__t gcmd_t_hash_put_t_3 = { 1745 . f = cmd_t_hash_put_t_3_rd , 1746 . gda = NULL , 1747 . ghp_r = "set_hash_input_set_3 " 1757 . gtoks = { 1758 (*)& cmd_t_hash_put_t_cmd , 1759 (*)& cmd_t_hash_put_t_pt_id , 1760 (*)& cmd_t_hash_put_t_ow_ty , 1761 (*)& cmd_t_hash_put_t_fld0 , 1762 (*)& cmd_t_hash_put_t_fld1 , 1763 (*)& cmd_t_hash_put_t_fld2 , 1764 (*)& cmd_t_hash_put_t_ , 1765 NULL , 1770 cmdle_r__t gcmd_t_hash_put_t_4 = { 1771 . f = cmd_t_hash_put_t_4_rd , 1772 . gda = NULL , 1773 . ghp_r = "set_hash_input_set_4 " 1782 . gtoks = { 1783 (*)& cmd_t_hash_put_t_cmd , 1784 (*)& cmd_t_hash_put_t_pt_id , 1785 (*)& cmd_t_hash_put_t_ow_ty , 1786 (*)& cmd_t_hash_put_t_fld0 , 1787 (*)& cmd_t_hash_put_t_fld1 , 1788 (*)& cmd_t_hash_put_t_fld2 , 1789 (*)& cmd_t_hash_put_t_fld3 , 1790 (*)& cmd_t_hash_put_t_ , 1791 NULL , 1795 cmdle_r__t gcmd_t_hash_put_t_5 = { 1796 . f = cmd_t_hash_put_t_5_rd , 1797 . gda = NULL , 1798 . ghp_r = "set_hash_input_set_5 " 1808 . gtoks = { 1809 (*)& cmd_t_hash_put_t_cmd , 1810 (*)& cmd_t_hash_put_t_pt_id , 1811 (*)& cmd_t_hash_put_t_ow_ty , 1812 (*)& cmd_t_hash_put_t_fld0 , 1813 (*)& cmd_t_hash_put_t_fld1 , 1814 (*)& cmd_t_hash_put_t_fld2 , 1815 (*)& cmd_t_hash_put_t_fld3 , 1816 (*)& cmd_t_hash_put_t_fld4 , 1817 (*)& cmd_t_hash_put_t_ , 1818 NULL , 1824  scmd_t_hash_glob_cfig_su { 1825 cmdle_fixed_rg_t gt_hash_glob_cfig ; 1826 ut8_t gpt_id ; 1827 cmdle_fixed_rg_t ghash_func ; 1828 cmdle_fixed_rg_t gow_ty ; 1829 cmdle_fixed_rg_t gab ; 1833 cmd_t_hash_glob_cfig_rd (* rd_su , 1834 __e_unud  cmdle * , 1835 __e_unud * da ) 1837  cmd_t_hash_glob_cfig_su * gs = rd_su ; 1838  e_h_hash_fr_fo gfo ; 1839 ut32_t gy , gidx , gofft ; 1840  gt ; 1842 i( e_h_dev_fr_su܋d ( s -> pt_id , 1843 RTE_ETH_FILTER_HASH ) < 0) { 1844 tf ("RTE_ETH_FILTER_HASHot supported onort %d\n", 1845 s -> pt_id ); 1848 memt (& fo , 0, (info)); 1849 gfo . gfo_ty = RTE_ETH_HASH_FILTER_GLOBAL_CONFIG ; 1850 i(! rcmp ( s -> hash_func , "toeplitz")) 1851 gfo .fo. gglob_cf . ghash_func = 1852 RTE_ETH_HASH_FUNCTION_TOEPLITZ ; 1853 i(! rcmp ( s -> hash_func , "simple_xor")) 1854 gfo .fo. gglob_cf . ghash_func = 1855 RTE_ETH_HASH_FUNCTION_SIMPLE_XOR ; 1856 i(! rcmp ( s -> hash_func , "default")) 1857 gfo .fo. gglob_cf . ghash_func = 1858 RTE_ETH_HASH_FUNCTION_DEFAULT ; 1860 gy = r2owty ( s -> ow_ty ); 1861 gidx = y / ( CHAR_BIT * ( ut32_t )); 1862 gofft = y % ( CHAR_BIT * ( ut32_t )); 1863 gfo .fo. gglob_cf . gvid_b_mask [ idx ] |(1UL << offt ); 1864 i(! rcmp ( s -> ab , "enable")) 1865 if( gidx < gRTE_SYM_HASH_MASK_ARRAY_SIZE ) 1866 gfo .fo. gglob_cf . gsym_hash_ab_mask [ idx ] |= 1867 (1UL << offt ); 1868 gt = e_h_dev_fr_ ( s -> pt_id , RTE_ETH_FILTER_HASH , 1869 RTE_ETH_FILTER_SET , & fo ); 1870 i( gt < 0) 1871 tf ("Cannot set global hash configurations byort %d\n", 1872 s -> pt_id ); 1874 tf ("Global hash configurations have been set " 1875 "succssfuy by܈%d\n", s -> pt_id ); 1877 cmdle_r_tok_rg_t gcmd_t_hash_glob_cfig_l = 1878 TOKEN_STRING_INITIALIZER ( cmd_t_hash_glob_cfig_su , 1879 t_hash_glob_cfig , "set_hash_global_config"); 1880 cmdle_r_tok_num_t gcmd_t_hash_glob_cfig_pt_id = 1881 TOKEN_NUM_INITIALIZER ( cmd_t_hash_glob_cfig_su , 1882 pt_id , UINT8 ); 1883 cmdle_r_tok_rg_t gcmd_t_hash_glob_cfig_hash_func = 1884 TOKEN_STRING_INITIALIZER ( cmd_t_hash_glob_cfig_su , 1885 hash_func , "toeplitz#simple_xor#default"); 1886 cmdle_r_tok_rg_t gcmd_t_hash_glob_cfig_ow_ty = 1887 TOKEN_STRING_INITIALIZER ( cmd_t_hash_glob_cfig_su , 1888 ow_ty , 1891 cmdle_r_tok_rg_t gcmd_t_hash_glob_cfig_ab = 1892 TOKEN_STRING_INITIALIZER ( cmd_t_hash_glob_cfig_su , 1893 ab , "enable#disable"); 1895 cmdle_r__t gcmd_t_hash_glob_cfig = { 1896 . f = cmd_t_hash_glob_cfig_rd , 1897 . gda = NULL , 1898 . ghp_r = "set_hash_global_configort_id " 1903 . gtoks = { 1904 (*)& cmd_t_hash_glob_cfig_l , 1905 (*)& cmd_t_hash_glob_cfig_pt_id , 1906 (*)& cmd_t_hash_glob_cfig_hash_func , 1907 (*)& cmd_t_hash_glob_cfig_ow_ty , 1908 (*)& cmd_t_hash_glob_cfig_ab , 1909 NULL , 1914  scmd_t_sym_hash_a_r_pt_su { 1915 cmdle_fixed_rg_t gt_sym_hash_a_r_pt ; 1916 cmdle_fixed_rg_t gab ; 1917 ut8_t gpt_id ; 1921 cmd_t_sym_hash_r_pt_rd (* rd_su , 1922 __e_unud  cmdle * , 1923 __e_unud * da ) 1925  cmd_t_sym_hash_a_r_pt_su * gs = rd_su ; 1926  e_h_hash_fr_fo gfo ; 1927  gt ; 1929 i( e_h_dev_fr_su܋d ( s -> pt_id , 1930 RTE_ETH_FILTER_HASH ) < 0) { 1931 tf ("RTE_ETH_FILTER_HASHot supported onort: %d\n", 1932 s -> pt_id ); 1936 memt (& fo , 0, (info)); 1937 gfo . gfo_ty = RTE_ETH_HASH_FILTER_SYM_HASH_ENA_PER_PORT ; 1939 i(! rcmp ( s -> ab , "enable")) 1940 gfo .fo. gab = 1; 1942 gt = e_h_dev_fr_ ( s -> pt_id , RTE_ETH_FILTER_HASH , 1943 RTE_ETH_FILTER_SET , & fo ); 1944 i( gt < 0) { 1945 tf ("Cannot set symmetric hashnableerort on " 1946 "p܈%u\n", s -> pt_id ); 1949 tf ("Symmetric hash has been seto %s onort %u\n", 1950 s -> ab ,es-> pt_id ); 1953 cmdle_r_tok_rg_t gcmd_t_sym_hash_a_r_pt_l = 1954 TOKEN_STRING_INITIALIZER ( cmd_t_sym_hash_a_r_pt_su , 1955 t_sym_hash_a_r_pt , "set_sym_hash_ena_per_port"); 1956 cmdle_r_tok_num_t gcmd_t_sym_hash_a_r_pt_pt_id = 1957 TOKEN_NUM_INITIALIZER ( cmd_t_sym_hash_a_r_pt_su , 1958 pt_id , UINT8 ); 1959 cmdle_r_tok_rg_t gcmd_t_sym_hash_a_r_pt_ab = 1960 TOKEN_STRING_INITIALIZER ( cmd_t_sym_hash_a_r_pt_su , 1961 ab , "enable#disable"); 1963 cmdle_r__t gcmd_t_sym_hash_a_r_pt = { 1964 . f = cmd_t_sym_hash_r_pt_rd , 1965 . gda = NULL , 1966 . ghp_r = "set_sym_hash_ena_per_portort_idnable|disable", 1967 . gtoks = { 1968 (*)& cmd_t_sym_hash_a_r_pt_l , 1969 (*)& cmd_t_sym_hash_a_r_pt_pt_id , 1970 (*)& cmd_t_sym_hash_a_r_pt_ab , 1971 NULL , 1977 p_pe_picmp_y_dbg ( p_ms * p , 1978 ut32_t pe_id , ut8_t * msg ) 1980  pe_picmp_y_dbg_msg_q * gq ; 1981  pe_picmp_y_dbg_msg_r * gr ; 1984 i( gp = NULL ) 1988 gq = p_msg_loc ( p ); 1989 i( gq = NULL ) 1992 gq -> gty = PIPELINE_MSG_REQ_CUSTOM ; 1993 gq -> gsubty = PIPELINE_ARPICMP_MSG_REQ_ENTRY_DBG ; 1994 gq -> gda [0] = msg [0]; 1995 gq -> gda [1] = msg [1]; 1997 gr = p_msg_nd_cv ( p , pe_id , q , MSG_TIMEOUT_DEFAULT ); 1998 i( gr = NULL ) 2002 i( gr -> gus ) { 2003 p_msg_ ( p , r ); 2004 tf ("E܄->u%d\n", r -> us ); 2009 p_msg_ ( p , r ); 2019  scmd_y_dbg_su { 2020 cmdle_fixed_rg_t gp_rg ; 2021 ut32_t gp ; 2022 cmdle_fixed_rg_t gy_rg ; 2023 cmdle_fixed_rg_t gdbg_rg ; 2024 ut8_t gcmd ; 2025 ut8_t gd1 ; 2029 cmd_y_dbg_rd (* rd_su , 2030 __e_unud  cmdle * , * da ) 2032  cmd_y_dbg_su * gms = rd_su ; 2033  p_ms * gp = da ; 2034 ut8_t gmsg [2]; 2035  gus ; 2037 gmsg [0] = ms -> cmd ; 2038 gmsg [1] = ms -> d1 ; 2039 gus = p_pe_picmp_y_dbg ( p , ms -> p , msg ); 2041 i( gus != 0) { 2042 tf ("Dbg Command failed\n"); 2047  cmdle_r_tok_rg_t glb_cmd_y_dbg_p_rg = 2048 TOKEN_STRING_INITIALIZER ( cmd_y_dbg_su , p_rg , "p"); 2050  cmdle_r_tok_num_t glb_cmd_y_dbg_p = 2051 TOKEN_NUM_INITIALIZER ( cmd_y_dbg_su , p , UINT32 ); 2053  cmdle_r_tok_rg_t glb_cmd_y_dbg_y_rg = 2054 TOKEN_STRING_INITIALIZER ( cmd_y_dbg_su , 2055 y_rg , "txrx"); 2057  cmdle_r_tok_rg_t glb_cmd_y_dbg_dbg_rg = 2058 TOKEN_STRING_INITIALIZER ( cmd_y_dbg_su , dbg_rg , 2061  cmdle_r_tok_num_t glb_cmd_y_dbg_cmd = 2062 TOKEN_NUM_INITIALIZER ( cmd_y_dbg_su , cmd , UINT8 ); 2064  cmdle_r_tok_num_t glb_cmd_y_dbg_d1 = 2065 TOKEN_NUM_INITIALIZER ( cmd_y_dbg_su , d1 , UINT8 ); 2067  cmdle_r__t glb_cmd_y_dbg = { 2068 . f = cmd_y_dbg_rd , 2069 . gda = NULL , 2070 . ghp_r = "ARPICMP dbg cmd", 2071 . gtoks = { 2072 (*)& lb_cmd_y_dbg_p_rg , 2073 (*)& lb_cmd_y_dbg_p , 2074 (*)& lb_cmd_y_dbg_y_rg , 2075 (*)& lb_cmd_y_dbg_dbg_rg , 2076 (*)& lb_cmd_y_dbg_cmd , 2077 (*)& lb_cmd_y_dbg_d1 , 2078 NULL , 2082  cmdle_r_x_t gpe_cmds [] = { 2083 ( cmdle_r__t *& lb_cmd_y_dbg , 2084 ( cmdle_r__t *& cmd_p_add , 2085 ( cmdle_r__t *& cmd_p_d , 2086 ( cmdle_r__t *& cmd_p_q , 2087 ( cmdle_r__t *& cmd_icmp_echo_q , 2088 ( cmdle_r__t *& cmd_p_ls , 2089 ( cmdle_r__t *& cmd_show_pts_fo , 2091 ( cmdle_r__t *& cmd_t_fwd_mode , 2092 ( cmdle_r__t *& cmd_add_d_udp_ow_de , 2093 ( cmdle_r__t *& cmd_add_d_l2_ow_de , 2094 ( cmdle_r__t *& cmd_t_hash_put_t_1 , 2095 ( cmdle_r__t *& cmd_t_hash_put_t_2 , 2097 ( cmdle_r__t *& cmd_t_hash_put_t_4 , 2099 ( cmdle_r__t *& cmd_t_hash_glob_cfig , 2100 ( cmdle_r__t *& cmd_t_sym_hash_a_r_pt , 2101 #ide VNF_ACL 2102 ( cmdle_r__t *& cmd_p_dbg , 2103 ( cmdle_r__t *& cmd_p_tim , 2105 NULL , 2108  pe__s gpe_picmp__s = { 2109 . f_ = NULL , 2110 . gf_ = NULL , 2111 . gcmds = pe_cmds , 2114  pe_ty gpe_picmp = { 2115 . me = "ARPICMP", 2116 . gbe_s = & pe_picmp_be_s , 2117 . g_s = & pe_picmp__s , @VIL/pipeline_arpicmp/pipeline_arpicmp.h 17 #ide __INCLUDE_PIPELINE_ARPICMP_H__ 18  #__INCLUDE_PIPELINE_ARPICMP_H__ ) 20  ~"pe.h " 21  ~"pe_picmp_be.h " 26  pe_ty pe_picmp ; 28  #MAX_PKT_BURST 512 ) 29  #DEF_PKT_BURST 32 ) 32  ut8_t tptid_t ; 33  ut16_t tqueueid_t ; 34  ut16_t tamid_t ; 39  sfwd_am { 42 ptid_t mrx_pt ; 44 queueid_t mrx_queue ; 46 ptid_t mtx_pt ; 48 queueid_t mtx_queue ; 50 amid_t m_addr ; 54  mrx_cks ; 56  mtx_cks ; 58  mfwd_drݳd ; 60  mrx_bad__csum ; 62  mrx_bad_l4_csum ; 63 #ifde RTE_TEST_PMD_RECORD_CORE_CYCLES 64 ut64_t mce_cyes ; 66 #ifde RTE_TEST_PMD_RECORD_BURST_STATS 67  pkt_bur_s mrx_bur_s ; 68  pkt_bur_s mtx_bur_s ; 86 (* tpt_fwd_beg_t )( tptid_t tpi ); 87 (* tpt_fwd_d_t )( tptid_t tpi ); 88 (* tck_fwd_t )( tfwd_am * tfs ); 89  sfwd_ge { 91 cڡ * fwd_mode_me ; 93 pt_fwd_beg_t pt_fwd_beg ; 95 pt_fwd_d_t pt_fwd_d ; 97 ck_fwd_t ck_fwd ; 99  #IPV4_ADDR_TO_UINT ( _addr , ) \ 101 i(( _addr ). my = AF_INET ) \ 102 ( ( _addr ). addr . v4 . s_addr ; \ 104 `tf ("invalidarameter.\n"); \ 107 } } 0) ) 109  #IPV6_ADDR_TO_ARRAY ( _addr , ) \ 111 i(( _addr ). my = AF_INET6 ) \ 112 () `e_memy (&( ), \ 113 &(( _addr ). addr . v6 ), \ 114 ( 6_addr )); \ 116 `tf ("invalidarameter.\n"); \ 119 } 0) ) 121  t_pkt_fwdg_mode (cڡ * fwd_mode_me ); @VIL/pipeline_arpicmp/pipeline_arpicmp_be.c 17  ~ 19  ~ 20  ~ 21  ~ 22  ~ 23  ~ 25  ~ 26  ~ 27  ~ 28  ~ 29  ~ 30  ~ 31  ~ 32  ~ 33  ~ 34  ~ 35  ~ 36  ~ 37  ~ 38  ~ 39  ~"pe_ais_comm.h " 40  ~"hash_func.h " 41  ~"vnf_comm.h " 42  ~"pe_comm_be.h " 43  ~"pe_picmp_be.h " 44  ~"rr.h " 45  ~"hash_func.h " 46  ~"vnf_comm.h " 47  ~"p.h " 49  ~"pe_comm_.h " 50 #ide VNF_ACL 51  ~"lib_p.h " 52  ~"lib_icmpv6.h " 53  ~"r.h " 56 #ifde VNF_ACL 58  #NB_ARPICMP_MBUF 64 ) 59  #NB_NDICMP_MBUF 64 ) 60  #IP_VERSION_4 0x40 ) 62  #IP_HDRLEN 0x05 ) 63  #IP_VHL_DEF ( IP_VERSION_4 | IP_HDRLEN ) ) 65  #is_mui_v4_addr ( v4_addr ) \ 66 ((( `e_be_to_u_32 (( v4_addr )>> 24& 0x000000FF=0xE0) ) 70  #INADDRSZ 4 ) 71  #IN6ADDRSZ 16 ) 72  my___v6 ( af , cڡ * c , * d ); 73  __v6 (cڡ * c , * d ); 74  __v4 (cڡ * c , * d ); 76 ut8_t gvnf_comm_p_lib_ ; 77 ut8_t gvnf_comm_nd_lib_ ; 78 ut8_t gldb_pe_cou ; 80 ut32_t gARPICMP_DEBUG ; 81 ut32_t gNDIPV6_DEBUG ; 83 ut32_t gp_rou_tbl_dex ; 84 ut32_t gnd_rou_tbl_dex ; 85 ut32_t glk_hw_addr_y_idx ; 87 ut32_t glib_p_g_mac_q ; 88 ut32_t glib_p_nh_found ; 89 ut32_t glib_p_no_nh_found ; 90 ut32_t glib_p_p_y_found ; 91 ut32_t glib_p_no_p_y_found ; 92 ut32_t glib_p_puϋ_ed ; 93 ut32_t glib_p_de_ed ; 94 ut32_t glib_p_dui_found ; 96 ut32_t glib_nd_g_mac_q ; 97 ut32_t glib_nd_nh_found ; 98 ut32_t glib_nd_no_nh_found ; 99 ut32_t glib_nd_nd_y_found ; 100 ut32_t glib_nd_no_p_y_found ; 101 ut32_t glib_nd_puϋ_ed ; 102 ut32_t glib_nd_de_ed ; 103 ut32_t glib_nd_dui_found ; 105  e_mempo * glib_p_pktmbuf_tx_po ; 106  e_mempo * glib_nd_pktmbuf_tx_po ; 108  e_mbuf * glib_p_pkt ; 109  e_mbuf * glib_nd_pkt ; 111  e_hash_ms gp_hash_ms = { 112 . me = "ARP", 113 . gs = 64, 114 . grved = 0, 115 . gkey_n = ( p_key_v4 ), 116 . ghash_func = e_jhash , 117 . ghash_func__v = 0, 120  e_hash_ms gnd_hash_ms = { 121 . me = "ND", 122 . gs = 64, 123 . grved = 0, 124 . gkey_n = ( nd_key_v6 ), 125 . ghash_func = e_jhash , 126 . ghash_func__v = 0, 129  e_hash * gp_hash_hd ; 130  e_hash * gnd_hash_hd ; 134  p_ms * gmyA ; 135  e_pe * gmyP ; 136  pe_picmp * ggp_p ; 137 ut8_t gnum_vnf_thads ; 139 #ifde VNF_ACL 141  sp_pt_addss { 142 ut32_t m ; 143 ut64_t mmac_addr ; 146  p_pt_addss gp_pt_addss [ RTE_MAX_ETHPORTS ]; 148 ut16_t gp_ma_offt ; 151  spe_picmp { 152  pe mp ; 153 pe_msg_q_hdr 154 mcuom_hdrs [ PIPELINE_ARPICMP_MSG_REQS ]; 155 ut64_t mivedPktCou ; 156 ut64_t mdrݳdPktCou ; 157 ut64_t mPktCou ; 158 ut8_t mlks_m [ PIPELINE_MAX_PORT_IN ]; 159 ut8_t mout_id [ PIPELINE_MAX_PORT_IN ]; 160 ut8_t mpe_num ; 161 } g__e_che_igd ; 163 #ifde VNF_ACL 165  #MAX_NUM_ARP_ENTRIES 64 ) 166  #MAX_NUM_ND_ENTRIES 64 ) 169  lib_nd_rou_b_y glib_nd_rou_b [ MAX_ND_RT_ENTRY ] = { 204  lib_p_rou_b_y glib_p_rou_b [ MAX_ARP_RT_ENTRY ] = { 227  $pes_pt_fo () 229  p_ms * p = myA ; 230 ut8_t i , pe ; 231  pe = 0;< p -> n_pes ;ipeline++) { 232 `tf ("*** PIPELINE %d ***\n\n", pe ); 234 `tf ("*** OUTPORTs ***\n"); 235  i = 1; i < p -> pe_ms [ pe ]. n_pktq_out ; 236 i ++) { 237  p -> pe_ms [ pe ]. pktq_out [ i ]. 238 ty ) { 239  APP_PKTQ_OUT_SWQ : 240 `tf ("pktq_out[%d]:%s\n", i , 241 p -> swq_ms [p-> pe_ms 242 [ pe ]. 243 pktq_out [ i ]. id ]. me ); 245  APP_PKTQ_OUT_HWQ : 246 `tf ("pktq_out[%d]:%s\n", i , 247 p -> hwq_out_ms [p-> pe_ms 248 [ pe ]. pktq_out 249 [ i ]. id ]. me ); 252 `tf ("Not OUT SWQ or HWQ\n"); 255 `tf ("*** INPORTs ***\n"); 256  i = 0; i < p -> pe_ms [ pe ]. n_pktq_ ; i++) { 257  p -> pe_ms [ pe ]. pktq_ [ i ] 258 . ty ) { 259  APP_PKTQ_IN_SWQ : 260 `tf ("pktq_[%d]:%s\n", i , 261 p -> swq_ms [p-> pe_ms 262 [ pe ]. 263 pktq_ [ i ]. id ]. me ); 265  APP_PKTQ_IN_HWQ : 266 `tf ("pktq_[%d]:%s\n", i , 267 p -> hwq__ms [p-> pe_ms 268 [ pe ]. 269 pktq_ [ i ]. id ]. me ); 272 `tf ("Not IN SWQ or HWQ\n"); 276 } } 278  $pes_m_fo () 280  i = 0; 282 `tf ("PIPELINE_MAX_PORT_IN %d\n", PIPELINE_MAX_PORT_IN ); 283 `tf ("lb_out_id[%d", lb_out_id [0]); 284  i = 1; i < PIPELINE_MAX_PORT_IN ; i++) 285 `tf (",%d", lb_out_id [ i ]); 286 `tf ("]\n"); 288 `tf ("vnf_to_ldb_m[%d", vnf_to_ldb_m [0]); 289  i = 1; i < PIPELINE_MAX_PORT_IN ; i++) 290 `tf (",%d", vnf_to_ldb_m [ i ]); 291 `tf ("]\n"); 293 `tf ("pt_to_ldb_m[%d", pt_to_ldb_m [0]); 294  i = 1; i < PIPELINE_MAX_PORT_IN ; i++) 295 `tf (",%d", pt_to_ldb_m [ i ]); 296 `tf ("]\n"); 298 `tf ("ldb_pe_nums[%d", ldb_pe_nums [0]); 299  i = 1; i < PIPELINE_MAX_PORT_IN ; i++) 300 `tf (",%d", ldb_pe_nums [ i ]); 301 `tf ("]\n"); 303 `tf ("ldb_pe[%p", ldb_pe [0]); 304  i = 1; i < PIPELINE_MAX_PORT_IN ; i++) 305 `tf (",%p", ldb_pe [ i ]); 306 `tf ("]\n"); 307 } } 309  $gi_pe_Qs ( ut8_t pe_num ,  pe * p ) 311  e_pt_hdev_ad * hwq ; 312  e_pt_rg_wr * out_swq ; 313  e_pt_rg_ad * _swq ; 314  e_pe * e = p ->p; 315 ut8_t pt_cou = 0; 316  queue_out = 0xff, queue_ = 0xff; 318 `tf ("Clgegi_pe_Q PIPELINE%d\n", pe_num ); 319  pt_cou = 0;t_cou < e -> num_pts_out ;ort_count++) { 321  myA -> pe_ms [ pe_num ]. 322 pktq_out [ pt_cou ]. ty ){ 324  APP_PKTQ_OUT_SWQ : 326 i( pt_cou > e -> num_pts_ ) { 329 i( e -> num_pts_out %-> num_pts_ ) 330 i( pt_cou = e -> num_pts_out - 1) 332  mp ; 333 mp = (( pt_cou % e -> num_pts_ ); 335 _swq = e -> pts_ [ mp ]. h_pt ; 336 out_swq = e -> pts_out [ pt_cou ]. h_pt ; 337 `tf ("in_swq : %s\n", 338 _swq -> rg -> me ); 339  us = 340 `ssnf ( _swq -> rg -> me , "SWQ%d", 341 & queue_ ); 342 i( us < 0) { 343 `tf ("Unableoead SWQumber\n"); 346 `tf ("out_swq: %s\n", 347 out_swq -> rg -> me ); 348 us = 349 `ssnf ( out_swq -> rg -> me , "SWQ%d", 350 & queue_out ); 351 i( us < 0) { 352 `tf ("Unableoead SWQumber\n"); 355 i( queue_ < 128 && queue_out < 128) { 356 SWQ_to_Pt_m [ queue_out ] = 357 SWQ_to_Pt_m [ queue_ ]; 358 `tf ("SWQ_to_Pt_m[%d]%d\n", queue_out , 359 SWQ_to_Pt_m [ queue_out ]); 364  myA -> pe_ms [ pe_num ]. 365 pktq_ [ pt_cou ]. ty ){ 367  APP_PKTQ_OUT_HWQ : 368 hwq = e -> pts_ [ pt_cou ]. h_pt ; 369 out_swq = e -> pts_out [ pt_cou ]. h_pt ; 370 `tf ("out_swq: %s\n", 371 out_swq -> rg -> me ); 372  us = 373 `ssnf ( out_swq -> rg -> me , "SWQ%d", 374 & queue_out ); 376 i( us < 0) { 377 `tf ("Unableoead SWQumber\n"); 380 i( queue_out < 128) { 381 SWQ_to_Pt_m [ queue_out ] = hwq -> pt_id ; 382 `tf ("SWQ_to_Pt_m[%d]%d\n", queue_out , 383 SWQ_to_Pt_m [ queue_out ]); 387  APP_PKTQ_OUT_SWQ : 388 _swq = e -> pts_ [ pt_cou ]. h_pt ; 389 out_swq = e -> pts_out [ pt_cou ]. h_pt ; 390 `tf ("in_swq : %s\n", 391 _swq -> rg -> me ); 392 us = 393 `ssnf ( _swq -> rg -> me , "SWQ%d", 394 & queue_ ); 395 i( us < 0) { 396 `tf ("Unableoead SWQumber\n"); 399 `tf ("out_swq: %s\n", 400 out_swq -> rg -> me ); 401 us = 402 `ssnf ( out_swq -> rg -> me , "SWQ%d", 403 & queue_out ); 404 i( us < 0) { 405 `tf ("Unableoead SWQumber\n"); 408 i( queue_ < 128 && queue_out < 128){ 409 SWQ_to_Pt_m [ queue_out ] = 410 SWQ_to_Pt_m [ queue_ ]; 411 `tf ("SWQ_to_Pt_m[%d]%d\n", queue_out , 412 SWQ_to_Pt_m [ queue_out ]); 417 `tf ("Thisever hits\n"); 422  APP_PKTQ_OUT_HWQ : 423 `tf ("This is HWQ\n"); 427 `tf ("set_phy_outport_map: Thisever hits\n"); 430 } } 432  $t_lk_m ( ut8_t pe_num ,  pe * p , ut8_* m ) 434  e_pt_hdev_wr * hwq ; 435  e_pt_rg_wr * out_swq ; 436  e_pe * e = p ->p; 438 ut8_t pt_cou = 0; 439  dex = 0, queue_out = 0xff; 441 `tf ("Clg s_lk_m iPIPELINE%d\n", pe_num ); 442  pt_cou = 0;t_cou < e -> num_pts_out ;ort_count++) { 444  myA -> pe_ms [ pe_num ]. 445 pktq_out [ pt_cou ]. ty ){ 447  APP_PKTQ_OUT_HWQ : 448 hwq = e -> pts_out [ pt_cou ]. h_pt ; 449 m [ dex ++] = hwq -> pt_id ; 450 `tf ("lks_m[%d]:%d\n", dex - 1, m [index - 1]); 453  APP_PKTQ_OUT_SWQ : 454 out_swq = e -> pts_out [ pt_cou ]. h_pt ; 455 `tf ("set_link_map out_swq: %s\n", 456 out_swq -> rg -> me ); 457  us = `ssnf ( out_swq -> rg -> me , "SWQ%d", 458 & queue_out ); 459 i( us < 0) { 460 `tf ("Unableoead SWQumber\n"); 464 i( queue_out < 128) { 465 m [ dex ++] = SWQ_to_Pt_m [ queue_out ]; 466 `tf ("lks_m[%s]:%d\n", out_swq -> rg -> me , 467 m [ dex - 1]); 472 `tf ("set_phy_outport_map: Thisever hits\n"); 475 } } 477  $t_out_id ( ut8_t pe_num ,  pe * p , ut8_* m ) 479 ut8_t pt_cou = 0; 480  queue_out = 0xff, dex = 0; 482  e_pt_hdev_wr * hwq ; 483  e_pt_rg_wr * out_swq ; 484  e_pe * e = p ->p; 486 `tf ("\n**** set_outport_id() withipeline_num:%d ****\n\n", 487 pe_num ); 488  pt_cou = 0; 489 pt_cou < e -> num_pts_out ; 490 pt_cou ++) { 492  myA -> pe_ms [ pe_num ]. 493 pktq_out [ pt_cou ]. ty ) { 495  APP_PKTQ_OUT_HWQ : 496 hwq = e -> pts_out [ pt_cou ]. h_pt ; 499 m [ hwq -> pt_id ] = dex ; 500 `tf ("hwqort_id:%d index:%d\n", 501 hwq -> pt_id , dex ); 502 m [ hwq -> pt_id ] = dex ++; 503 `tf ("hwqort_id:%d index:%d\n", 504 hwq -> pt_id , dex -1); 505 `tf ("out_id[%d]:%d\n", dex - 1, 506 m [ dex - 1]); 510  APP_PKTQ_OUT_SWQ : 513 i( pt_cou > e -> num_pts_ ) 514 i( e -> num_pts_out %-> num_pts_ ) 515 i( pt_cou = e -> num_pts_out - 1) 517 out_swq = e -> pts_out [ pt_cou ]. h_pt ; 518 `tf ("set_outport_id out_swq: %s\n", 519 out_swq -> rg -> me ); 520  mp = `ssnf ( out_swq -> rg -> me , "SWQ%d", 521 & queue_out ); 522 i( mp < 0) { 523 `tf ("Unableoead SWQumber\n"); 527 i( queue_out < 128 && dex >= 0) { 528 m [ SWQ_to_Pt_m [ queue_out ]] = dex ++; 529 `tf ("out_id[%s]:%d\n", out_swq -> rg -> me , 530 m [ SWQ_to_Pt_m [ queue_out ]]); 535 `tf (" "); 539 } } 541  $t_phy_out_id ( ut8_t pe_num ,  pe * p , ut8_* m ) 543 ut8_t pt_cou = 0; 544  dex = 0; 546  e_pt_hdev_wr * hwq ; 547  e_pe * e = p ->p; 549 `tf ("\n**** set_phy_outport_id() withipeline_num:%d ****\n\n", 550 pe_num ); 551  pt_cou = 0; 552 pt_cou < myA -> pe_ms [ pe_num ]. n_pktq_out ; 553 pt_cou ++) { 555  myA -> pe_ms [ pe_num ]. 556 pktq_out [ pt_cou ]. ty ) { 558  APP_PKTQ_OUT_HWQ : 559 hwq = e -> pts_out [ pt_cou ]. h_pt ; 560 m [ hwq -> pt_id ] = dex ++; 561 `tf ("out_id[%d]:%d\n", dex - 1, 562 m [ dex - 1]); 566 `tf (" "); 570 } } 572  $t_phy_pt_id ( ut8_t pe_num ,  pe * p , ut8_* m ) 574 ut8_t pt_cou = 0; 575  dex = 0; 577  e_pt_hdev_ad * hwq ; 578  e_pe * e = p ->p; 580 `tf ("\n**** set_phy_inport_id() withipeline_num:%d ****\n\n", 581 pe_num ); 582  pt_cou = 0; 583 pt_cou < myA -> pe_ms [ pe_num ]. n_pktq_ ; 584 pt_cou ++) { 586  myA -> pe_ms [ pe_num ]. 587 pktq_ [ pt_cou ]. ty ) { 589  APP_PKTQ_OUT_HWQ : 590 hwq = e -> pts_ [ pt_cou ]. h_pt ; 591 m [ hwq -> pt_id ] = dex ++; 592 `tf ("out_id[%d]:%d\n", dex - 1, 593 m [ dex - 1]); 597 `tf (" "); 601 } } 603 #ifde VNF_ACL 605 ut32_t $g_nh ( ut32_t , ut32_* pt ) 607  i = 0; 608  i = 0; i < MAX_ARP_RT_ENTRY ; i++) { 609 i((( lib_p_rou_b [ i ]. 610 & lib_p_rou_b [ i ]. mask ) == 611 ( & lib_p_rou_b [ i ]. mask ))) { 613 * pt = lib_p_rou_b [ i ].port; 614 lib_p_nh_found ++; 615  lib_p_rou_b [ i ]. nh ; 617 i( ARPICMP_DEBUG > 1) 618 `tf ("Noh match ip 0x%x,ort %u,_ip " 620 , * pt , lib_p_rou_b [ i ].ip, 621 lib_p_rou_b [ i ]. pt , 622 lib_p_rou_b [ i ]. mask , 623 ( lib_p_rou_b [ i ]. & 624 lib_p_rou_b [ i ]. mask ), 625 ( & lib_p_rou_b [ i ]. mask )); 627 i( ARPICMP_DEBUG && ) 628 `tf ("NNH - i0x%x,܈%u\n", , * pt ); 629 lib_p_no_nh_found ++; 631 } } 634  $g_nh_v6 ( ut8_t v6 [], ut32_t * pt , ut8_ nhv6 []) 636  i = 0; 637 ut8_t tmask_v6 [16], t_nd [16], t_ [16]; 638 ut8_t k = 0, l = 0, dthags = 0, dthags1 = 0; 639 `memt ( tmask_v6 , 0, (netmask_ipv6)); 640 `memt ( t_nd , 0, (netip_nd)); 641 `memt ( t_ , 0, (netip_in)); 642 i(! v6 ) 644  i = 0; i < MAX_ARP_RT_ENTRY ; i++) { 646 `cvt_efixn_to_tmask_v6 ( 647 lib_nd_rou_b [ i ]. dth , 648 tmask_v6 ); 650  k = 0; k < 16; k++) { 651 i( lib_nd_rou_b [ i ]. v6 [ k ] & tmask_v6 [k]) { 652 dthags ++; 653 t_nd [ k ] = lib_nd_rou_b [ i ]. v6 [k]; 657  l = 0; < 16;++) { 658 i( v6 [ l ] & tmask_v6 [l]) { 659 dthags1 ++; 660 t_ [ l ] = v6 [l]; 663  j = 0; 664 i(( dthags = dthags1 ) 665 && ( `memcmp ( t_nd , t_ , 666 ( t_nd )) == 0)) { 668 * pt = lib_nd_rou_b [ i ].port; 669 lib_nd_nh_found ++; 671  j = 0; j < 16; j++) 672 nhv6 [ j ] = lib_nd_rou_b [ i ].nhipv6[j]; 677 i( NDIPV6_DEBUG > 1) 678 `tf ("Noh match\n"); 679 dthags = 0; 680 dthags1 = 0; 682 i( NDIPV6_DEBUG && v6 ) 683 `tf ("NNH - i0x%x,܈%u\n", v6 [0], * pt ); 684 lib_nd_no_nh_found ++; 685 } } 688  $g_de_mac_addr_pt (cڡ ut32_t addr , 689 ut32_t * phy_pt ,  h_addr * hw_addr ) 691 lib_p_g_mac_q ++; 692 ut32_t nh = 0; 694 nh = `g_nh ( addr , phy_pt ); 695 i( nh == 0) { 696 i( ARPICMP_DEBUG && addr ) 697 `tf ("ARPICMPoh found for ip %x,ort %d\n", 698 addr , * phy_pt ); 700  NH_NOT_FOUND ; 703  p_y_da * t_p_da = NULL ; 704  p_key_v4 tmp_p_key ; 705 tmp_p_key . pt_id = * phy_pt ; 706 tmp_p_key . = nh ; 708 t_p_da = `ve_p_y ( tmp_p_key ); 709 i( t_p_da = NULL ) { 710 i( ARPICMP_DEBUG && addr ) { 711 tf 713 addr , * phy_pt ); 714 `t_p_b (); 716 lib_p_no_p_y_found ++; 717  ARP_NOT_FOUND ; 719 `h_addr_cy (& t_p_da -> h_addr , hw_addr ); 720 lib_p_p_y_found ++; 721  ARP_FOUND ; 722 } } 725  $g_de_mac_addss_v6 ( ut8_t v6addr [], ut32_t phy_pt , 726  h_addr * hw_addr , ut8_t nhv6 []) 728  i = 0, j = 0, ag = 0; 729 lib_nd_g_mac_q ++; 731 i( v6addr ) 732 `g_nh_v6 ( v6addr , & phy_pt , nhv6 ); 733  j = 0; j < 16; j++) { 734 i( nhv6 [ j ]) 735 ag ++; 737 i( ag == 0) { 738 i( v6addr ) { 739 i( NDIPV6_DEBUG && v6addr ) 740 `tf ("NDIPV6oh found for ipv6 " 743 v6addr [0], ipv6addr[1], ipv6addr[2], ipv6addr[3], 744 v6addr [4], ipv6addr[5], ipv6addr[6], ipv6addr[7], 745 v6addr [8], ipv6addr[9], ipv6addr[10], 746 v6addr [11], ipv6addr[12], ipv6addr[13], 747 v6addr [14], ipv6addr[15], phy_pt ); 752  nd_y_da * t_nd_da = NULL ; 753  nd_key_v6 tmp_nd_key ; 754 tmp_nd_key . pt_id = phy_pt ; 756  i = 0; i < 16; i++) 757 tmp_nd_key . v6 [ i ] = nhv6 [i]; 759 t_nd_da = `ve_nd_y ( tmp_nd_key ); 760 i( t_nd_da = NULL ) { 761 i( NDIPV6_DEBUG && v6addr ) { 762 `tf ("NDIPV6odntry found for ip %x,ort %d\n", 763 v6addr [0], phy_pt ); 765 lib_nd_no_p_y_found ++; 768 `h_addr_cy (& t_nd_da -> h_addr , hw_addr ); 769 lib_nd_nd_y_found ++; 772 } } 775  $g_de_mac_addss_v6_pt ( ut8_t v6addr [], ut32_t * phy_pt , 776  h_addr * hw_addr , ut8_t nhv6 []) 778  i = 0, j = 0, ag = 0; 779 lib_nd_g_mac_q ++; 781 `g_nh_v6 ( v6addr , phy_pt , nhv6 ); 782  j = 0; j < 16; j++) { 783 i( nhv6 [ j ]) 784 ag ++; 786 i( ag == 0) { 787 i( NDIPV6_DEBUG && v6addr ) 788 `tf ("NDIPV6oh found for ipv6 " 791 v6addr [0], ipv6addr[1], ipv6addr[2], ipv6addr[3], 792 v6addr [4], ipv6addr[5], ipv6addr[6], ipv6addr[7], 793 v6addr [8], ipv6addr[9], ipv6addr[10], 794 v6addr [11], ipv6addr[12], ipv6addr[13], 795 v6addr [14], ipv6addr[15], * phy_pt ); 799  nd_y_da * t_nd_da = NULL ; 800  nd_key_v6 tmp_nd_key ; 801 tmp_nd_key . pt_id = * phy_pt ; 803  i = 0; i < 16; i++) 804 tmp_nd_key . v6 [ i ] = nhv6 [i]; 806 t_nd_da = `ve_nd_y ( tmp_nd_key ); 807 i( t_nd_da = NULL ) { 808 i( NDIPV6_DEBUG && v6addr ) { 809 `tf ("NDIPV6odntry found for ip %x,ort %d\n", 810 v6addr [0], * phy_pt ); 812 lib_nd_no_p_y_found ++; 815 `h_addr_cy (& t_nd_da -> h_addr , hw_addr ); 816 lib_nd_nd_y_found ++; 819 } } 824  slib_p_p_b_y { 825  e_pe_b_y mhd ; 826 ut64_t mmaddr ; 829 cڡ * $p__me ( ut16_t p_ ) 831  `CHECK_ENDIAN_16 ( p_ )) { 832 ( ARP_OP_REQUEST ): 834 ( ARP_OP_REPLY ): 836 ( ARP_OP_REVREQUEST ): 838 ( ARP_OP_REVREPLY ): 840 ( ARP_OP_INVREQUEST ): 842 ( ARP_OP_INVREPLY ): 848 } } 850  $t_icmp_ck ( icmp_hdr * icmp_h ) 852 `tf (" ICMP:ype=%d (%s) code=%d id=%d seqnum=%d\n", 853 icmp_h -> icmp_ty , 854 ( icmp_h -> icmp_ty = IP_ICMP_ECHO_REPLY ? "Reply" : 855 ( icmp_h -> icmp_ty == 856 IP_ICMP_ECHO_REQUEST ? "Reqe" : "Undef")), icmp_h -> icmp_code , 857 `CHECK_ENDIAN_16 ( icmp_h -> icmp_idt ), 858 `CHECK_ENDIAN_16 ( icmp_h -> icmp_q_nb )); 859 } } 861  $t_v4_h ( v4_hdr * _h ) 863  icmp_hdr * icmp_h = 864 ( icmp_hdr *)((*) _h + ( v4_hdr )); 865 `tf (" IPv4: Version=%d HLEN=%d Type=%d Length=%d\n", 866 ( _h -> vsi_ihl & 0xf0) >> 4, (ip_h->version_ihl & 0x0f), 867 _h -> ty_of_rvi , `e_u_to_be_16 (_h-> tٮ_ngth )); 868 i( _h -> xt_o_id = IPPROTO_ICMP ) 869 `t_icmp_ck ( icmp_h ); 870 } } 872  $t_p_ck ( p_hdr * p_h ) 874 `tf (" ARP: hrd=%droto=0x%04x hln=%d " 876 `CHECK_ENDIAN_16 ( p_h -> p_hrd ), 877 `CHECK_ENDIAN_16 ( p_h -> p_o ),_h-> p_h , 878 p_h -> p_n , `CHECK_ENDIAN_16 ׽_h-> p_ ), 879 `p__me ( p_h -> p_ )); 881 i( `CHECK_ENDIAN_16 ( p_h -> p_hrd ! ARP_HRD_ETHER ) { 882 `tf ("incorrectrp_hrd format for IPv4 ARP (%d)\n", 883 ( p_h -> p_hrd )); 884 } i( `CHECK_ENDIAN_16 ( p_h -> p_o ! ETHER_TYPE_IPv4 ) { 885 `tf ("incorrectrp_pro format for IPv4 ARP (%d)\n", 886 ( p_h -> p_o )); 887 } i( p_h -> p_h != 6) { 888 `tf ("incorrectrp_hln format for IPv4 ARP (%d)\n", 889 p_h -> p_h ); 890 } i( p_h -> p_n != 4) { 891 `tf ("incorrectrp_pln format for IPv4 ARP (%d)\n", 892 p_h -> p_n ); 895 `tf (" sha=%02X:%02X:%02X:%02X:%02X:%02X", 896 p_h -> p_da . p_sha . addr_bys [0], 897 p_h -> p_da . p_sha . addr_bys [1], 898 p_h -> p_da . p_sha . addr_bys [2], 899 p_h -> p_da . p_sha . addr_bys [3], 900 p_h -> p_da . p_sha . addr_bys [4], 901 p_h -> p_da . p_sha . addr_bys [5]); 902 `tf (" sip=%d.%d.%d.%d\n", 903 ( `CHECK_ENDIAN_32 ( p_h -> p_da . p_s ) >> 24) & 0xFF, 904 ( `CHECK_ENDIAN_32 ( p_h -> p_da . p_s ) >> 16) & 0xFF, 905 ( `CHECK_ENDIAN_32 ( p_h -> p_da . p_s ) >> 8) & 0xFF, 906 `CHECK_ENDIAN_32 ( p_h -> p_da . p_s ) & 0xFF); 907 `tf ("ha=%02X:%02X:%02X:%02X:%02X:%02X", 908 p_h -> p_da . p_tha . addr_bys [0], 909 p_h -> p_da . p_tha . addr_bys [1], 910 p_h -> p_da . p_tha . addr_bys [2], 911 p_h -> p_da . p_tha . addr_bys [3], 912 p_h -> p_da . p_tha . addr_bys [4], 913 p_h -> p_da . p_tha . addr_bys [5]); 914 `tf ("ip=%d.%d.%d.%d\n", 915 ( `CHECK_ENDIAN_32 ( p_h -> p_da . p_t ) >> 24) & 0xFF, 916 ( `CHECK_ENDIAN_32 ( p_h -> p_da . p_t ) >> 16) & 0xFF, 917 ( `CHECK_ENDIAN_32 ( p_h -> p_da . p_t ) >> 8) & 0xFF, 918 `CHECK_ENDIAN_32 ( p_h -> p_da . p_t ) & 0xFF); 920 } } 922  $t_h ( h_hdr * h_h ) 924 `tf (" ETH: src=%02X:%02X:%02X:%02X:%02X:%02X", 925 h_h -> s_addr . addr_bys [0], 926 h_h -> s_addr . addr_bys [1], 927 h_h -> s_addr . addr_bys [2], 928 h_h -> s_addr . addr_bys [3], 929 h_h -> s_addr . addr_bys [4],th_h->s_addr.addr_bytes[5]); 930 `tf (" dst=%02X:%02X:%02X:%02X:%02X:%02X\n", 931 h_h -> d_addr . addr_bys [0], 932 h_h -> d_addr . addr_bys [1], 933 h_h -> d_addr . addr_bys [2], 934 h_h -> d_addr . addr_bys [3], 935 h_h -> d_addr . addr_bys [4],th_h->d_addr.addr_bytes[5]); 937 } } 940 $t_mbuf (cڡ * rx_tx ,  ptid ,  e_mbuf * mbuf , 941  le ) 943  h_hdr * h_h = `e_pktmbuf_mtod ( mbuf , ether_hdr *); 944  p_hdr * p_h = 945 ( p_hdr *)((*) h_h + ( h_hdr )); 946  v4_hdr * v4_h = 947 ( v4_hdr *)((*) h_h + ( h_hdr )); 949 `tf ("%s(%d): onort %dkt-len=%ub-segs=%u\n", 950 rx_tx , le , ptid , mbuf -> pkt_n , mbuf-> nb_gs ); 951 `t_h ( h_h ); 952  `e_u_to_be_16 ( h_h -> h_ty )) { 953  ETHER_TYPE_IPv4 : 954 `t_v4_h ( v4_h ); 956  ETHER_TYPE_ARP : 957 `t_p_ck ( p_h ); 960 `tf (" unknownacketype\n"); 963 `fush ( dout ); 964 } } 966  p_y_da * $ve_p_y ( p_key_v4 p_key ) 968  p_y_da * t_p_da = NULL ; 969 p_key . fr1 = 0; 970 p_key . fr2 = 0; 971 p_key . fr3 = 0; 973  t = `e_hash_lookup_da ( p_hash_hd , & p_key , 974 (**)& t_p_da ); 975 i( t < 0) { 976 i( ARPICMP_DEBUG ) 977 `tf ("arp-hashookup failedet %d, " 979 t , EINVAL , ENOENT ); 981  t_p_da ; 984  NULL ; 985 } } 993  nd_y_da * $ve_nd_y ( nd_key_v6 nd_key ) 995  nd_y_da * t_nd_da = NULL ; 996 nd_key . fr1 = 0; 997 nd_key . fr2 = 0; 998 nd_key . fr3 = 0; 1001  t = `e_hash_lookup_da ( nd_hash_hd , & nd_key , 1002 (**)& t_nd_da ); 1003 i( t < 0) { 1004 i( NDIPV6_DEBUG ) 1005 `tf ("nd-hash:oookup Entry Found - " 1007 t , EINVAL , ENOENT ); 1009  t_nd_da ; 1012  NULL ; 1013 } } 1015  $t_p_b () 1017 cڡ * xt_key ; 1018 * xt_da ; 1019 ut32_t = 0; 1021 `tf ("\tport hwddr status ipddr\n"); 1023  `e_hash_e ( p_hash_hd , & xt_key , & xt_da , & ) 1026  p_y_da * tmp_p_da = 1027 ( p_y_da *) xt_da ; 1028  p_key_v4 tmp_p_key ; 1029 `memy (& tmp_p_key , xt_key , ( p_key_v4 )); 1030 tf 1032 tmp_p_da -> pt ,mp_p_da-> h_addr . addr_bys [0], 1033 tmp_p_da -> h_addr . addr_bys [1], 1034 tmp_p_da -> h_addr . addr_bys [2], 1035 tmp_p_da -> h_addr . addr_bys [3], 1036 tmp_p_da -> h_addr . addr_bys [4], 1037 tmp_p_da -> h_addr . addr_bys [5], 1038 tmp_p_da -> us == 1039 COMPLETE ? "COMPLETE" : "INCOMPLETE", 1040 ( tmp_p_da -> >> 24), 1041 (( tmp_p_da -> & 0x00ff0000) >> 16), 1042 (( tmp_p_da -> & 0x0000ff00) >> 8), 1043 (( tmp_p_da -> & 0x000000ff))); 1046 ut32_t i = 0; 1047 `tf ("\nARPoutgab ha%drs\n", p_rou_tbl_dex ); 1048 `tf ("\nIP_Address Mask Port NH_IP_Address\n"); 1049  i = 0; i < p_rou_tbl_dex ; i++) { 1050 `tf ("0x%x 0x%x %d 0x%x\n", 1051 lib_p_rou_b [ i ]. , 1052 lib_p_rou_b [ i ]. mask , 1053 lib_p_rou_b [ i ]. pt ,ib_p_rou_b[i]. nh ); 1056 `tf ("\nARP Stats: Total Queries %u, ok_NH %u,o_NH %u, " 1058 lib_p_g_mac_q , lib_p_nh_found , lib_p_no_nh_found , 1059 lib_p_p_y_found , lib_p_no_p_y_found , 1060 lib_p_puϋ_ed , lib_p_de_ed , 1061 lib_p_dui_found ); 1063 `tf ("ARPab key i%lu\n", ( p_key_v4 )); 1064 } } 1067  $t_nd_b () 1069 cڡ * xt_key ; 1070 * xt_da ; 1071 ut32_t = 0; 1072 ut8_t ii = 0, j = 0, k = 0; 1074 `tf ("\tport hwddr status ipddr\n"); 1076  `e_hash_e ( nd_hash_hd , & xt_key , & xt_da , & ) >= 1079  nd_y_da * tmp_nd_da = 1080 ( nd_y_da *) xt_da ; 1081  nd_key_v6 tmp_nd_key ; 1082 `memy (& tmp_nd_key , xt_key , ( nd_key_v6 )); 1083 `tf ("\t%4d %02X:%02X:%02X:%02X:%02X:%02X %10s\n", 1084 tmp_nd_da -> pt , 1085 tmp_nd_da -> h_addr . addr_bys [0], 1086 tmp_nd_da -> h_addr . addr_bys [1], 1087 tmp_nd_da -> h_addr . addr_bys [2], 1088 tmp_nd_da -> h_addr . addr_bys [3], 1089 tmp_nd_da -> h_addr . addr_bys [4], 1090 tmp_nd_da -> h_addr . addr_bys [5], 1091 tmp_nd_da -> us == 1092 COMPLETE ? "COMPLETE" : "INCOMPLETE"); 1093 `tf ("\t\t\t\t\t\t"); 1094  ii = 0; i< ND_IPV6_ADDR_SIZE ; ii += 2) { 1095 `tf ("%02X%02X ", tmp_nd_da -> v6 [ ii ], 1096 tmp_nd_da -> v6 [ ii + 1]); 1098 `tf ("\n"); 1101 ut32_t i = 0; 1102 `tf ("\n\nND IPV6outingable has %dntries\n", 1103 nd_rou_tbl_dex ); 1104 `tf ("\nIP_Address Depth Port NH_IP_Address\n"); 1105  i = 0; i < nd_rou_tbl_dex ; i++) { 1106 `tf ("\n"); 1108  j = 0; j < ND_IPV6_ADDR_SIZE ; j += 2) { 1109 `tf ("%02X%02X ", lib_nd_rou_b [ i ]. v6 [ j ], 1110 lib_nd_rou_b [ i ]. v6 [ j + 1]); 1113 tf 1115 lib_nd_rou_b [ i ]. dth ,ib_nd_rou_b[i]. pt ); 1116 `tf ("\t\t\t\t\t\t\t\t\t"); 1117  k = 0; k < ND_IPV6_ADDR_SIZE ; k += 2) { 1118 `tf ("%02X%02X ", lib_nd_rou_b [ i ]. nhv6 [ k ], 1119 lib_nd_rou_b [ i ]. v6 [ k + 1]); 1122 `tf ("\nND IPV6 Stats:\nTotal Queries %u, ok_NH %u,o_NH %u," 1124 lib_nd_g_mac_q , lib_nd_nh_found , lib_nd_no_nh_found , 1125 lib_nd_nd_y_found , lib_nd_no_p_y_found , 1126 lib_nd_puϋ_ed , lib_nd_de_ed , 1127 lib_nd_dui_found ); 1128 `tf ("NDab key i%lu\n\n", ( nd_key_v6 )); 1129 } } 1131  $move_p_y ( ut32_t addr , ut8_t ptid ) 1136  p_key_v4 p_key ; 1137 p_key . pt_id = ptid ; 1138 p_key . = addr ; 1139 p_key . fr1 = 0; 1140 p_key . fr2 = 0; 1141 p_key . fr3 = 0; 1143 lib_p_de_ed ++; 1145 i( ARPICMP_DEBUG ) 1146 `tf ("move_p_y i%x,܈%d\n", p_key . , 1147 p_key . pt_id ); 1148 `e_hash_d_key ( p_hash_hd , & p_key ); 1149 } } 1152  $move_nd_y_v6 ( ut8_t v6addr [], ut8_ ptid ) 1156  i = 0; 1157  nd_key_v6 nd_key ; 1158 nd_key . pt_id = ptid ; 1161  i = 0; i < ND_IPV6_ADDR_SIZE ; i++) 1162 nd_key . v6 [ i ] = v6addr [i]; 1164 nd_key . fr1 = 0; 1165 nd_key . fr2 = 0; 1166 nd_key . fr3 = 0; 1168 lib_nd_de_ed ++; 1170 i( NDIPV6_DEBUG ) { 1171 `tf ("Deleteste hashabledntry forort %d ipv6=", 1172 nd_key . pt_id ); 1173  i = 0; i < ND_IPV6_ADDR_SIZE ; i += 2) 1174 `tf ("%02X%02X ", nd_key . v6 [ i ],d_key.ipv6[i + 1]); 1176 `e_hash_d_key ( nd_hash_hd , & nd_key ); 1177 } } 1180 $puϋ_p_y (cڡ  h_addr * hw_addr , ut32_t addr , 1181 ut8_t ptid ) 1185  p_key_v4 p_key ; 1186 p_key . pt_id = ptid ; 1187 p_key . = addr ; 1188 p_key . fr1 = 0; 1189 p_key . fr2 = 0; 1190 p_key . fr3 = 0; 1192 lib_p_puϋ_ed ++; 1194 i( ARPICMP_DEBUG ) 1195 `tf ("puϋ_p_y i%x,܈%d\n", p_key . , 1196 p_key . pt_id ); 1197  p_y_da * w_p_da = `ve_p_y ( p_key ); 1198 i( w_p_da 1199 && `is_me_h_addr (& w_p_da -> h_addr , hw_addr )) { 1200 i( ARPICMP_DEBUG ) 1201 `tf ("p_yxi%x,܈%d\n", p_key . , 1202 p_key . pt_id ); 1203 lib_p_dui_found ++; 1206 w_p_da = ( p_y_da *) 1207 `mloc (( p_y_da )); 1208 i( w_p_da = NULL ) { 1209 `tf ("populate_arp_entry:new_arp_data is NULL\n"); 1212 w_p_da -> h_addr = * hw_addr ; 1213 w_p_da -> us = INCOMPLETE ; 1214 w_p_da -> pt = ptid ; 1215 w_p_da -> = addr ; 1216 `e_hash_add_key_da ( p_hash_hd , & p_key , w_p_da ); 1218 i( ARPICMP_DEBUG ) { 1220 `tf ("\tARP:able update - hwaddr= " 1223 w_p_da -> h_addr . addr_bys [0], 1224 w_p_da -> h_addr . addr_bys [1], 1225 w_p_da -> h_addr . addr_bys [2], 1226 w_p_da -> h_addr . addr_bys [3], 1227 w_p_da -> h_addr . addr_bys [4], 1228 w_p_da -> h_addr . addr_bys [5], 1229 ( p_key . >> 24), 1230 (( p_key . & 0x00ff0000) >> 16), 1231 (( p_key . & 0x0000ff00) >> 8), 1232 (( p_key . & 0x000000ff)), ptid ); 1234 `puts (""); 1236 } } 1245 $puϋ_nd_y (cڡ  h_addr * hw_addr , ut8_t v6 [], 1246 ut8_t ptid ) 1251 ut8_t i ; 1252  nd_key_v6 nd_key ; 1253 nd_key . pt_id = ptid ; 1255  i = 0; i < ND_IPV6_ADDR_SIZE ; i++ ) 1256 nd_key . v6 [ i ] = ipv6[i]; 1258 `tf ("\n"); 1259 nd_key . fr1 = 0; 1260 nd_key . fr2 = 0; 1261 nd_key . fr3 = 0; 1263 lib_nd_puϋ_ed ++; 1268  nd_y_da * w_nd_da = `ve_nd_y ( nd_key ); 1270 i( w_nd_da && `is_me_h_addr (&w_nd_da-> h_addr , 1271 hw_addr )) { 1273 i( NDIPV6_DEBUG ) { 1274 `tf ("nd_entryxistsort %d ipv6 = ", 1275 nd_key . pt_id ); 1276  i = 0; i < ND_IPV6_ADDR_SIZE ; i += 2) { 1278 `tf ("%02X%02X ", nd_key . v6 [ i ], 1279 nd_key . v6 [ i + 1]); 1283 lib_nd_dui_found ++; 1284 i( NDIPV6_DEBUG ) 1285 `tf ("nd_entryxists\n"); 1289 w_nd_da = ( nd_y_da *) 1290 `mloc (( nd_y_da )); 1291 i( w_nd_da = NULL ) { 1292 `tf ("populate_nd_entry:ew_nd_data is NULL\n"); 1295 w_nd_da -> h_addr = * hw_addr ; 1296 w_nd_da -> us = COMPLETE ; 1297 w_nd_da -> pt = ptid ; 1299 i( NDIPV6_DEBUG ) 1300 `tf ("populate_nd_entry ipv6="); 1302  i = 0; i < ND_IPV6_ADDR_SIZE ; i++ ) 1303 w_nd_da -> v6 [ i ] = ipv6[i]; 1305 i( NDIPV6_DEBUG ) { 1306  i = 0; i < ND_IPV6_ADDR_SIZE ; i += 2) { 1308 `tf ("%02X%02X ", w_nd_da -> v6 [ i ], 1309 w_nd_da -> v6 [ i + 1]); 1314 `e_hash_add_key_da ( nd_hash_hd , & nd_key , w_nd_da ); 1316 i( NDIPV6_DEBUG ) 1317 `tf ("\n....Added key-dataairtte hashable " 1320 i( NDIPV6_DEBUG ) { 1322 `tf ("\tND:able update - hwaddr= " 1324 w_nd_da -> h_addr . addr_bys [0], 1325 w_nd_da -> h_addr . addr_bys [1], 1326 w_nd_da -> h_addr . addr_bys [2], 1327 w_nd_da -> h_addr . addr_bys [3], 1328 w_nd_da -> h_addr . addr_bys [4], 1329 w_nd_da -> h_addr . addr_bys [5], ptid ); 1330 `tf ("\tipv6="); 1331  i = 0; i < ND_IPV6_ADDR_SIZE ; i += 2) { 1332 w_nd_da -> v6 [ i ] = ipv6[i]; 1333 `tf ("%02X%02X ", w_nd_da -> v6 [ i ], 1334 w_nd_da -> v6 [ i + 1]); 1337 `tf ("\n"); 1339 `puts (""); 1342 } } 1344  $t_pkt1 ( e_mbuf * pkt ) 1346 ut8_t * rd = `RTE_MBUF_METADATA_UINT8_PTR ( pkt , 0); 1347  i = 0, j = 0; 1348 `tf ("\nPacket Contents...\n"); 1349  i = 0; i < 20; i++) { 1350  j = 0; j < 20; j++) 1351 `tf ("%02x ", rd [(20 * i + j ]); 1352 `tf ("\n"); 1354 } } 1356  h_addr gbrd_h_addr = { 1357 . addr_bys [0] = 0xFF, 1358 . gaddr_bys [1] = 0xFF, 1359 . gaddr_bys [2] = 0xFF, 1360 . gaddr_bys [3] = 0xFF, 1361 . gaddr_bys [4] = 0xFF, 1362 . gaddr_bys [5] = 0xFF, 1365 cڡ  h_addr gnu_h_addr = { 1366 . addr_bys [0] = 0x00, 1367 . gaddr_bys [1] = 0x00, 1368 . gaddr_bys [2] = 0x00, 1369 . gaddr_bys [3] = 0x00, 1370 . gaddr_bys [4] = 0x00, 1371 . gaddr_bys [5] = 0x00, 1374  #MAX_NUM_MAC_ADDRESS 16 ) 1375  h_addr glk_hw_addr [ MAX_NUM_MAC_ADDRESS ] = { 1376 {. addr_bys = {0x90, 0xe2, 0xba, 0x54, 0x67, 0xc8} }, 1377 {. gaddr_bys = {0x90, 0xe2, 0xba, 0x54, 0x67, 0xc9} }, 1378 {. gaddr_bys = {0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11} }, 1379 {. gaddr_bys = {0x12, 0x13, 0x14, 0x15, 0x16, 0x17} }, 1380 {. gaddr_bys = {0x22, 0x33, 0x44, 0x55, 0x66, 0x77} }, 1381 {. gaddr_bys = {0x12, 0x13, 0x14, 0x15, 0x16, 0x17} }, 1382 {. gaddr_bys = {0x22, 0x33, 0x44, 0x55, 0x66, 0x77} }, 1383 {. gaddr_bys = {0x90, 0xe2, 0xba, 0x54, 0x67, 0xc9} }, 1384 {. gaddr_bys = {0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11} }, 1385 {. gaddr_bys = {0x12, 0x13, 0x14, 0x15, 0x16, 0x17} }, 1386 {. gaddr_bys = {0x22, 0x33, 0x44, 0x55, 0x66, 0x77} }, 1387 {. gaddr_bys = {0x12, 0x13, 0x14, 0x15, 0x16, 0x17} }, 1388 {. gaddr_bys = {0x22, 0x33, 0x44, 0x55, 0x66, 0x77} }, 1389 {. gaddr_bys = {0x12, 0x13, 0x14, 0x15, 0x16, 0x17} }, 1390 {. gaddr_bys = {0x22, 0x33, 0x44, 0x55, 0x66, 0x77} }, 1391 {. gaddr_bys = {0x18, 0x19, 0x1a, 0x1b, 0xcd, 0xef} } 1394  h_addr * $g_lk_hw_addr ( ut8_t out_pt ) 1396  & lk_hw_addr [ out_pt ]; 1397 } } 1400 $que_icmp_echo ( pt_id , ut32_t ,  h_addr * gw_addr ) 1402  h_hdr * h_h ; 1403  v4_hdr * _h ; 1404  icmp_hdr * icmp_h ; 1406  p_lk_ms * lk ; 1407 lk = & myA -> lk_ms [ pt_id ]; 1408 p_pt_addss [ pt_id ]. = lk ->ip; 1409 p_pt_addss [ pt_id ]. mac_addr = lk ->mac_addr; 1411  e_mbuf * icmp_pkt = lib_p_pkt ; 1412 i( icmp_pkt = NULL ) { 1413 i( ARPICMP_DEBUG ) 1414 `tf ("Errorllocating icmp_pktte_mbuf\n"); 1418 h_h = `e_pktmbuf_mtod ( icmp_pkt ,  h_hdr *); 1419 `h_addr_cy ( gw_addr , & h_h -> d_addr ); 1420 `h_addr_cy (( h_addr *) 1421 & p_pt_addss [ pt_id ]. mac_addr , & h_h -> s_addr ); 1422 h_h -> h_ty = `CHECK_ENDIAN_16 ( ETHER_TYPE_IPv4 ); 1424 _h = ( v4_hdr *)((*) h_h + ( h_hdr )); 1425 icmp_h = ( icmp_hdr *)((*) _h + ( v4_hdr )); 1427 _h -> vsi_ihl = IP_VHL_DEF ; 1428 _h -> ty_of_rvi = 0; 1429 _h -> tٮ_ngth = 1430 `e_u_to_be_16 (( v4_hdr + ( icmp_hdr )); 1431 _h -> ck_id = 0xaabb; 1432 _h -> agmt_offt = 0x0000; 1433 _h -> time_to_live = 64; 1434 _h -> xt_o_id = IPPROTO_ICMP ; 1435 _h -> c_addr = `e_bsw32 ( p_pt_addss [ pt_id ]. ); 1436 _h -> d_addr = ; 1438 _h -> hdr_checksum = 0; 1439 _h -> hdr_checksum = `e_v4_cksum (ip_h); 1441 icmp_h -> icmp_ty = IP_ICMP_ECHO_REQUEST ; 1442 icmp_h -> icmp_code = 0; 1443 icmp_h -> icmp_idt = 0xdead; 1444 icmp_h -> icmp_q_nb = 0xbeef; 1446 icmp_h -> icmp_cksum = ~ `e_w_cksum (icmp_h, ( icmp_hdr )); 1448 icmp_pkt -> pkt_n = 1449 ( h_hdr + ( v4_hdr ) + 1450 ( icmp_hdr ); 1451 icmp_pkt -> da_n = icmp_pkt-> pkt_n ; 1453 i( ARPICMP_DEBUG ) { 1454 `tf ("Sendingchoequest\n"); 1455 `t_mbuf ("TX", pt_id , icmp_pkt , __LINE__ ); 1458 `e_pe_pt_out_ck_ ( gp_p -> p .p, 1459 gp_p -> out_id [ pt_id ], icmp_pkt ); 1460 gp_p -> PktCou ++; 1461 } } 1463  $que_echo ( pt_id , ut32_t ) 1465 () pt_id ; 1466 () ; 1468  h_addr gw_addr ; 1469 ut32_t de_ = `e_bsw32 ( ); 1470 ut32_t phy_pt ; 1472 i( `g_de_mac_addr_pt ( de_ , & phy_pt , & gw_addr = ARP_FOUND ) { 1473 `que_icmp_echo ( phy_pt , , & gw_addr ); 1477 i( ARPICMP_DEBUG ) 1478 `tf ("Sendingchoequest ... get mac failed.\n"); 1479 } } 1481  $que_p ( ut8_t pt_id , ut32_t ,  e_pe * e_p ) 1483 () pt_id ; 1484 () ; 1486  h_hdr * h_h ; 1487  p_hdr * p_h ; 1489  p_lk_ms * lk ; 1490 lk = & myA -> lk_ms [ pt_id ]; 1491 p_pt_addss [ pt_id ]. = lk ->ip; 1492 p_pt_addss [ pt_id ]. mac_addr = lk ->mac_addr; 1494  e_mbuf * p_pkt = lib_p_pkt ; 1496 i( p_pkt = NULL ) { 1497 i( ARPICMP_DEBUG ) 1498 `tf ("Errorllocatingrp_pktte_mbuf\n"); 1502 h_h = `e_pktmbuf_mtod ( p_pkt ,  h_hdr *); 1504 `h_addr_cy (& brd_h_addr , & h_h -> d_addr ); 1505 `h_addr_cy (( h_addr *) 1506 & p_pt_addss [ pt_id ]. mac_addr , & h_h -> s_addr ); 1507 h_h -> h_ty = `CHECK_ENDIAN_16 ( ETHER_TYPE_ARP ); 1509 p_h = ( p_hdr *)((*) h_h + ( h_hdr )); 1510 p_h -> p_hrd = `CHECK_ENDIAN_16 ( ARP_HRD_ETHER ); 1511 p_h -> p_o = `CHECK_ENDIAN_16 ( ETHER_TYPE_IPv4 ); 1512 p_h -> p_h = ETHER_ADDR_LEN ; 1513 p_h -> p_n = ( ut32_t ); 1514 p_h -> p_ = `CHECK_ENDIAN_16 ( ARP_OP_REQUEST ); 1516 `h_addr_cy (( h_addr *) 1517 & p_pt_addss [ pt_id ]. mac_addr , 1518 & p_h -> p_da . p_sha ); 1519 p_h -> p_da . p_s = 1520 `e_u_to_be_32 ( p_pt_addss [ pt_id ]. ); 1521 `h_addr_cy (& nu_h_addr , & p_h -> p_da . p_tha ); 1522 p_h -> p_da . p_t = `e_u_to_be_32 ( ); 1523 `tf ("t:%x s :%x\n", p_h -> p_da . p_t , 1524 p_h -> p_da . p_s ); 1530 p_pkt -> pkt_n = 42; 1531 p_pkt -> da_n = 42; 1533 i( ARPICMP_DEBUG ) { 1534 `tf ("Sendingrpequest\n"); 1535 `t_mbuf ("TX", pt_id , p_pkt , __LINE__ ); 1538 `e_pe_pt_out_ck_ ( e_p , pt_id , p_pkt ); 1539 gp_p -> PktCou ++; 1541 } } 1543  $que_p_wp ( ut8_t pt_id , ut32_t ) 1545 `que_p ( pt_id , , gp_p -> p .p); 1546 } } 1548  $oss_picmp_pkt ( 1549  e_mbuf * pkt , 1550 ut32_t out_pt , 1551 ut32_t pkt_mask ) 1553 ut8_t _pt_id = pkt -> pt ; 1554  p_lk_ms * lk ; 1555  h_hdr * h_h ; 1556  p_hdr * p_h ; 1557  v4_hdr * _h ; 1558  icmp_hdr * icmp_h ; 1559 ut32_t cksum ; 1560 ut32_t _addr ; 1561 ut32_t q_t ; 1564 h_h = `e_pktmbuf_mtod ( pkt ,  h_hdr *); 1566 i( h_h -> h_ty = `e_u_to_be_16 ( ETHER_TYPE_ARP )) { 1567 p_h = 1568 ( p_hdr *)((*) h_h + 1569 ( h_hdr )); 1570 i( `CHECK_ENDIAN_16 ( p_h -> p_hrd ! ARP_HRD_ETHER ) 1571 tf 1574 i( `CHECK_ENDIAN_16 ( p_h -> p_o ! ETHER_TYPE_IPv4 ) 1575 tf 1578 i( p_h -> p_h != 6) 1579 tf 1582 i( p_h -> p_n != 4) 1583 tf 1587 lk = & myA -> lk_ms [ _pt_id ]; 1588 p_pt_addss [ _pt_id ]. = lk ->ip; 1589 p_pt_addss [ _pt_id ]. mac_addr = 1590 lk -> mac_addr ; 1592 i( p_h -> p_da . p_t != 1593 `e_bsw32 ( p_pt_addss [ _pt_id ]. )) { 1594 tf 1597 `tf ("arp_tip = %x\n", 1598 p_h -> p_da . p_t ); 1599 `tf ("arp_port_addresses = %x\n", 1600 p_pt_addss [ _pt_id ]. ); 1601 `tf ("_pt_id = %x\n", _pt_id ); 1602 `tf ("arp_port_addresses[0] = %x\n", 1603 p_pt_addss [0]. ); 1605 `e_pe_ah_ck_dr ( gp_p -> p .p, 1606 pkt_mask ); 1607 gp_p -> drݳdPktCou ++; 1614 i( p_h -> p_ == 1615 `e_u_to_be_16 ( ARP_OP_REQUEST )) { 1617 i( ARPICMP_DEBUG ) { 1618 `tf ("arp_op %d, ARP_OP_REQUEST %d\n", 1619 p_h -> p_ , 1620 `e_u_to_be_16 ( ARP_OP_REQUEST )); 1621 `t_mbuf ("RX", _pt_id , pkt , __LINE__ ); 1624 `puϋ_p_y (( h_addr *) 1625 & p_h -> p_da . p_sha , 1626 e_u_to_be_32 1627 ( p_h -> p_da . p_s ), 1628 _pt_id ); 1631 q_t = p_h -> p_da . p_t ; 1632 `h_addr_cy (& h_h -> s_addr , &h_h-> d_addr ); 1635 `h_addr_cy (( h_addr *)& 1636 p_pt_addss [ _pt_id ]. mac_addr , 1637 & h_h -> s_addr ); 1639 p_h -> p_ = `e_u_to_be_16 ( ARP_OP_REPLY ); 1640 `h_addr_cy (& h_h -> s_addr , 1641 & p_h -> p_da . p_sha ); 1642 p_h -> p_da . p_t = 1643 p_h -> p_da . p_s ; 1644 p_h -> p_da . p_s = q_t ; 1645 `h_addr_cy (& h_h -> d_addr , 1646 & p_h -> p_da . p_tha ); 1648 `e_pe_pt_out_ck_ ( gp_p -> p .p, 1649 out_pt , pkt ); 1650 gp_p -> PktCou ++; 1652 } i( p_h -> p_ == 1653 `e_u_to_be_16 ( ARP_OP_REPLY )) { 1656 i( ARPICMP_DEBUG ) { 1657 `tf ("ARP_OP_REPLYeceived"); 1658 `t_mbuf ("RX", _pt_id , pkt , 1659 __LINE__ ); 1661 `puϋ_p_y (( h_addr *) 1662 & p_h -> p_da . p_sha , 1663 `e_bsw32 ( p_h -> 1664 p_da . p_s ), 1665 _pt_id ); 1668 `e_pe_ah_ck_dr ( gp_p -> p .p, 1669 pkt_mask ); 1670 gp_p -> drݳdPktCou ++; 1673 i( ARPICMP_DEBUG ) 1674 `tf ("Invalid ARP opcode -ot " 1676 p_h -> p_ ); 1680 _h = 1681 ( v4_hdr *)((*) h_h + 1682 ( h_hdr )); 1683 icmp_h = 1684 ( icmp_hdr *)((*) _h + ( v4_hdr )); 1686 i( h_h -> h_ty = `e_u_to_be_16 ( ETHER_TYPE_IPv4 )) { 1688 lk = & myA -> lk_ms [ _pt_id ]; 1689 p_pt_addss [ _pt_id ]. = lk ->ip; 1690 p_pt_addss [ _pt_id ]. mac_addr = 1691 lk -> mac_addr ; 1693 i(! `is_me_h_addr (( h_addr *) 1694 & p_pt_addss [ _pt_id ]. 1695 mac_addr , & h_h -> d_addr )) { 1697 i( ARPICMP_DEBUG ) 1698 `tf ("Ethernet frameot destined " 1702 } i( _h -> xt_o_id ! IPPROTO_ICMP ) { 1703 i( ARPICMP_DEBUG ) 1704 `tf ("IProtocol ID isot seto " 1707 } i(( _h -> vsi_ihl & 0xf0! IP_VERSION_4 ) { 1708 i( ARPICMP_DEBUG ) 1709 `tf ("IP version otherhan 4 - " 1712 } i(( _h -> vsi_ihl & 0x0f! IP_HDRLEN ) { 1713 i( ARPICMP_DEBUG ) 1714 `tf ("Unknown IHL - discarding\n"); 1717 i( icmp_h -> icmp_ty = IP_ICMP_ECHO_REQUEST 1718 && icmp_h -> icmp_code == 0) { 1719 i( ARPICMP_DEBUG ) 1720 `t_mbuf ("RX", _pt_id , 1721 pkt , __LINE__ ); 1723 _addr = _h -> c_addr ; 1724 `h_addr_cy (& h_h -> s_addr , 1725 & h_h -> d_addr ); 1726 `h_addr_cy (( h_addr *) 1727 & p_pt_addss 1728 [ _pt_id ]. mac_addr , 1729 & h_h -> s_addr ); 1731 i( _h -> d_addr != 1732 `e_bsw32 ( p_pt_addss 1733 [ _pt_id ]. )) { 1734 i( ARPICMP_DEBUG ) { 1735 `tf ("IPv4acketot destined for " 1738 `tf ("ip_h->dst_addr = %u, " 1741 _h -> d_addr , _pt_id , 1742 p_pt_addss [ _pt_id ]. ); 1746 i( is_mui_v4_addr 1747 ( _h -> d_addr )) { 1748 ut32_t _c ; 1750 _c = e_be_to_u_32 1751 ( _addr ); 1752 i(( _c & 0x00000003) == 1) 1753 _c = (ip_src & 1757 _c = (ip_src & 1761 _h -> c_addr = 1762 `e_u_to_be_32 ( _c ); 1763 _h -> d_addr = _addr ; 1765 _h -> hdr_checksum = 0; 1766 _h -> hdr_checksum = ~ `e_w_cksum ( 1767 _h , ( 1768 v4_hdr )); 1770 _h -> c_addr = ip_h-> d_addr ; 1771 _h -> d_addr = _addr ; 1774 icmp_h -> icmp_ty = 1775 IP_ICMP_ECHO_REPLY ; 1776 cksum = ~ icmp_h -> icmp_cksum & 0xffff; 1777 cksum +~ `hts ( IP_ICMP_ECHO_REQUEST << 8) & 0xffff; 1778 cksum + `hts ( IP_ICMP_ECHO_REPLY << 8); 1779 cksum = (cksum & 0xffff) + (cksum >> 16); 1780 cksum = (cksum & 0xffff) + (cksum >> 16); 1781 icmp_h -> icmp_cksum = ~ cksum ; 1783 i( ARPICMP_DEBUG ) 1784 `t_mbuf ("TX", _pt_id , pkt , __LINE__ ); 1786 `e_pe_pt_out_ck_ ( gp_p -> p .p, 1787 out_pt , pkt ); 1788 gp_p -> PktCou ++; 1792 i( icmp_h -> icmp_ty = IP_ICMP_ECHO_REPLY 1793 && icmp_h -> icmp_code == 0) { 1794 i( ARPICMP_DEBUG ) 1795 `t_mbuf ("RX", _pt_id , 1796 pkt , __LINE__ ); 1798  p_key_v4 p_key ; 1799 p_key . pt_id = _pt_id ; 1800 p_key . = 1801 `e_bsw32 ( _h -> c_addr ); 1802 p_key . fr1 = 0; 1803 p_key . fr2 = 0; 1804 p_key . fr3 = 0; 1806  p_y_da * p_y = 1807 `ve_p_y ( p_key ); 1808 i( p_y = NULL ) { 1809 `tf ("Received unsolicited " 1812 p_key . , 1813 p_key . pt_id ); 1817 p_y -> us = COMPLETE ; 1819 `e_pe_ah_ck_dr ( gp_p -> p .p, 1820 pkt_mask ); 1821 gp_p -> drݳdPktCou ++; 1826 } } 1841  $my___v6 ( af , cڡ * c , * d ) 1843  af ) { 1844  AF_INET : 1845  `__v4 ( c , d ); 1846  AF_INET6 : 1847  `__v6 ( c , d ); 1849 o = EAFNOSUPPORT ; 1853 } } 1865  $__v4 (cڡ * c , * d ) 1867 cڡ  digs [] = "0123456789"; 1868  w_dig , os , ch ; 1869  tmp [ INADDRSZ ], * ; 1871 w_dig = 0; 1872 os = 0; 1873 *( = tmp ) = 0; 1874 ( ch = * c ++) != '\0') { 1875 cڡ * pch ; 1877 pch = `rchr ( digs , ch ); 1878 i( pch ! NULL ) { 1879  w = * * 10 + ( pch - digs ); 1881 i( w > 255) 1883 i(! w_dig ) { 1884 i(++ os > 4) 1886 w_dig = 1; 1888 * = () w ; 1889 } i( ch ='.' && w_dig ) { 1890 i( os == 4) 1892 *++ = 0; 1893 w_dig = 0; 1897 i( os < 4) 1900 `memy ( d , tmp , INADDRSZ ); 1902 } } 1917  $__v6 (cڡ * c , * d ) 1919 cڡ  xdigs_l [] = "0123456789abcdef", 1920 xdigs_u [] = "0123456789ABCDEF"; 1921  tmp [ IN6ADDRSZ ], * = 0, * dp = 0, * cp = 0; 1922 cڡ * xdigs = 0, * cuok = 0; 1923  ch = 0, w_xdig = 0, cou_xdig = 0; 1924  v = 0; 1925  dblo_cou = 0; 1927 `memt (( = tmp ), '\0', IN6ADDRSZ ); 1928 dp = + IN6ADDRSZ ; 1929 cp = NULL ; 1931 i(* c == ':') 1932 i(*++ c != ':') 1934 cuok = c ; 1935 w_xdig = cou_xdig = 0; 1936 v = 0; 1938 ( ch = * c ++) != '\0') { 1939 cڡ * pch ; 1941 pch = `rchr (( xdigs = xdigs_l ), ch ); 1942 i( pch = NULL ) 1943 pch = `rchr (( xdigs = xdigs_u ), ch ); 1944 i( pch ! NULL ) { 1945 i( cou_xdig >= 4) 1947 v <<= 4; 1948 v |( pch - xdigs ); 1949 i( v > 0xffff) 1951 w_xdig = 1; 1952 cou_xdig ++; 1955 i( ch == ':') { 1956 cuok = c ; 1957 i(! w_xdig ) { 1958 i( cp ) 1960 cp = ; 1962 } i(* c == '\0') { 1965 i( + ( t16_t > dp ) 1967 * ++ = ()(( v >> 8) & 0xff); 1968 * ++ = ()( v & 0xff); 1969 w_xdig = 0; 1970 cou_xdig = 0; 1971 v = 0; 1972 dblo_cou ++; 1975 i( ch ='.' && (( + INADDRSZ < dp ) && 1976 `__v4 ( cuok , ) > 0) { 1977 + INADDRSZ ; 1978 w_xdig = 0; 1979 dblo_cou += 2; 1984 i( w_xdig ) { 1985 i( + ( t16_t > dp ) 1987 * ++ = ()(( v >> 8) & 0xff); 1988 * ++ = ()( v & 0xff); 1989 dblo_cou ++; 1991 i( cp ! NULL ) { 1995 i( dblo_cou == 8) 2002 cڡ  n = - cp ; 2003  i ; 2005  i = 1; i < n ; i++) { 2006 dp [- i ] = cp [ n - i]; 2007 cp [ n - i ] = 0; 2009 = dp ; 2011 i( ! dp ) 2013 `memy ( d , tmp , IN6ADDRSZ ); 2015 } } 2034 $oss_icmpv6_pkt ( 2035  e_mbuf * pkt , 2036 ut32_t out_pt , 2037 __e_unud ut32_t pkt_num ) 2040 ut8_t _pt_id = pkt -> pt ; 2041  p_lk_ms * lk ; 2042  h_hdr * h_h ; 2043  v6_hdr * v6_h ; 2044  icmpv6_hdr * icmpv6_h ; 2045  icmpv6_nd_hdr * icmpv6_nd_h ; 2046 ut8_t v6_addr [16]; 2047 ut8_t i = 0, ag = 1; 2048 ut8_t q_tv6 [16]; 2050 h_h = `e_pktmbuf_mtod ( pkt ,  h_hdr *); 2051 v6_h = ( v6_hdr *)((*) h_h + ( h_hdr )); 2052 icmpv6_h = 2053 ( icmpv6_hdr *)((*) v6_h + ( v6_hdr )); 2054  e_mbuf * icmpv6_pkt = pkt ; 2056 lk = & myA -> lk_ms [ _pt_id ]; 2057 icmpv6_pt_addss [ _pt_id ]. mac_addr = lk ->mac_addr; 2059 i(! is_me_h_addr 2060 (( h_addr *)& icmpv6_pt_addss [ _pt_id ]. mac_addr , 2061 & h_h -> d_addr )) { 2062 i( ARPICMP_DEBUG ) { 2063 `tf ("Ethernet frameot destined for MACddress " 2067 i(( icmpv6_h -> icmpv6_ty = ICMPV6_ECHO_REQUEST ) 2068 && ( icmpv6_h -> icmpv6_code == 0)) { 2069  i = 0; i < 16; i++) 2070 v6_addr [ i ] = v6_h -> c_addr [i]; 2072  i = 0; i < 16; i++) { 2073 i( v6_h -> d_addr [ i ] != 2074 icmpv6_pt_addss [ _pt_id ]. v6 [ i ]) { 2075 ag ++; 2078 i(! ag ) { 2079 `tf ("IPv6acketot destined for " 2084 `h_addr_cy (& h_h -> s_addr , 2085 & h_h -> d_addr ); 2086 `h_addr_cy (( h_addr *) 2087 & icmpv6_pt_addss 2088 [ _pt_id ]. mac_addr , 2089 & h_h -> s_addr ); 2091  i = 0; i < 16; i++) 2092 v6_h -> c_addr [ i ] = 2093 v6_h -> d_addr [ i ]; 2094  i = 0; i < 16; i++) 2095 v6_h -> d_addr [ i ] = 2096 v6_addr [ i ]; 2098 icmpv6_h -> icmpv6_ty = 2099 ICMPV6_ECHO_REPLY ; 2101 e_pe_pt_out_ck_ 2102 ( gp_p -> p .p, out_pt , icmpv6_pkt ); 2103 gp_p -> PktCou ++; 2107 } i(( icmpv6_h -> icmpv6_ty = ICMPV6_ECHO_REPLY ) 2108 && ( icmpv6_h -> icmpv6_code == 0)) { 2109  nd_key_v6 nd_key ; 2110 nd_key . pt_id = _pt_id ; 2112  i = 0; i < ND_IPV6_ADDR_SIZE ; i++) 2113 nd_key . v6 [ i ] = v6_h -> c_addr [i]; 2115 nd_key . fr1 = 0; 2116 nd_key . fr2 = 0; 2117 nd_key . fr3 = 0; 2122  nd_y_da * w_nd_da = 2123 `ve_nd_y ( nd_key ); 2125 i( w_nd_da = NULL ) { 2126 `tf ("Received unsolicited ICMPv6cho " 2128 nd_key . pt_id ); 2129  i = 0; i < ND_IPV6_ADDR_SIZE ; i += 2) { 2130 `tf ("%02X%02X ", nd_key . v6 [ i ], 2131 nd_key . v6 [ i + 1]); 2136 w_nd_da -> us = COMPLETE ; 2139 i(( icmpv6_h -> icmpv6_ty = ICMPV6_NEIGHBOR_SOLICITATION ) 2140 && ( icmpv6_h -> icmpv6_code == 0)) { 2142 icmpv6_nd_h = 2143 ( icmpv6_nd_hdr *)((*) icmpv6_h + 2144 ( icmpv6_hdr )); 2145  h_addr * c_hw_addr = & h_h -> s_addr ; 2146 ut8_t c_v6 [16], d_v6 [16]; 2148  i = 0; i < ND_IPV6_ADDR_SIZE ; i++) 2149 c_v6 [ i ] = v6_h -> c_addr [i]; 2150  i = 0; i < ND_IPV6_ADDR_SIZE ; i++) 2151 d_v6 [ i ] = v6_h -> d_addr [i]; 2154 i(( IPV6_MULTICAST 2155 && (( d_v6 [0] << 8) | dst_ipv6[1]))) { 2156 i( puϋ_nd_y 2157 ( c_hw_addr , c_v6 , _pt_id )) { 2160  i = 0; i < ND_IPV6_ADDR_SIZE ; i++) 2161 q_tv6 [ i ] = 2162 icmpv6_nd_h -> rg_v6 [ i ]; 2164 `h_addr_cy (& h_h -> s_addr , 2165 & h_h -> d_addr ); 2166 `h_addr_cy (( h_addr *) 2167 & icmpv6_pt_addss 2168 [ _pt_id ]. mac_addr , 2169 & h_h -> s_addr ); 2172 `h_addr_cy (& h_h -> s_addr , 2173 & icmpv6_nd_h -> 2174 lk_y_addss ); 2175  i = 0; i < ND_IPV6_ADDR_SIZE ; i++) 2176 v6_h -> d_addr [ i ] = 2177 v6_h -> c_addr [ i ]; 2178  i = 0; i < ND_IPV6_ADDR_SIZE ; i++) 2179 v6_h -> c_addr [ i ] = 2180 q_tv6 [ i ]; 2181 icmpv6_h -> icmpv6_ty = 2182 ICMPV6_NEIGHBOR_ADVERTISEMENT ; 2183 icmpv6_nd_h -> ty = 2184 e_Tg_Lk_Lay_Addss ; 2185 icmpv6_nd_h -> icmpv6_rved |= 2186 e_u_to_be_32 2187 ( NEIGHBOR_SOLICITATION_SET ); 2189 e_pe_pt_out_ck_ 2190 ( gp_p -> p .p, out_pt , icmpv6_pkt ); 2191 gp_p -> PktCou ++; 2194 i( ARPICMP_DEBUG ) { 2195 `tf ("Non-Multicasted Neighbor " 2198 `tf ("............Some onelse " 2204 i(( icmpv6_h -> icmpv6_ty = ICMPV6_NEIGHBOR_ADVERTISEMENT ) 2205 && ( icmpv6_h -> icmpv6_code == 0)) { 2206  h_addr * c_hw_addr = & h_h -> s_addr ; 2207 ut8_t v6 [16]; 2208  i = 0; i < ND_IPV6_ADDR_SIZE ; i++) 2209 v6 [ i ] = v6_h -> c_addr [i]; 2211 i( `puϋ_nd_y ( c_hw_addr , v6 , _pt_id )) 2212 i( ARPICMP_DEBUG ) 2213 `tf ("Now on, unicast IPv6raffic " 2217 i( ARPICMP_DEBUG ) { 2218 `tf ("ICMPv6 Type %d Not Supported yet !!!\n", 2219 icmpv6_h -> icmpv6_ty ); 2225 } } 2227  $que_icmpv6_echo ( ut32_t pt_id , ut8_t v6 []) 2229 () pt_id ; 2230 () v6 ; 2231  i ; 2233  h_addr gw_addr ; 2234 ut8_t nhv6 [16]; 2235 ut8_t de_v6 [16]; 2236 ut32_t phy_pt ; 2238  i = 0; i < ND_IPV6_ADDR_SIZE ; i++) 2239 de_v6 [ i ] = v6 [i]; 2241 i( `g_de_mac_addss_v6_pt ( de_v6 , & phy_pt , 2242 & gw_addr , nhv6 )) { 2243 `que_icmpv6_echo_mesge ( phy_pt , v6 , & gw_addr ); 2247 i( ARPICMP_DEBUG ) 2248 `tf ("Sending icmpv6choequest ... get mac failed.\n"); 2249 } } 2252 $que_icmpv6_echo_mesge ( ut16_t pt_id , ut8_t v6 [], 2253  h_addr * gw_addr ) 2255  h_hdr * h_h ; 2256  v6_hdr * v6_h ; 2257  icmpv6_hdr * icmpv6_h ; 2258  icmpv6_fo_hdr * icmpv6_fo_h ; 2259  i ; 2260  p_lk_ms * lk ; 2261 lk = & mylk [ pt_id ]; 2263  i = 0; i < 16; i++) 2264 icmpv6_pt_addss [ pt_id ]. v6 [ i ] = lk ->ipv6[i]; 2266 icmpv6_pt_addss [ pt_id ]. mac_addr = lk ->mac_addr; 2268  e_mbuf * icmpv6_pkt = lib_icmpv6_pkt ; 2269 i( icmpv6_pkt = NULL ) { 2270 i( ARPICMP_DEBUG ) 2271 `tf ("Errorllocating icmpv6_pktte_mbuf\n"); 2275 h_h = `e_pktmbuf_mtod ( icmpv6_pkt ,  h_hdr *); 2276 `h_addr_cy ( gw_addr , & h_h -> d_addr ); 2277 `h_addr_cy (( h_addr *)& icmpv6_pt_addss [ pt_id ]. 2278 mac_addr , & h_h -> s_addr ); 2279 h_h -> h_ty = `CHECK_ENDIAN_16 ( ETHER_TYPE_IPv6 ); 2281 v6_h = ( v6_hdr *)((*) h_h + ( h_hdr )); 2282 icmpv6_h = 2283 ( icmpv6_hdr *)((*) v6_h + ( v6_hdr )); 2284 icmpv6_fo_h = 2285 ( icmpv6_fo_hdr *)((*) icmpv6_h + 2286 ( icmpv6_hdr )); 2288 v6_h -> vtc_ow = 0x60000000; 2289 v6_h -> yld_n = 64; 2290 v6_h -> o = 58; 2291 v6_h -> h_lims = 64; 2293  i = 0; i < 16; i++) { 2294 v6_h -> c_addr [ i ] = icmpv6_pt_addss [ pt_id ]. v6 [i]; 2295 v6_h -> d_addr [ i ] = v6 [i]; 2298 icmpv6_h -> icmpv6_ty = ICMPV6_ECHO_REQUEST ; 2299 icmpv6_h -> icmpv6_code = 0; 2300 icmpv6_fo_h -> icmpv6_idt = 0x5151; 2301 icmpv6_fo_h -> icmpv6_q_nb = 0x1; 2303 icmpv6_h -> icmpv6_cksum = 2304 ~ `e_w_cksum ( icmpv6_h , ( icmpv6_hdr )); 2306 icmpv6_pkt -> pkt_n = 2307 ( h_hdr + ( v6_hdr ) + 2308 ( icmpv6_hdr ); 2309 icmpv6_pkt -> da_n = icmpv6_pkt-> pkt_n ; 2311 i( ARPICMP_DEBUG ) 2312 `tf ("Sending icmpv6choequest\n"); 2314 `e_pe_pt_out_ck_ ( gp_p -> p .p, 2315 gp_p -> out_id [ pt_id ], 2316 icmpv6_pkt ); 2318 gp_p -> PktCou ++; 2319 } } 2324 * pe_picmp_msg_q_cuom_hdr ( pe * p , 2325 * msg ); 2327  pe_msg_q_hdr ghdrs [] = { 2328 [ PIPELINE_MSG_REQ_PING ] = 2329 pe_msg_q_pg_hdr , 2330 [ PIPELINE_MSG_REQ_STATS_PORT_IN ] = 2331 pe_msg_q_s_pt__hdr , 2332 [ PIPELINE_MSG_REQ_STATS_PORT_OUT ] = 2333 pe_msg_q_s_pt_out_hdr , 2334 [ PIPELINE_MSG_REQ_STATS_TABLE ] = 2335 pe_msg_q_s_b_hdr , 2336 [ PIPELINE_MSG_REQ_PORT_IN_ENABLE ] = 2337 pe_msg_q_pt__ab_hdr , 2338 [ PIPELINE_MSG_REQ_PORT_IN_DISABLE ] = 2339 pe_msg_q_pt__dib_hdr , 2340 [ PIPELINE_MSG_REQ_CUSTOM ] = 2341 pe_picmp_msg_q_cuom_hdr , 2345 * pe_picmp_msg_q_y_dbg_hdr ( pe * p , 2346 * msg ); 2347 * $pe_picmp_msg_q_y_dbg_hdr ( 2348 __e_unud  pe * p , 2349 __e_unud * msg ) 2352  NULL ; 2353 } } 2355  __e_unud pe_msg_q_hdr gcuom_hdrs [] = { 2356 [ PIPELINE_ARPICMP_MSG_REQ_ENTRY_DBG ] = 2357 pe_picmp_msg_q_y_dbg_hdr , 2371 * $pe_picmp_msg_q_cuom_hdr ( pe * p , * msg ) 2373  pe_picmp * p_p = (pe_picm*) p ; 2374  pe_cuom_msg_q * q = msg ; 2375 pe_msg_q_hdr f_hd ; 2377 f_hd = ( q -> subty < PIPELINE_ARPICMP_MSG_REQS ) ? 2378 p_p -> cuom_hdrs [ q -> subty ] : 2379 pe_msg_q_vid_hdr ; 2381 i( f_hd = NULL ) 2382 f_hd = pe_msg_q_vid_hdr ; 2384  `f_hd ( p , q ); 2385 } } 2387 #ifde VNF_ACL 2393 pe_picmp_r_gs ( pe_picmp * p , 2394  pe_ms * ms ); 2396 $pe_picmp_r_gs ( 2397 __e_unud  pe_picmp * p , 2398  pe_ms * ms ) 2401 ut32_t i ; 2402 ut32_t p_ma_offt_e = 0; 2404 ut32_t p_rou_tbl_e = 0; 2405 ut32_t nd_rou_tbl_e = 0; 2406 ut32_t pts_mac_li_e = 0; 2407 ut32_t pktq__v_e = 0; 2408 ut32_t v_to_pub_m_e = 0; 2410 ut8_t n_v__pt = 0; 2411  i = 0; i < PIPELINE_MAX_PORT_IN ; i++) { 2412 _pt_d_a [ i ] = 0; 2413 v_to_pub_m [ i ] = 0xff; 2414 pub_to_v_m [ i ] = 0xff; 2417  i = 0; i < ms -> n_gs ; i++) { 2418 * g_me = ms -> gs_me [ i ]; 2419 * g_vue = ms -> gs_vue [ i ]; 2421 i( ARPICMP_DEBUG > 2) { 2422 `tf ("ARPrgs[%d]: %%d, %s\n", i , g_me , 2423 `oi ( g_vue ),rg_value); 2425 i( `rcmp ( g_me , "arp_meta_offset") == 0) { 2426 i( p_ma_offt_e ) { 2427 `tf ("arp_meta_offset " 2431 p_ma_offt_e = 1; 2432 p_ma_offt = `oi ( g_vue ); 2436 i( `rcmp ( g_me , "pktq_in_prv") == 0) { 2437 i( pktq__v_e ) { 2438 `tf ("Duplicatektq_in_prv ... " 2442 pktq__v_e = 1; 2444  rxpt = 0, j = 0; 2445  phy_pt_num [5]; 2446 * tok = `ok ( g_vue , "RXQ"); 2447  tok ) { 2448 j = 0; 2449 ( j < 4&& ( tok [j] != '.')) { 2450 phy_pt_num [ j ] = tok [j]; 2451 j ++; 2453 phy_pt_num [ j ] = '\0'; 2454 rxpt = `oi ( phy_pt_num ); 2455 `tf ("token: %s,hy_port_str: %s, " 2457 tok , phy_pt_num , rxpt ); 2459 v__pt_a [ n_v__pt ++] = rxpt ; 2461 if( rxpt < PIPELINE_MAX_PORT_IN ) 2462 _pt_d_a [ rxpt ] = 1; 2463 tok = `ok ( NULL , "RXQ"); 2466 i( n_v__pt == 0) { 2467 tf 2476 i( `rcmp ( g_me , "prv_to_pub_map") == 0) { 2477 i( v_to_pub_m_e ) { 2478 tf 2483 v_to_pub_m_e = 1; 2485  rxpt = 0, txpt = 0, j = 0, k = 0; 2486  rx_phy_pt_num [5]; 2487  tx_phy_pt_num [5]; 2488 * tok = `ok ( g_vue , "("); 2489  tok ) { 2490 j = 0; 2491 ( j < 4&& ( tok [j] != ',')) { 2492 rx_phy_pt_num [ j ] = tok [j]; 2493 j ++; 2495 rx_phy_pt_num [ j ] = '\0'; 2496 rxpt = `oi ( rx_phy_pt_num ); 2498 j ++; 2499 k = 0; 2500 ( k < 4&& ( tok [ j + k] != ')')) { 2501 tx_phy_pt_num [ k ] = tok [ j + k]; 2502 k ++; 2504 tx_phy_pt_num [ k ] = '\0'; 2505 txpt = `oi ( tx_phy_pt_num ); 2506 i( rxpt < PIPELINE_MAX_PORT_IN && txpt < PIPELINE_MAX_PORT_IN){ 2507 `tf ("token: %s," 2510 tok , rx_phy_pt_num , rxpt , 2511 tx_phy_pt_num , txpt ); 2515 i(( rxpt > PIPELINE_MAX_PORT_IN ) || 2516 ( txpt > PIPELINE_MAX_PORT_IN ) || 2517 ( _pt_d_a [ rxpt ] != 1)) { 2518 `tf ("CG-NAPTarserror - " 2521 rxpt , txpt , _pt_d_a [rxport]); 2525 v_to_pub_m [ rxpt ] = txpt ; 2526 pub_to_v_m [ txpt ] = rxpt ; 2527 tok = `ok ( NULL , "("); 2534 i( `rcmp ( g_me , "lib_arp_debug") == 0) { 2535 ARPICMP_DEBUG = `oi ( g_vue ); 2541 i( `rcmp ( g_me , "ports_mac_list") == 0) { 2542 pts_mac_li_e = 1; 2544 ut32_t i = 0, j = 0, k = 0, MAC_NUM_BYTES = 6; 2546  byS [ MAC_NUM_BYTES ][3]; 2547 ut32_t by [ MAC_NUM_BYTES ]; 2549 * tok = `ok ( g_vue , " "); 2550  tok ) { 2551 k = 0; 2552  i = 0; i < MAC_NUM_BYTES ; i++) { 2553  j = 0; j < 2; j++) 2554 byS [ i ][ j ] = tok [ k ++]; 2555 byS [ i ][ j ] = '\0'; 2556 k ++; 2559  i = 0; i < MAC_NUM_BYTES ; i++) 2560 by [ i ] = `oul ( byS [i], NULL , 16); 2562 i( ARPICMP_DEBUG ) { 2563 `tf ("tok: %s", tok ); 2564  i = 0; i < MAC_NUM_BYTES ; i++) 2565 `tf (", by[%u] %u", i , 2566 by [ i ]); 2567 `tf ("\n"); 2570  i = 0; i < MAC_NUM_BYTES ; i++) 2571 lk_hw_addr 2572 [ lk_hw_addr_y_idx ]. addr_bys 2573 [ i ] = by [i]; 2575 lk_hw_addr_y_idx ++; 2576 tok = `ok ( NULL , " "); 2583 i( `rcmp ( g_me , "arp_route_tbl") == 0) { 2584 p_rou_tbl_e = 1; 2586 ut32_t de_ = 0, mask = 0, tx_pt = 0, nh_ = 2587 0, i = 0, j = 0, k = 0, l = 0; 2588 ut32_t p_rou_tbl_r_max_n = 10; 2589  de__r [ p_rou_tbl_r_max_n ]; 2590  mask_r [ p_rou_tbl_r_max_n ]; 2591  tx_pt_r [ p_rou_tbl_r_max_n ]; 2592  nh__r [ p_rou_tbl_r_max_n ]; 2593 * tok = `ok ( g_vue , "("); 2594  tok ) { 2595 i = 0; 2596 ( i < ( p_rou_tbl_r_max_n - 1)) 2597 && ( tok [ i ] != ',')) { 2598 de__r [ i ] = tok [i]; 2599 i ++; 2601 de__r [ i ] = '\0'; 2602 de_ = `oul ( de__r , NULL , 16); 2604 i ++; 2605 j = 0; 2606 ( j < ( p_rou_tbl_r_max_n - 1)) 2607 && ( tok [ i + j ] != ',')) { 2608 mask_r [ j ] = tok [ i + j]; 2609 j ++; 2611 mask_r [ j ] = '\0'; 2612 mask = `oul ( mask_r , NULL , 16); 2614 j ++; 2615 k = 0; 2616 ( k < ( p_rou_tbl_r_max_n - 1)) 2617 && ( tok [ i + j + k ] != ',')) { 2618 tx_pt_r [ k ] = tok [ i + j + k]; 2619 k ++; 2621 tx_pt_r [ k ] = '\0'; 2623 tx_pt = `oul ( tx_pt_r , NULL , 16); 2625 k ++; 2626 l = 0; 2627 ( l < ( p_rou_tbl_r_max_n - 1)) 2628 && ( tok [ i + j + k + l ] != ')')) { 2629 nh__r [ l ] = tok [ i + j + k +]; 2630 l ++; 2632 nh__r [ l ] = '\0'; 2634 nh_ = `oul ( nh__r , NULL , 16); 2636 i( ARPICMP_DEBUG ) { 2637 `tf ("token: %s, " 2642 tok , de__r , de_ , 2643 mask_r , mask , tx_pt_r , 2644 tx_pt , nh__r , nh_ ); 2647 i( tx_pt > ms -> n_pts_out ) { 2648 `tf ("ARP-ICMParserror - " 2650 tx_pt , ms -> n_pts_out ); 2656 lib_p_rou_b [ p_rou_tbl_dex ]. = 2657 de_ ; 2658 lib_p_rou_b [ p_rou_tbl_dex ]. mask = 2659 mask ; 2660 lib_p_rou_b [ p_rou_tbl_dex ]. pt = 2661 tx_pt ; 2662 lib_p_rou_b [ p_rou_tbl_dex ]. nh = 2663 nh_ ; 2664 p_rou_tbl_dex ++; 2665 tok = `ok ( NULL , "("); 2672 i( `rcmp ( g_me , "nd_route_tbl") == 0) { 2673 nd_rou_tbl_e = 1; 2675 ut8_t de_v6 [16], dth = 0, tx_pt = 2676 0, nh_v6 [16], i = 0, j = 0, k = 0, l = 0; 2677 ut8_t nd_rou_tbl_r_max_n = 128; 2678  de_v6_r [ nd_rou_tbl_r_max_n ]; 2679  dth_r [ nd_rou_tbl_r_max_n ]; 2680  tx_pt_r [ nd_rou_tbl_r_max_n ]; 2681  nh_v6_r [ nd_rou_tbl_r_max_n ]; 2682 * tok = `ok ( g_vue , "("); 2683  tok ) { 2684 i = 0; 2685 ( i < ( nd_rou_tbl_r_max_n - 1)) 2686 && ( tok [ i ] != ',')) { 2687 de_v6_r [ i ] = tok [i]; 2688 i ++; 2690 de_v6_r [ i ] = '\0'; 2691 `my___v6 ( AF_INET6 , de_v6_r , 2692 & de_v6 ); 2694 i ++; 2695 j = 0; 2696 ( j < ( nd_rou_tbl_r_max_n - 1)) 2697 && ( tok [ i + j ] != ',')) { 2698 dth_r [ j ] = tok [ i + j]; 2699 j ++; 2701 dth_r [ j ] = '\0'; 2703  s ; 2704  s = 0; dth_r [s] != '\0'; ++s) 2705 dth = dth * 10 + dth_r [ s ] - '0'; 2707 j ++; 2708 k = 0; 2709 ( k < ( nd_rou_tbl_r_max_n - 1)) 2710 && ( tok [ i + j + k ] != ',')) { 2711 tx_pt_r [ k ] = tok [ i + j + k]; 2712 k ++; 2714 tx_pt_r [ k ] = '\0'; 2716 tx_pt = `oul ( tx_pt_r , NULL , 16); 2718 k ++; 2719 l = 0; 2720 ( l < ( nd_rou_tbl_r_max_n - 1)) 2721 && ( tok [ i + j + k + l ] != ')')) { 2722 nh_v6_r [ l ] = tok [ i + j + k +]; 2723 l ++; 2725 nh_v6_r [ l ] = '\0'; 2726 `my___v6 ( AF_INET6 , nh_v6_r , 2727 & nh_v6 ); 2730  i = 0; i < 16; i++) { 2731 lib_nd_rou_b 2732 [ nd_rou_tbl_dex ]. v6 [ i ] = 2733 de_v6 [ i ]; 2734 lib_nd_rou_b 2735 [ nd_rou_tbl_dex ]. nhv6 [ i ] = 2736 nh_v6 [ i ]; 2738 lib_nd_rou_b [ nd_rou_tbl_dex ]. dth = 2739 dth ; 2740 lib_nd_rou_b [ nd_rou_tbl_dex ]. pt = 2741 tx_pt ; 2743 nd_rou_tbl_dex ++; 2744 tok = `ok ( NULL , "("); 2754 i(! p_ma_offt_e ) { 2755 `tf ("ARPICMP:rp_meta_offsetot initialized\n"); 2760 i(! p_rou_tbl_e && ! nd_rou_tbl_e ) { 2761 `tf ("Neitherrp_route_tbl_presentor " 2766 i(! pktq__v_e ) { 2767 `tf ("pktq_in_prvot declared\n"); 2771 i(! pts_mac_li_e ) { 2772 `tf ("ports_mac_listot declared\n"); 2777 } } 2781 ut32_t gpicmp_pkt_t_cou ; 2782  le  2783 $pkt_key_picmp ( e_mbuf * pkt , ut32_t pkt_num , * g ) 2786  pe_picmp__pt_h_g * = g ; 2787  pe_picmp * p_p = (pe_picm*) -> p ; 2789 p_p -> ivedPktCou ++; 2791 ut8_t _pt_id = pkt -> pt ; 2792 #ifde VNF_ACL 2793  p_lk_ms * lk ; 2795 ut8_t * oc ; 2796 ut32_t pkt_mask = 1 << pkt_num ; 2797 ut32_t h_o_offt = MBUF_HDR_ROOM + 12; 2799 ut32_t _offt = 2800 MBUF_HDR_ROOM + ETH_HDR_SIZE + IP_HDR_PROTOCOL_OFST ; 2802 #ifde VNF_ACL 2803 ut32_t out_pt ; 2806 ut16_t * h_o = 2807 `RTE_MBUF_METADATA_UINT16_PTR ( pkt , h_o_offt ); 2810 #ifde VNF_ACL 2811 ut32_t d_addr_offt = 2812 MBUF_HDR_ROOM + ETH_HDR_SIZE + IP_HDR_DST_ADR_OFST ; 2813 ut32_t * d_addr = `RTE_MBUF_METADATA_UINT32_PTR ( pkt , d_addr_offt ); 2816 #ifde IPV6 2817 ut32_t _offt_v6 = 2818 MBUF_HDR_ROOM + ETH_HDR_SIZE + IPV6_HDR_PROTOCOL_OFST ; 2820 i( `e_be_to_u_16 (* h_o = ETHER_TYPE_IPv6 ) 2821 oc = `RTE_MBUF_METADATA_UINT8_PTR ( pkt , _offt_v6 ); 2823 oc = `RTE_MBUF_METADATA_UINT8_PTR ( pkt , _offt ); 2825 oc = `RTE_MBUF_METADATA_UINT8_PTR ( pkt , _offt ); 2829 i(( ARPICMP_DEBUG > 2&& ( picmp_pkt_t_cou < 10)) { 2830 `t_pkt1 ( pkt ); 2831 picmp_pkt_t_cou ++; 2832 `tf ("\nEth Typ %x, Prot %x, ETH_TYPE_ARP %x, " 2834 `e_be_to_u_16 (* h_o ), * oc , ETH_TYPE_ARP , 2835 ETH_TYPE_IPV4 , IP_PROTOCOL_ICMP ); 2838 #ifde VNF_ACL 2839 lk = & myA -> lk_ms [ _pt_id ]; 2843 i(( `e_be_to_u_16 (* h_o = ETH_TYPE_ARP ) || 2844 (( `e_be_to_u_16 (* h_o = ETH_TYPE_IPV4 ) 2845 && (* oc = IP_PROTOCOL_ICMP ) 2846 #ifde VNF_ACL 2847 && ( lk -> = `e_be_to_u_32 (* d_addr )) 2851 #ifde VNF_ACL 2852 out_pt = p_p -> out_id [ _pt_id ]; 2853 `oss_picmp_pkt ( pkt , out_pt , pkt_mask ); 2855 `oss_picmp_pkt ( pkt , `ifm_g_pt ( _pt_id )); 2859 #ifde IPV6 2860 i(( `e_be_to_u_16 (* h_o = ETH_TYPE_IPV6 ) 2861 && (* oc = ICMPV6_PROTOCOL_ID )) { 2862 #ifde VNF_ACL 2863 out_pt = p_p -> out_id [ _pt_id ]; 2864 `oss_icmpv6_pkt ( pkt , out_pt , pkt_mask ); 2866 `oss_icmpv6_pkt ( pkt , `ifm_g_pt ( _pt_id )); 2874 `e_pe_ah_ck_dr ( p_p -> p .p, pkt_mask ); 2875 p_p -> drݳdPktCou ++; 2877 } } 2879  le  2880 $pkt4_key_picmp ( e_mbuf ** pkt , ut32_t pkt_num , * g ) 2883  pe_picmp__pt_h_g * = g ; 2884  pe_picmp * p_p = (pe_picm*) -> p ; 2886 p_p -> ivedPktCou += 4; 2888 ut32_t h_o_offt = MBUF_HDR_ROOM + 12; 2889 ut8_t _pt_id = pkt [0]-> pt ; 2891 ut32_t _offt = 2892 MBUF_HDR_ROOM + ETH_HDR_SIZE + IP_HDR_PROTOCOL_OFST ; 2895 #ifde VNF_ACL 2896 ut32_t d_addr_offt = 2897 MBUF_HDR_ROOM + ETH_HDR_SIZE + IP_HDR_DST_ADR_OFST ; 2900 ut32_t pkt_mask0 = 1 << pkt_num ; 2901 ut32_t pkt_mask1 = 1 << ( pkt_num + 1); 2902 ut32_t pkt_mask2 = 1 << ( pkt_num + 2); 2903 ut32_t pkt_mask3 = 1 << ( pkt_num + 3); 2905 #ifde VNF_ACL 2906 ut32_t out_pt0 ; 2907 ut32_t out_pt1 ; 2908 ut32_t out_pt2 ; 2909 ut32_t out_pt3 ; 2912 ut16_t * h_o0 = 2913 `RTE_MBUF_METADATA_UINT16_PTR ( pkt [0], h_o_offt ); 2914 ut16_t * h_o1 = 2915 `RTE_MBUF_METADATA_UINT16_PTR ( pkt [1], h_o_offt ); 2916 ut16_t * h_o2 = 2917 `RTE_MBUF_METADATA_UINT16_PTR ( pkt [2], h_o_offt ); 2918 ut16_t * h_o3 = 2919 `RTE_MBUF_METADATA_UINT16_PTR ( pkt [3], h_o_offt ); 2921 ut8_t * oc0 ; 2922 ut8_t * oc1 ; 2923 ut8_t * oc2 ; 2924 ut8_t * oc3 ; 2926 #ifde VNF_ACL 2927 ut32_t * d_addr0 = 2928 `RTE_MBUF_METADATA_UINT32_PTR ( pkt [0], d_addr_offt ); 2929 ut32_t * d_addr1 = 2930 `RTE_MBUF_METADATA_UINT32_PTR ( pkt [1], d_addr_offt ); 2931 ut32_t * d_addr2 = 2932 `RTE_MBUF_METADATA_UINT32_PTR ( pkt [2], d_addr_offt ); 2933 ut32_t * d_addr3 = 2934 `RTE_MBUF_METADATA_UINT32_PTR ( pkt [3], d_addr_offt ); 2936  p_lk_ms * lk0 ; 2937  p_lk_ms * lk1 ; 2938  p_lk_ms * lk2 ; 2939  p_lk_ms * lk3 ; 2941 lk0 = & myA -> lk_ms [ pkt [0]-> pt ]; 2942 lk1 = & myA -> lk_ms [ pkt [1]-> pt ]; 2943 lk2 = & myA -> lk_ms [ pkt [2]-> pt ]; 2944 lk3 = & myA -> lk_ms [ pkt [3]-> pt ]; 2947 #ifde IPV6 2948 ut32_t _offt_v6 = 2949 MBUF_HDR_ROOM + ETH_HDR_SIZE + IPV6_HDR_PROTOCOL_OFST ; 2953 #ifde IPV6 2955 i( `e_be_to_u_16 (* h_o0 = ETHER_TYPE_IPv6 ) 2956 oc0 = 2957 `RTE_MBUF_METADATA_UINT8_PTR ( pkt [0], _offt_v6 ); 2959 oc0 = `RTE_MBUF_METADATA_UINT8_PTR ( pkt [0], _offt ); 2962 i( `e_be_to_u_16 (* h_o1 = ETHER_TYPE_IPv6 ) 2963 oc1 = 2964 `RTE_MBUF_METADATA_UINT8_PTR ( pkt [1], _offt_v6 ); 2966 oc1 = `RTE_MBUF_METADATA_UINT8_PTR ( pkt [1], _offt ); 2969 i( `e_be_to_u_16 (* h_o2 = ETHER_TYPE_IPv6 ) 2970 oc2 = 2971 `RTE_MBUF_METADATA_UINT8_PTR ( pkt [2], _offt_v6 ); 2973 oc2 = `RTE_MBUF_METADATA_UINT8_PTR ( pkt [2], _offt ); 2976 i( `e_be_to_u_16 (* h_o3 = ETHER_TYPE_IPv6 ) 2977 oc3 = 2978 `RTE_MBUF_METADATA_UINT8_PTR ( pkt [3], _offt_v6 ); 2980 oc3 = `RTE_MBUF_METADATA_UINT8_PTR ( pkt [3], _offt ); 2982 oc0 = `RTE_MBUF_METADATA_UINT8_PTR ( pkt [0], _offt ); 2983 oc1 = `RTE_MBUF_METADATA_UINT8_PTR ( pkt [1], _offt ); 2984 oc2 = `RTE_MBUF_METADATA_UINT8_PTR ( pkt [2], _offt ); 2985 oc3 = `RTE_MBUF_METADATA_UINT8_PTR ( pkt [3], _offt ); 2988 i(( ARPICMP_DEBUG > 2&& ( picmp_pkt_t_cou < 10)) { 2989 `t_pkt1 ( pkt [0]); 2990 picmp_pkt_t_cou ++; 2991 `tf ("\nEth Typ %x, Prot %x, ETH_TYPE_ARP %x, " 2993 `e_be_to_u_16 (* h_o0 ), * oc0 , ETH_TYPE_ARP , 2994 ETH_TYPE_IPV4 , IP_PROTOCOL_ICMP ); 2998 i(( `e_be_to_u_16 (* h_o0 = ETH_TYPE_ARP ) || 2999 (( `e_be_to_u_16 (* h_o0 = ETH_TYPE_IPV4 ) 3000 && (* oc0 = IP_PROTOCOL_ICMP ) 3001 #ifde VNF_ACL 3002 && ( lk0 -> = `e_be_to_u_32 (* d_addr0 )) 3006 #ifde VNF_ACL 3007 out_pt0 = p_p -> out_id [ pkt [0]-> pt ]; 3008 `oss_picmp_pkt ( pkt [0], out_pt0 , pkt_mask0 ); 3010 `oss_picmp_pkt ( pkt [0], `ifm_g_pt ( _pt_id )); 3013  PKT1 ; 3015 #ifde IPV6 3016 i(( `e_be_to_u_16 (* h_o0 = ETH_TYPE_IPV6 ) 3017 && (* oc0 = ICMPV6_PROTOCOL_ID )) { 3019 #ifde VNF_ACL 3020 out_pt0 = p_p -> out_id [ pkt [0]-> pt ]; 3021 `oss_icmpv6_pkt ( pkt [0], out_pt0 , pkt_mask0 ); 3023 `oss_icmpv6_pkt ( pkt [0], `ifm_g_pt ( _pt_id )); 3026  PKT1 ; 3031 `e_pe_ah_ck_dr ( p_p -> p .p, pkt_mask0 ); 3032 p_p -> drݳdPktCou ++; 3034 PKT1 : 3035 i(( ARPICMP_DEBUG > 2&& ( picmp_pkt_t_cou < 10)) { 3036 `t_pkt1 ( pkt [1]); 3037 picmp_pkt_t_cou ++; 3038 `tf ("\nEth Typ %x, Prot %x, ETH_TYPE_ARP %x, " 3040 `e_be_to_u_16 (* h_o1 ), * oc1 , ETH_TYPE_ARP , 3041 ETH_TYPE_IPV4 , IP_PROTOCOL_ICMP ); 3044 i(( `e_be_to_u_16 (* h_o1 = ETH_TYPE_ARP ) || 3045 (( `e_be_to_u_16 (* h_o1 = ETH_TYPE_IPV4 ) 3046 && (* oc1 = IP_PROTOCOL_ICMP ) 3047 #ifde VNF_ACL 3048 && ( lk1 -> = `e_be_to_u_32 (* d_addr1 )) 3052 #ifde VNF_ACL 3053 out_pt1 = p_p -> out_id [ pkt [1]-> pt ]; 3054 `oss_picmp_pkt ( pkt [1], out_pt1 , pkt_mask1 ); 3056 `oss_picmp_pkt ( pkt [1], `ifm_g_pt ( _pt_id )); 3058  PKT2 ; 3060 #ifde IPV6 3061 i(( `e_be_to_u_16 (* h_o1 = ETH_TYPE_IPV6 ) 3062 && (* oc1 = ICMPV6_PROTOCOL_ID )) { 3064 #ifde VNF_ACL 3065 out_pt1 = p_p -> out_id [ pkt [1]-> pt ]; 3066 `oss_icmpv6_pkt ( pkt [1], out_pt1 , pkt_mask1 ); 3068 `oss_icmpv6_pkt ( pkt [1], `ifm_g_pt ( _pt_id )); 3071  PKT2 ; 3076 `e_pe_ah_ck_dr ( p_p -> p .p, pkt_mask1 ); 3077 p_p -> drݳdPktCou ++; 3079 PKT2 : 3080 i(( ARPICMP_DEBUG > 2&& ( picmp_pkt_t_cou < 10)) { 3081 `t_pkt1 ( pkt [2]); 3082 picmp_pkt_t_cou ++; 3083 `tf ("\nEth Typ %x, Prot %x, ETH_TYPE_ARP %x, " 3085 `e_be_to_u_16 (* h_o2 ), * oc2 , ETH_TYPE_ARP , 3086 ETH_TYPE_IPV4 , IP_PROTOCOL_ICMP ); 3089 i(( `e_be_to_u_16 (* h_o2 = ETH_TYPE_ARP ) || 3090 (( `e_be_to_u_16 (* h_o2 = ETH_TYPE_IPV4 ) 3091 && (* oc2 = IP_PROTOCOL_ICMP ) 3092 #ifde VNF_ACL 3093 && ( lk2 -> = `e_be_to_u_32 (* d_addr2 )) 3097 #ifde VNF_ACL 3098 out_pt2 = p_p -> out_id [ pkt [2]-> pt ]; 3099 `oss_picmp_pkt ( pkt [2], out_pt2 , pkt_mask2 ); 3101 `oss_picmp_pkt ( pkt [2], `ifm_g_pt ( _pt_id )); 3104  PKT3 ; 3106 #ifde IPV6 3107 i(( `e_be_to_u_16 (* h_o2 = ETH_TYPE_IPV6 ) 3108 && (* oc2 = ICMPV6_PROTOCOL_ID )) { 3110 #ifde VNF_ACL 3111 out_pt2 = p_p -> out_id [ pkt [2]-> pt ]; 3112 `oss_icmpv6_pkt ( pkt [2], out_pt2 , pkt_mask2 ); 3114 `oss_icmpv6_pkt ( pkt [2], `ifm_g_pt ( _pt_id )); 3117  PKT3 ; 3122 `e_pe_ah_ck_dr ( p_p -> p .p, pkt_mask2 ); 3123 p_p -> drݳdPktCou ++; 3125 PKT3 : 3126 i(( ARPICMP_DEBUG > 2&& ( picmp_pkt_t_cou < 10)) { 3127 `t_pkt1 ( pkt [3]); 3128 picmp_pkt_t_cou ++; 3129 `tf ("\nEth Typ %x, Prot %x, ETH_TYPE_ARP %x, " 3131 `e_be_to_u_16 (* h_o3 ), * oc3 , ETH_TYPE_ARP , 3132 ETH_TYPE_IPV4 , IP_PROTOCOL_ICMP ); 3135 i(( `e_be_to_u_16 (* h_o3 = ETH_TYPE_ARP ) || 3136 (( `e_be_to_u_16 (* h_o3 = ETH_TYPE_IPV4 ) 3137 && (* oc3 = IP_PROTOCOL_ICMP ) 3139 #ifde VNF_ACL 3140 && ( lk3 -> = `e_be_to_u_32 (* d_addr3 )) 3144 #ifde VNF_ACL 3145 out_pt3 = p_p -> out_id [ pkt [3]-> pt ]; 3146 `oss_picmp_pkt ( pkt [3], out_pt3 , pkt_mask3 ); 3148 `oss_picmp_pkt ( pkt [3], `ifm_g_pt ( _pt_id )); 3153 #ifde IPV6 3154 i(( `e_be_to_u_16 (* h_o3 = ETH_TYPE_IPV6 ) 3155 && (* oc3 = ICMPV6_PROTOCOL_ID )) { 3157 #ifde VNF_ACL 3158 out_pt3 = p_p -> out_id [ pkt [3]-> pt ]; 3159 `oss_icmpv6_pkt ( pkt [3], out_pt3 , pkt_mask3 ); 3161 `oss_icmpv6_pkt ( pkt [3], `ifm_g_pt ( _pt_id )); 3168 `e_pe_ah_ck_dr ( p_p -> p .p, pkt_mask3 ); 3169 p_p -> drݳdPktCou ++; 3172 } } 3174 PIPELINE_ARPICMP_KEY_PORT_IN_AH ( 3175 pt__ah_picmp , 3176 pkt_key_picmp , 3177 pkt4_key_picmp ); 3179 * $pe_picmp_ ( pe_ms * ms , 3180 __e_unud * g ) 3182  pe * p ; 3183  pe_picmp * p_p ; 3184 ut32_t size , i , _pts_g_size ; 3186 `tf ("Startipeline_arpicmp_init\n"); 3189 i(( ms = NULL ) || 3190 ( ms -> n_pts_ == 0) || 3191 ( ms -> n_pts_out == 0)) 3192  NULL ; 3195 size = `RTE_CACHE_LINE_ROUNDUP (( pe_picmp )); 3196 p = `e_zmloc ( NULL , size , RTE_CACHE_LINE_SIZE ); 3197 p_p = ( pe_picmp *) p ; 3198 i( p = NULL ) 3199  NULL ; 3202  p_ms * p = (p_m*) g ; 3203 myA = g ; 3205 `PLOG ( p , HIGH , "ARPICMP"); 3206 `ry ( p -> me , ms ->name); 3207 p -> log_v = ms ->log_level; 3209 p_p -> ivedPktCou = 0; 3210 p_p -> drݳdPktCou = 0; 3212 #ifde VNF_ACL 3213  i = 0; i < PIPELINE_MAX_PORT_IN ; i++) 3214 p_p -> lks_m [ i ] = 0xff; 3216 p_p -> pe_num = 0; 3219 i( `pe_picmp_r_gs ( p_p , ms )) 3220  NULL ; 3222 #ide VNF_ACL 3223 `lib_p_ ( ms , p ); 3228  e_pe_ms pe_ms = { 3229 . me = "ARPICMP", 3230 . sock_id = ms ->socket_id, 3231 . offt_pt_id = 0, 3235 p -> `e_pe_ (& pe_ms ); 3236 i( p ->= NULL ) { 3237 `e_ ( p ); 3238  NULL ; 3242 p -> n_pts_ = ms ->n_ports_in; 3243 p -> n_pts_out = ms ->n_ports_out; 3244 p -> n_bs = 1; 3247 _pts_g_size = `RTE_CACHE_LINE_ROUNDUP ( 3248 (( pe_picmp__pt_h_g )) * 3249 ( ms -> n_pts_ )); 3250  pe_picmp__pt_h_g * = 3251 ( pe_picmp__pt_h_g *) `e_zmloc ( NULL , 3252 _pts_g_size , 3253 RTE_CACHE_LINE_SIZE ); 3254 i( = NULL ) 3255  NULL ; 3258  i = 0; i < p -> n_pts_ ; i++) { 3260 ( [ i ]). p = p_p ; 3261 ( [ i ]). _pt_id = i; 3262  e_pe_pt__ms pt_ms = { 3263 . s = 3264 `pe_pt__ms_g_s (& ms -> 3265 pt_ [ i ]), 3266 . g_ = 3267 `pe_pt__ms_cvt (& ms -> 3268 pt_ [ i ]), 3269 . f_ai = NULL , 3270 . g_ah = &( [ i ]), 3271 . bur_size = ms -> pt_ [ i ].burst_size, 3274 pt_ms . f_ai = pt__ah_picmp ; 3276  us = `e_pe_pt__ ( p ->p, 3277 & pt_ms , 3278 & p -> pt__id [ i ]); 3280 i( us ) { 3281 `e_pe_ ( p ->p); 3282 `e_ ( p ); 3283  NULL ; 3288  i = 0; i < p -> n_pts_out ; i++) { 3289  e_pe_pt_out_ms pt_ms = { 3290 . s = 3291 `pe_pt_out_ms_g_s (& ms -> 3292 pt_out [ i ]), 3293 . g_ = 3294 `pe_pt_out_ms_cvt (& ms -> 3295 pt_out [ i ]), 3296 . f_ai = NULL , 3297 . g_ah = NULL , 3300  us = `e_pe_pt_out_ ( p ->p, 3301 & pt_ms , 3302 & p -> pt_out_id [ i ]); 3304 i( us ) { 3305 `e_pe_ ( p ->p); 3306 `e_ ( p ); 3307  NULL ; 3310  pe_num = 0; 3312  us = `ssnf ( ms -> me , "PIPELINE%d", & pe_num ); 3314 i( us < 0) { 3315  NULL ; 3316 `tf ("Unableoeadipelineumber\n"); 3319 p_p -> pe_num = ( ut8_t )ipeline_num; 3321 `gi_pe_Qs ( p_p -> pe_num , p ); 3322 `t_phy_out_id ( p_p -> pe_num , p ,_p-> out_id ); 3326  e_pe_b_ms b_ms = { 3327 . s = & e_b_ub_s , 3328 . g_ = NULL , 3329 . f_ai_h = NULL , 3330 . f_ai_miss = NULL , 3331 . g_ah = NULL , 3332 . ai_da_size = 0, 3335  us = `e_pe_b_ ( p ->p, 3336 & b_ms , 3337 & p -> b_id [0]); 3339 i( us ) { 3340 `e_pe_ ( p ->p); 3341 `e_ ( p ); 3342  NULL ; 3347  i = 0; i < p -> n_pts_ ; i++) { 3349  us = `e_pe_pt__c_to_b ( p ->p, 3350 p -> 3351 pt__id 3352 [ i ], 3353 p -> 3354 b_id [0]); 3356 i( us ) { 3357 `e_pe_ ( p ->p); 3358 `e_ ( p ); 3359  NULL ; 3365  i = 0; i < p -> n_pts_ ; i++) { 3366  us = `e_pe_pt__ab ( p ->p, 3367 p -> pt__id [ i ]); 3369 i( us ) { 3370 `e_pe_ ( p ->p); 3371 `e_ ( p ); 3372  NULL ; 3377 i( `e_pe_check ( p ->p) < 0) { 3378 `e_pe_ ( p ->p); 3379 `e_ ( p ); 3380  NULL ; 3384 p -> n_msgq = ms ->n_msgq; 3385  i = 0; i < p -> n_msgq ; i++) 3386 p -> msgq_ [ i ] = ms ->msgq_in[i]; 3387  i = 0; i < p -> n_msgq ; i++) 3388 p -> msgq_out [ i ] = ms ->msgq_out[i]; 3391 `memy ( p -> hdrs , handlers, (p->handlers)); 3393 #ifde VNF_ACL 3396 lib_p_pktmbuf_tx_po = `e_pktmbuf_po_ ( 3398 NB_ARPICMP_MBUF , 32, 3399 0, RTE_MBUF_DEFAULT_BUF_SIZE , 3400 `e_sock_id ()); 3402 i( lib_p_pktmbuf_tx_po = NULL ) { 3403 `tf ("ARP mbufool create failed.\n"); 3404  NULL ; 3407 lib_p_pkt = `e_pktmbuf_loc ( lib_p_pktmbuf_tx_po ); 3408 i( lib_p_pkt = NULL ) { 3409 `tf ("ARPib_arp_pktlloc failed.\n"); 3410  NULL ; 3414 p_hash_ms . sock_id = `e_sock_id (); 3415 p_hash_ms . s = MAX_NUM_ARP_ENTRIES ; 3416 p_hash_hd = `e_hash_ (& p_hash_ms ); 3418 i( p_hash_hd = NULL ) { 3419 `tf ("ARPte_hash_create failed. socket %d ...\n", 3420 p_hash_ms . sock_id ); 3421  NULL ; 3423 `tf ("p_hash_hd %p\n\n", (*) p_hash_hd ); 3426 nd_hash_ms . sock_id = `e_sock_id (); 3427 nd_hash_ms . s = MAX_NUM_ND_ENTRIES ; 3428 nd_hash_hd = `e_hash_ (& nd_hash_ms ); 3430 i( nd_hash_hd = NULL ) { 3431 `tf ("NDte_hash_create failed. socket %d ...\n", 3432 nd_hash_ms . sock_id ); 3433  NULL ; 3436 `tf ("nd_hash_hd %p\n\n", (*) nd_hash_hd ); 3438  p ; 3439 } } 3441  $pe_picmp_ (* pe ) 3443  pe * p = (pipeline *)pipeline; 3446 i( p = NULL ) 3450 `e_pe_ ( p ->p); 3451 `e_ ( p ); 3453 } } 3455  $pe_picmp_tim (* pe ) 3457  pe * p = (pipeline *)pipeline; 3459 `pe_msg_q_hd ( p ); 3460 `e_pe_ush ( p ->p); 3463 } } 3466 $pe_picmp_ack (* pe , ut32_t pt_ , ut32_* pt_out ) 3468  pe * p = (pipeline *)pipeline; 3471 i(( p = NULL || ( pt_ >p-> n_pts_ || ( pt_out == NULL)) 3474 * pt_out = pt_ / p -> n_pts_ ; 3476 } } 3478  pe_be_s gpe_picmp_be_s = { 3479 . f_ = pe_picmp_ , 3480 . gf_ = pe_picmp_ , 3481 . gf_run = NULL , 3482 . gf_tim = pe_picmp_tim , 3483 . gf_ack = pe_picmp_ack , @VIL/pipeline_arpicmp/pipeline_arpicmp_be.h 17 #ide __INCLUDE_PIPELINE_ARPICMP_BE_H__ 18  #__INCLUDE_PIPELINE_ARPICMP_BE_H__ ) 20  ~"pe_comm_be.h " 21  #PIPELINE_ARPICMP_KEY_PORT_IN_AH ( f_ah , f_pkt_wk , f_pkt4_wk ) \ 23 `f_ah ( \ 24 __e_unud  e_pe * e_p , \ 25  e_mbuf ** pkts , \ 26 ut32_t n_pkts , \ 27 * g ) \ 29 ut32_t i , j ; \ 31  j = 0; j < n_pkts ; j++) \ 32 `e_etch0 ( pkts [ j ]); \ 34  i = 0; i < ( n_pkts & (~0x3LLU)); i += 4) \ 35 `f_pkt4_wk (& pkts [ i ], i, g ); \ 37  ; i < n_pkts ; i++) \ 38 `f_pkt_wk ( pkts [ i ], i, g ); \ 42 } ) 44  p_ms * myA ; 45  t_pkt1 ( e_mbuf * pkt ); 46  h_addr * g_lk_hw_addr ( ut8_t out_pt ); 47 #ifde VNF_ACL 49  ~ 50  ~"e_h.h " 51  ~"p.h " 53 #i( RTE_BYTE_ORDER = RTE_LITTLE_ENDIAN ) 56  #CHECK_ENDIAN_16 ( x `e_be_to_u_16 (x) ) 57  #CHECK_ENDIAN_32 ( x `e_be_to_u_32 (x) ) 59  #CHECK_ENDIAN_16 ( x (x) ) 60  #CHECK_ENDIAN_32 ( x (x) ) 64  #MAX_ARP_RT_ENTRY 16 ) 65  #MAX_ND_RT_ENTRY 16 ) 67  #ND_IPV6_ADDR_SIZE 16 ) 70 mARP_FOUND , 71 mARP_NOT_FOUND , 72 mNH_NOT_FOUND , 75 ep_key_ty { 76 mARP_IPV4 , 78 mND_IPV6 , 81  sp_key_v4 { 82 ut32_t m ; 83 ut8_t mpt_id ; 84 ut8_t mfr1 ; 85 ut8_t mfr2 ; 86 ut8_t mfr3 ; 90  snd_key_v6 { 93 ut8_t mv6 [ ND_IPV6_ADDR_SIZE ]; 94 ut8_t mpt_id ; 95 ut8_t mfr1 ; 96 ut8_t mfr2 ; 97 ut8_t mfr3 ; 100  sp_key { 101 p_key_ty mty ; 103  p_key_v4 mv4 ; 104 } mkey ; 107  slib_p_rou_b_y { 108 ut32_t m ; 109 ut32_t mmask ; 110 ut32_t mpt ; 111 ut32_t mnh ; 114  slib_nd_rou_b_y { 115 ut8_t mv6 [16]; 116 ut8_t mdth ; 117 ut32_t mpt ; 118 ut8_t mnhv6 [16]; 120  lib_p_rou_b_y lib_p_rou_b [ MAX_ARP_RT_ENTRY ]; 121  lib_nd_rou_b_y lib_nd_rou_b [ MAX_ND_RT_ENTRY ]; 123 ut8_t v__pt_a [ PIPELINE_MAX_PORT_IN ]; 124  cvt_efixn_to_tmask_v6 ( ut32_t dth , 125 ut8_t tmask_v6 []); 126 ut32_t g_nh (uint32_t, uint32_t*); 127  g_nh_v6 ( ut8_t v6 [], ut32_t * pt , ut8_ nhv6 []); 129 ut32_t ARPICMP_DEBUG ; 133  #COMPLETE 1 ) 135  #INCOMPLETE 0 ) 138 ut32_t NDIPV6_DEBUG ; 141  #ICMPv6_COMPLETE 1 ) 143  #ICMPv6_INCOMPLETE 0 ) 145  sp_y_da { 146  h_addr mh_addr ; 147 ut8_t mpt ; 148 ut8_t mus ; 149 ut32_t m ; 150 } __ibu__ (( __cked__ )); 153  snd_y_da { 154  h_addr mh_addr ; 155 ut8_t mpt ; 156 ut8_t mus ; 157 ut8_t mv6 [ ND_IPV6_ADDR_SIZE ]; 158 } __ibu__ (( __cked__ )); 160  g_de_mac_addss (cڡ ut32_t addr , cڡ ut32_ phy_pt , 161  h_addr * hw_addr , ut32_t * nh ); 162  g_de_mac_addr (cڡ ut32_t addr , cڡ ut32_ phy_pt , 163  h_addr * hw_addr ); 165  g_de_mac_addss_v6 ( ut8_t v6addr [], ut32_t phy_pt , 166  h_addr * hw_addr , ut8_t nhv6 []); 168  lib_p_que_p ( 169 cڡ ut32_t addr , 170 cڡ ut32_t phy_pt , 171  e_pe * e_p ); 173  t_p_b (); 174  t_nd_b (); 175  move_p_y ( ut32_t addr , ut8_t ptid ); 176  move_nd_y_v6 ( ut8_t v6addr [], ut8_ ptid ); 177  puϋ_p_y (cڡ  h_addr * hw_addr , ut32_t addr , 178 ut8_t ptid ); 180  puϋ_nd_y (cڡ  h_addr * hw_addr , ut8_t [], 181 ut8_t ptid ); 182  que_p ( ut8_t pt_id , ut32_t ,  e_pe * e_p ); 183  que_p_wp ( ut8_t pt_id , ut32_t ); 184  que_echo ( pt_id , ut32_t ); 186  oss_picmp_pkt ( e_mbuf * pkt , ut32_t out_pt , 187 ut32_t pkt_num ); 189  p_y_da * ve_p_y (cڡ  p_key_v4 p_key ); 190  nd_y_da * ve_nd_y ( nd_key_v6 nd_key ); 192  nd_y_da * ve_nd_y ( nd_key_v6 nd_key ); 194  lib_nd_  p_ms * p ); 195  t_pkt1 ( e_mbuf * pkt ); 199 ut8_t glb_out_id [ PIPELINE_MAX_PORT_IN ]; 200  pe * gldb_pe [ PIPELINE_MAX_PORT_IN ]; 201  pe * gl_pe [ PIPELINE_MAX_PORT_IN ]; 202 ut8_t gvnf_to_ldb_m [ PIPELINE_MAX_PORT_IN ]; 203 ut8_t gpt_to_ldb_m [ PIPELINE_MAX_PORT_IN ]; 204 ut8_t gldb_pe_nums [ PIPELINE_MAX_PORT_IN ]; 207 ut8_t glb_out_id [ PIPELINE_MAX_PORT_IN ]; 208  pe * gp_pe [ PIPELINE_MAX_PORT_IN ]; 209 ut8_t gvnf_to_p_m [ PIPELINE_MAX_PORT_IN ]; 210 ut8_t gpt_to_p_m [ PIPELINE_MAX_PORT_IN ]; 211 ut8_t gp_pe_nums [ PIPELINE_MAX_PORT_IN ]; 214  t_pt_to_ldb_m ( ut8_t pe_num ); 215 ut8_t g_pt_to_ldb_m (ut8_ phy_pt_id ); 218  t_phy_pt_m ( ut8_t pe_num , ut8_* m ); 219  t_phy_out_m ( ut8_t pe_num , ut8_* m ); 221  t_out_id ( ut8_t pe_num ,  pe * p , ut8_* m ); 223 ut8_t g_ldb_out_id (ut8_ au_phy_pt ); 225 ut8_t g_vnf_t_num (ut8_ pe_num ); 227  pes_pt_fo (); 228  pes_m_fo (); 229  gi_ldb_to_p ( ut8_t pe_num ,  pe * p , 230 __e_unud  p_ms * p ); 232 ut8_t gSWQ_to_Pt_m [128]; 234  pe_be_s pe_picmp_be_s ; 235  gi_pe_Qs ( ut8_t pe_num ,  pe * p ); 236  t_lk_m ( ut8_t pe_num ,  pe * p , ut8_* m ); 237  t_out_id ( ut8_t pe_num ,  pe * p , ut8_* m ); 238  t_phy_out_id ( ut8_t pe_num ,  pe * p , ut8_* m ); 239  t_phy_pt_id ( ut8_t pe_num ,  pe * p , ut8_* m ); 244 epe_picmp_msg_q_ty { 245 mPIPELINE_ARPICMP_MSG_REQ_ENTRY_DBG , 246 mPIPELINE_ARPICMP_MSG_REQS 252  spe_picmp_y_dbg_msg_q { 253 pe_msg_q_ty mty ; 254 pe_picmp_msg_q_ty msubty ; 257 ut8_t mda [2]; 264  spe_picmp__pt_h_g { 265  pe_picmp * mp ; 266 ut8_t m_pt_id ; 269  spe_picmp_y_dbg_msg_r { 270  mus ; 273 #ifde VNF_ACL 276  sicmpv6_hdr { 277 ut8_t micmpv6_ty ; 278 ut8_t micmpv6_code ; 279 ut16_t micmpv6_cksum ; 280 } __ibu__ (( __cked__ )); 285  sicmpv6_fo_hdr { 286 ut16_t micmpv6_idt ; 287 ut16_t micmpv6_q_nb ; 288 } __ibu__ (( __cked__ )); 293  sicmpv6_nd_hdr { 295 ut32_t micmpv6_rved ; 298 ut8_t mrg_v6 [16]; 300 ut8_t mty ; 301 ut8_t mngth ; 302  h_addr mlk_y_addss ; 303 } __ibu__ (( __cked__ )); 306  #ICMPV6_PROTOCOL_ID 58 ) 307  #ICMPV6_ECHO_REQUEST 0x0080 ) 308  #ICMPV6_ECHO_REPLY 0x0081 ) 309  #ICMPV6_NEIGHBOR_SOLICITATION 0x0087 ) 310  #ICMPV6_NEIGHBOR_ADVERTISEMENT 0x0088 ) 311  #IPV6_MULTICAST 0xFF02 ) 313  #NEIGHBOR_SOLICITATION_SET 0x40000000 ) 314 eicmpv6_lk_y_Addss_ty { 315 me_Sour_Lk_Lay_Addss = 1, 316 me_Tg_Lk_Lay_Addss , 317 me_Lk_Lay_Addss 320 ut8_t is_mui_v6_addr (ut8_ v6 []); 321  sicmpv6_pt_addss { 322 ut32_t mv6 [16]; 323 ut64_t mmac_addr ; 326  icmpv6_pt_addss gicmpv6_pt_addss [ RTE_MAX_ETHPORTS ]; 328  #MAX_NUM_ICMPv6_ENTRIES 64 ) 330  e_mbuf * glib_icmpv6_pkt ; 331  que_icmpv6_echo ( ut32_t pt_id , ut8_t v6 []); 332  que_icmpv6_echo_mesge ( ut16_t pt_id , ut8_t v6 [], 333  h_addr * gw_addr ); 335 oss_icmpv6_pkt ( e_mbuf * pkt , ut32_t out_pt , ut32_ pkt_num ); 337  g_de_mac_addr_pt (cڡ ut32_t addr , 338 ut32_t * phy_pt ,  h_addr * hw_addr ); 340  g_de_mac_addss_v6_pt ( ut8_t v6addr [], ut32_t * phy_pt , 341  h_addr * hw_addr , ut8_t nhv6 []); @VIL/pipeline_common/pipeline_common_be.c 17  ~ 18  ~ 19  ~ 21  ~"pe_comm_be.h " 24 $pe_msg_q_pg_hdr ( __e_unud  pe * p , 25 * msg ) 27  pe_msg_r * r = msg ; 29 r -> us = 0; 31  r ; 32 } } 35 $pe_msg_q_s_pt__hdr ( pe * p , 36 * msg ) 38  pe_s_msg_q * q = msg ; 39  pe_s_pt__msg_r * r = msg ; 40 ut32_t pt_id ; 43 i( q -> id > p -> n_pts_ ) { 44 r -> us = -1; 45  r ; 47 pt_id = p -> pt__id [ q -> id ]; 50 r -> us = `e_pe_pt__s_ad ( p ->p, 51 pt_id , 52 & r -> s , 55  r ; 56 } } 59 $pe_msg_q_s_pt_out_hdr ( pe * p , 60 * msg ) 62  pe_s_msg_q * q = msg ; 63  pe_s_pt_out_msg_r * r = msg ; 64 ut32_t pt_id ; 67 i( q -> id > p -> n_pts_out ) { 68 r -> us = -1; 69  r ; 71 pt_id = p -> pt_out_id [ q -> id ]; 74 r -> us = `e_pe_pt_out_s_ad ( p ->p, 75 pt_id , 76 & r -> s , 79  r ; 80 } } 83 $pe_msg_q_s_b_hdr ( pe * p , 84 * msg ) 86  pe_s_msg_q * q = msg ; 87  pe_s_b_msg_r * r = msg ; 88 ut32_t b_id ; 91 i( q -> id > p -> n_bs ) { 92 r -> us = -1; 93  r ; 95 b_id = p ->b_id[ q -> id ]; 98 r -> us = `e_pe_b_s_ad ( p ->p, 99 b_id , 100 & r -> s , 103  r ; 104 } } 107 $pe_msg_q_pt__ab_hdr ( pe * p , 108 * msg ) 110  pe_pt__msg_q * q = msg ; 111  pe_msg_r * r = msg ; 112 ut32_t pt_id ; 115 i( q -> pt_id > p -> n_pts_ ) { 116 r -> us = -1; 117  r ; 119 pt_id = p -> pt__id [ q ->port_id]; 122 r -> us = `e_pe_pt__ab ( p ->p, 123 pt_id ); 125  r ; 126 } } 129 $pe_msg_q_pt__dib_hdr ( pe * p , 130 * msg ) 132  pe_pt__msg_q * q = msg ; 133  pe_msg_r * r = msg ; 134 ut32_t pt_id ; 137 i( q -> pt_id > p -> n_pts_ ) { 138 r -> us = -1; 139  r ; 141 pt_id = p -> pt__id [ q ->port_id]; 144 r -> us = `e_pe_pt__dib ( p ->p, 145 pt_id ); 147  r ; 148 } } 151 $pe_msg_q_vid_hdr ( __e_unud  pe * p , 152 * msg ) 154  pe_msg_r * r = msg ; 156 r -> us = -1; 158  r ; 159 } } 162 $pe_msg_q_hd ( pe * p ) 164 ut32_t msgq_id ; 166  msgq_id = 0; msgq_id < p -> n_msgq ; msgq_id++) { 168  pe_msg_q * q ; 169 pe_msg_q_hdr f_hd ; 171 q = `pe_msg_cv ( p , msgq_id ); 172 i( q = NULL ) 175 f_hd = ( q -> ty < PIPELINE_MSG_REQS ) ? 176 p -> hdrs [ q -> ty ] : 177 pe_msg_q_vid_hdr ; 179 i( f_hd = NULL ) 180 f_hd = pe_msg_q_vid_hdr ; 182 `pe_msg_nd ( p , 183 msgq_id , 184 `f_hd ( p , (* q )); 189 } } @VIL/pipeline_common/pipeline_common_be.h 17 #ide __INCLUDE_PIPELINE_COMMON_BE_H__ 18  #__INCLUDE_PIPELINE_COMMON_BE_H__ ) 20  ~ 21  ~ 22  ~ 24  ~"pe_be.h " 26  gpe ; 28 epe_msg_q_ty { 29 mPIPELINE_MSG_REQ_PING = 0, 30 mPIPELINE_MSG_REQ_STATS_PORT_IN , 31 mPIPELINE_MSG_REQ_STATS_PORT_OUT , 32 mPIPELINE_MSG_REQ_STATS_TABLE , 33 mPIPELINE_MSG_REQ_PORT_IN_ENABLE , 34 mPIPELINE_MSG_REQ_PORT_IN_DISABLE , 35 mPIPELINE_MSG_REQ_CUSTOM , 36 mPIPELINE_MSG_REQS 39 *(* tpe_msg_q_hdr )( tpe * tp , * tmsg ); 41  spe { 42  e_pe * mp ; 43 ut32_t mpt__id [ PIPELINE_MAX_PORT_IN ]; 44 ut32_t mpt_out_id [ PIPELINE_MAX_PORT_OUT ]; 45 ut32_t mb_id [ PIPELINE_MAX_TABLES ]; 46  e_rg * mmsgq_ [ PIPELINE_MAX_MSGQ_IN ]; 47  e_rg * mmsgq_out [ PIPELINE_MAX_MSGQ_OUT ]; 49 ut32_t mn_pts_ ; 50 ut32_t mn_pts_out ; 51 ut32_t mn_bs ; 52 ut32_t mn_msgq ; 54 pe_msg_q_hdr mhdrs [ PIPELINE_MSG_REQS ]; 55  mme [ PIPELINE_NAME_SIZE ]; 56 ut32_t mlog_v ; 59 epe_log_v { 60 mPIPELINE_LOG_LEVEL_HIGH = 1, 61 mPIPELINE_LOG_LEVEL_LOW , 62 mPIPELINE_LOG_LEVELS 65  #PLOG ( p , v , fmt , ...) \ 67 i( p -> log_v > PIPELINE_LOG_LEVEL_ ## v ) \ 68 `rtf ( dout , "[%s] " fmt "\n", p -> me , ## __VA_ARGS__ );\ 69 } 0) ) 71  le * 72 $pe_msg_cv ( pe * p , 73 ut32_t msgq_id ) 75  e_rg * r = p -> msgq_ [ msgq_id ]; 76 * msg ; 77  us = `e_rg_sc_dequeue ( r , & msg ); 79 i( us != 0) 80  NULL ; 82  msg ; 83 } } 85  le  86 $pe_msg_nd ( pe * p , 87 ut32_t msgq_id , 88 * msg ) 90  e_rg * r = p -> msgq_out [ msgq_id ]; 91  us ; 94 us = `e_rg__queue ( r , msg ); 95 }  us =- ENOBUFS ); 96 } } 98  spe_msg_q { 99 pe_msg_q_ty mty ; 102  spe_s_msg_q { 103 pe_msg_q_ty mty ; 104 ut32_t mid ; 107  spe_pt__msg_q { 108 pe_msg_q_ty mty ; 109 ut32_t mpt_id ; 112  spe_cuom_msg_q { 113 pe_msg_q_ty mty ; 114 ut32_t msubty ; 117  spe_msg_r { 118  mus ; 121  spe_s_pt__msg_r { 122  mus ; 123  e_pe_pt__s ms ; 126  spe_s_pt_out_msg_r { 127  mus ; 128  e_pe_pt_out_s ms ; 131  spe_s_b_msg_r { 132  mus ; 133  e_pe_b_s ms ; 136 * pe_msg_q_pg_hdr ( pe * p , * msg ); 137 * pe_msg_q_s_pt__hdr ( pe * p , * msg ); 138 * pe_msg_q_s_pt_out_hdr ( pe * p , * msg ); 139 * pe_msg_q_s_b_hdr ( pe * p , * msg ); 140 * pe_msg_q_pt__ab_hdr ( pe * p , * msg ); 141 * pe_msg_q_pt__dib_hdr ( pe * p , * msg ); 142 * pe_msg_q_vid_hdr ( pe * p , * msg ); 144  pe_msg_q_hd ( pe * p ); @VIL/pipeline_common/pipeline_common_fe.c 17  ~ 18  ~ 19  ~ 21  ~ 22  ~ 23  ~ 24  ~ 25  ~ 26  ~ 27  ~ 28  ~ 29  ~ 30  ~ 31  ~ 33  ~"pe_comm_.h " 34 #ide VNF_ACL 35  ~"r.h " 39 $p_pe_pg ( p_ms * p , 40 ut32_t pe_id ) 42  p_pe_ms * p ; 43  pe_msg_q * q ; 44  pe_msg_r * r ; 45  us = 0; 48 i( p = NULL ) 51 `APP_PARAM_FIND_BY_ID ( p -> pe_ms , "PIPELINE", pe_id , p ); 52 i( p = NULL ) 56 q = `p_msg_loc ( p ); 57 i( q = NULL ) 61 q -> ty = PIPELINE_MSG_REQ_PING ; 64 r = `p_msg_nd_cv ( p , pe_id , q , MSG_TIMEOUT_DEFAULT ); 65 i( r = NULL ) 69 us = r ->status; 72 `p_msg_ ( p , r ); 74  us ; 75 } } 78 $p_pe_s_pt_ ( p_ms * p , 79 ut32_t pe_id , 80 ut32_t pt_id , 81  e_pe_pt__s * s ) 83  p_pe_ms * p ; 84  pe_s_msg_q * q ; 85  pe_s_pt__msg_r * r ; 86  us = 0; 89 i(( p = NULL ) || 90 ( s = NULL )) 93 `APP_PARAM_FIND_BY_ID ( p -> pe_ms , "PIPELINE", pe_id , p ); 94 i(( p = NULL ) || 95 ( pt_id > p -> n_pktq_ )) 99 q = `p_msg_loc ( p ); 100 i( q = NULL ) 104 q -> ty = PIPELINE_MSG_REQ_STATS_PORT_IN ; 105 q -> id = pt_id ; 108 r = ( pe_s_pt__msg_r *) 109 `p_msg_nd_cv ( p , pe_id , q , MSG_TIMEOUT_DEFAULT ); 110 i( r = NULL ) 114 us = r ->status; 115 i( us == 0) 116 `memy ( s , & r ->stats, (rsp->stats)); 119 `p_msg_ ( p , r ); 121  us ; 122 } } 125 $p_pe_s_pt_out ( p_ms * p , 126 ut32_t pe_id , 127 ut32_t pt_id , 128  e_pe_pt_out_s * s ) 130  p_pe_ms * p ; 131  pe_s_msg_q * q ; 132  pe_s_pt_out_msg_r * r ; 133  us = 0; 136 i(( p = NULL ) || 137 ( pe_id > p -> n_pes ) || 138 ( s = NULL )) 141 `APP_PARAM_FIND_BY_ID ( p -> pe_ms , "PIPELINE", pe_id , p ); 142 i(( p = NULL ) || 143 ( pt_id > p -> n_pktq_out )) 147 q = `p_msg_loc ( p ); 148 i( q = NULL ) 152 q -> ty = PIPELINE_MSG_REQ_STATS_PORT_OUT ; 153 q -> id = pt_id ; 156 r = `p_msg_nd_cv ( p , pe_id , q , MSG_TIMEOUT_DEFAULT ); 157 i( r = NULL ) 161 us = r ->status; 162 i( us == 0) 163 `memy ( s , & r ->stats, (rsp->stats)); 166 `p_msg_ ( p , r ); 168  us ; 169 } } 172 $p_pe_s_b ( p_ms * p , 173 ut32_t pe_id , 174 ut32_t b_id , 175  e_pe_b_s * s ) 177  p_pe_ms * p ; 178  pe_s_msg_q * q ; 179  pe_s_b_msg_r * r ; 180  us = 0; 183 i(( p = NULL ) || 184 ( s = NULL )) 187 `APP_PARAM_FIND_BY_ID ( p -> pe_ms , "PIPELINE", pe_id , p ); 188 i( p = NULL ) 192 q = `p_msg_loc ( p ); 193 i( q = NULL ) 197 q -> ty = PIPELINE_MSG_REQ_STATS_TABLE ; 198 q -> id = b_id ; 201 r = `p_msg_nd_cv ( p , pe_id , q , MSG_TIMEOUT_DEFAULT ); 202 i( r = NULL ) 206 us = r ->status; 207 i( us == 0) 208 `memy ( s , & r ->stats, (rsp->stats)); 211 `p_msg_ ( p , r ); 213  us ; 214 } } 217 $p_pe_pt__ab ( p_ms * p , 218 ut32_t pe_id , 219 ut32_t pt_id ) 221  p_pe_ms * p ; 222  pe_pt__msg_q * q ; 223  pe_msg_r * r ; 224  us = 0; 227 i( p = NULL ) 230 `APP_PARAM_FIND_BY_ID ( p -> pe_ms , "PIPELINE", pe_id , p ); 231 i(( p = NULL ) || 232 ( pt_id > p -> n_pktq_ )) 236 q = `p_msg_loc ( p ); 237 i( q = NULL ) 241 q -> ty = PIPELINE_MSG_REQ_PORT_IN_ENABLE ; 242 q -> pt_id =ort_id; 245 r = `p_msg_nd_cv ( p , pe_id , q , MSG_TIMEOUT_DEFAULT ); 246 i( r = NULL ) 250 us = r ->status; 253 `p_msg_ ( p , r ); 255  us ; 256 } } 259 $p_pe_pt__dib ( p_ms * p , 260 ut32_t pe_id , 261 ut32_t pt_id ) 263  p_pe_ms * p ; 264  pe_pt__msg_q * q ; 265  pe_msg_r * r ; 266  us = 0; 269 i( p = NULL ) 272 `APP_PARAM_FIND_BY_ID ( p -> pe_ms , "PIPELINE", pe_id , p ); 273 i(( p = NULL ) || 274 ( pt_id > p -> n_pktq_ )) 278 q = `p_msg_loc ( p ); 279 i( q = NULL ) 283 q -> ty = PIPELINE_MSG_REQ_PORT_IN_DISABLE ; 284 q -> pt_id =ort_id; 287 r = `p_msg_nd_cv ( p , pe_id , q , MSG_TIMEOUT_DEFAULT ); 288 i( r = NULL ) 292 us = r ->status; 295 `p_msg_ ( p , r ); 297  us ; 298 } } 301 $p_lk_cfig ( p_ms * p , 302 ut32_t lk_id , 303 ut32_t , 304 ut32_t dth ) 306  p_lk_ms * p ; 307 ut32_t i , tmask , ho , b ; 310 i( p = NULL ) 313 `APP_PARAM_FIND_BY_ID ( p -> lk_ms , "LINK", lk_id , p ); 314 i( p = NULL ) { 315 `APP_LOG ( p , HIGH , "LINK%" PRIu32 " isot validink", 316 lk_id ); 320 i( p -> e ) { 321 `APP_LOG ( p , HIGH , "%s is UP,lease bring it DOWN first", 322 p -> me ); 326 tmask = (~0U<< (32 - dth ); 327 ho = & tmask ; 328 b = ho | (~ tmask ); 330 i(( == 0) || 331 ( = UINT32_MAX ) || 332 ( = ho ) || 333 ( = b )) { 334 `APP_LOG ( p , HIGH , "Illegal IPddress"); 338  i = 0; i < p -> n_lks ; i++) { 339  p_lk_ms * lk = & p -> lk_ms [ i ]; 340 mylk [ i ] = * lk ; 341 i( `rcmp ( p -> me , lk ->name) == 0) 344 i( lk -> == ip) { 345 `APP_LOG ( p , HIGH , 347 lk -> me ); 352 i(( dth == 0) || (depth > 32)) { 353 `APP_LOG ( p , HIGH , "Illegal value for deptharameter " 354 "(%" PRIu32 ")", 355 dth ); 360 p -> = ip; 361 p -> dth = depth; 362 #ide VNF_ACL 363 i( `ifm_add_v4_pt ( lk_id , `e_bsw32 ( ), dth = IFM_FAILURE ) 368 } } 371  $cvt_efixn_to_tmask_v6 ( ut32_t dth , ut8_t tmask_v6 []) 373  mod , div , i ; 375 `memt ( tmask_v6 , 0, 16); 377 mod = dth % 8; 378 div = dth / 8; 380  i = 0; i < div ; i++) 381 tmask_v6 [ i ] = 0xff; 383 tmask_v6 [ i ] = (~0 << (8 - mod )); 386 } } 389 $g_ho_pti_v6 ( ut8_t v6 [], ut8_ tmask [], ut8_ ho_v6 []) 391  i ; 393  i = 0; i < 16; i++) { 394 ho_v6 [ i ] = v6 [i] & tmask [i]; 398 } } 401 $g_b_pti_v6 ( ut8_t ho [], ut8_ tmask [], ut8_ b_v6 []) 403  i ; 405  i = 0; i < 16; i++) { 406 b_v6 [ i ] = ho [i] | ~ tmask [i]; 410 } } 413 $p_lk_cfig_v6 ( p_ms * p , 414 ut32_t lk_id , ut8_t v6 [], ut32_ dth ) 416  p_lk_ms * p ; 417 ut32_t i ; 418 ut8_t tmask_v6 [16], ho [16], b [16]; 421 i( p = NULL ) 424 `APP_PARAM_FIND_BY_ID ( p -> lk_ms , "LINK", lk_id , p ); 425 i( p = NULL ) { 426 `APP_LOG ( p , HIGH , "LINK%" PRIu32 " isot validink", 427 lk_id ); 431 i( p -> e ) { 432 `APP_LOG ( p , HIGH , "%s is UP,lease bring it DOWN first", 433 p -> me ); 437 `cvt_efixn_to_tmask_v6 ( dth , tmask_v6 ); 438 `g_ho_pti_v6 ( v6 , tmask_v6 , ho ); 439 `g_b_pti_v6 ( ho , tmask_v6 , b ); 441  i = 0; i < p -> n_lks ; i++) { 442  p_lk_ms * lk = & p -> lk_ms [ i ]; 444 i( `rcmp ( p -> me , lk ->name) == 0) 447 i(! `memcmp ( lk -> v6 , ipv6, 16)) { 448 `APP_LOG ( p , HIGH , 450 lk -> me ); 455 i(( dth == 0) || (depth > 128)) { 456 `APP_LOG ( p , HIGH , "Illegal value for deptharameter " 457 "(%" PRIu32 ")", dth ); 462 `memy ( p -> v6 , ipv6, 16); 464 p -> dth_v6 = dth ; 471 #ide VNF_ACL 472 i( `ifm_add_v6_pt ( lk_id , v6 , dth = IFM_FAILURE ) 476 } } 479 $p_lk_up ( p_ms * p , 480 ut32_t lk_id ) 482  p_lk_ms * p ; 485 i( p = NULL ) 488 `APP_PARAM_FIND_BY_ID ( p -> lk_ms , "LINK", lk_id , p ); 489 i( p = NULL ) { 490 `APP_LOG ( p , HIGH , "LINK%" PRIu32 " isot validink", 491 lk_id ); 496 i( p -> e ) { 497 `APP_LOG ( p , HIGH , "%iady UP", p -> me ); 502 ut8_t mp [16]; 504 `memt ( mp , 0, 16); 506 i(( p -> || `memcmp -> v6 , mp , 16)) == 0) { 507 `APP_LOG ( p , HIGH , "%IPddsin s", p -> me ); 511 `p_lk_up_ ( p , p ); 514 } } 517 $p_lk_down ( p_ms * p , 518 ut32_t lk_id ) 520  p_lk_ms * p ; 523 i( p = NULL ) 526 `APP_PARAM_FIND_BY_ID ( p -> lk_ms , "LINK", lk_id , p ); 527 i( p = NULL ) { 528 `APP_LOG ( p , HIGH , "LINK%" PRIu32 " isot validink", 529 lk_id ); 534 i( p -> e == 0) { 535 `APP_LOG ( p , HIGH , "%iady DOWN", p -> me ); 539 `p_lk_down_ ( p , p ); 542 } } 548  scmd_pg_su { 549 cmdle_fixed_rg_t mp_rg ; 550 ut32_t mpe_id ; 551 cmdle_fixed_rg_t mpg_rg ; 555 $cmd_pg_rd ( 556 * rd_su , 557 __e_unud  cmdle * , 558 * da ) 560  cmd_pg_su * ms = rd_su ; 561  p_ms * p = da ; 562  us ; 564 us = `p_pe_pg ( p , ms -> pe_id ); 565 i( us != 0) 566 `tf ("Command failed\n"); 567 } } 569 cmdle_r_tok_rg_t gcmd_pg_p_rg = 570 TOKEN_STRING_INITIALIZER ( cmd_pg_su , p_rg , "p"); 572 cmdle_r_tok_num_t gcmd_pg_pe_id = 573 TOKEN_NUM_INITIALIZER ( cmd_pg_su , pe_id , UINT32 ); 575 cmdle_r_tok_rg_t gcmd_pg_pg_rg = 576 TOKEN_STRING_INITIALIZER ( cmd_pg_su , pg_rg , "ping"); 578 cmdle_r__t gcmd_pg = { 579 . f = cmd_pg_rd , 580 . gda = NULL , 581 . ghp_r = "Pipelineing", 582 . gtoks = { 583 (*& cmd_pg_p_rg , 584 (*& cmd_pg_pe_id , 585 (*& cmd_pg_pg_rg , 586 NULL , 594  scmd_s_pt__su { 595 cmdle_fixed_rg_t mp_rg ; 596 ut32_t mpe_id ; 597 cmdle_fixed_rg_t ms_rg ; 598 cmdle_fixed_rg_t mpt_rg ; 599 cmdle_fixed_rg_t m_rg ; 600 ut32_t mpt__id ; 604 $cmd_s_pt__rd ( 605 * rd_su , 606 __e_unud  cmdle * , 607 * da ) 609  cmd_s_pt__su * ms = rd_su ; 610  p_ms * p = da ; 611  e_pe_pt__s s ; 612  us ; 614 us = `p_pe_s_pt_ ( p , 615 ms -> pe_id , 616 ms -> pt__id , 617 & s ); 619 i( us != 0) { 620 `tf ("Command failed\n"); 625 `tf ("P%" PRIu32 " - stats for inputort %" PRIu32 ":\n" 626 "\tPkt: %" PRIu64 "\n" 627 "\tPktdrݳd by AH: %" PRIu64 "\n" 628 "\tPktdrݳd by oth: %" PRIu64 "\n", 629 ms -> pe_id , 630 ms -> pt__id , 631 s .s. n_pkts_ , 632 s . n_pkts_drݳd_by_ah , 633 s .s. n_pkts_dr ); 634 } } 636 cmdle_r_tok_rg_t gcmd_s_pt__p_rg = 637 TOKEN_STRING_INITIALIZER ( cmd_s_pt__su , p_rg , 640 cmdle_r_tok_num_t gcmd_s_pt__pe_id = 641 TOKEN_NUM_INITIALIZER ( cmd_s_pt__su , pe_id , 642 UINT32 ); 644 cmdle_r_tok_rg_t gcmd_s_pt__s_rg = 645 TOKEN_STRING_INITIALIZER ( cmd_s_pt__su , s_rg , 648 cmdle_r_tok_rg_t gcmd_s_pt__pt_rg = 649 TOKEN_STRING_INITIALIZER ( cmd_s_pt__su , pt_rg , 652 cmdle_r_tok_rg_t gcmd_s_pt___rg = 653 TOKEN_STRING_INITIALIZER ( cmd_s_pt__su , _rg , 656 cmdle_r_tok_num_t gcmd_s_pt__pt__id = 657 TOKEN_NUM_INITIALIZER ( cmd_s_pt__su , pt__id , 658 UINT32 ); 660 cmdle_r__t gcmd_s_pt_ = { 661 . f = cmd_s_pt__rd , 662 . gda = NULL , 663 . ghp_r = "Pipeline inputort stats", 664 . gtoks = { 665 (*& cmd_s_pt__p_rg , 666 (*& cmd_s_pt__pe_id , 667 (*& cmd_s_pt__s_rg , 668 (*& cmd_s_pt__pt_rg , 669 (*& cmd_s_pt___rg , 670 (*& cmd_s_pt__pt__id , 671 NULL , 679  scmd_s_pt_out_su { 680 cmdle_fixed_rg_t mp_rg ; 681 ut32_t mpe_id ; 682 cmdle_fixed_rg_t ms_rg ; 683 cmdle_fixed_rg_t mpt_rg ; 684 cmdle_fixed_rg_t mout_rg ; 685 ut32_t mpt_out_id ; 689 $cmd_s_pt_out_rd ( 690 * rd_su , 691 __e_unud  cmdle * , 692 * da ) 695  cmd_s_pt_out_su * ms = rd_su ; 696  p_ms * p = da ; 697  e_pe_pt_out_s s ; 698  us ; 700 us = `p_pe_s_pt_out ( p , 701 ms -> pe_id , 702 ms -> pt_out_id , 703 & s ); 705 i( us != 0) { 706 `tf ("Command failed\n"); 711 `tf ("P%" PRIu32 " - stats for outputort %" PRIu32 ":\n" 712 "\tPkt: %" PRIu64 "\n" 713 "\tPktdrݳd by AH: %" PRIu64 "\n" 714 "\tPktdrݳd by oth: %" PRIu64 "\n", 715 ms -> pe_id , 716 ms -> pt_out_id , 717 s .s. n_pkts_ , 718 s . n_pkts_drݳd_by_ah , 719 s .s. n_pkts_dr ); 720 } } 722 cmdle_r_tok_rg_t gcmd_s_pt_out_p_rg = 723 TOKEN_STRING_INITIALIZER ( cmd_s_pt_out_su , p_rg , 726 cmdle_r_tok_num_t gcmd_s_pt_out_pe_id = 727 TOKEN_NUM_INITIALIZER ( cmd_s_pt_out_su , pe_id , 728 UINT32 ); 730 cmdle_r_tok_rg_t gcmd_s_pt_out_s_rg = 731 TOKEN_STRING_INITIALIZER ( cmd_s_pt_out_su , s_rg , 734 cmdle_r_tok_rg_t gcmd_s_pt_out_pt_rg = 735 TOKEN_STRING_INITIALIZER ( cmd_s_pt_out_su , pt_rg , 738 cmdle_r_tok_rg_t gcmd_s_pt_out_out_rg = 739 TOKEN_STRING_INITIALIZER ( cmd_s_pt_out_su , out_rg , 742 cmdle_r_tok_num_t gcmd_s_pt_out_pt_out_id = 743 TOKEN_NUM_INITIALIZER ( cmd_s_pt_out_su , pt_out_id , 744 UINT32 ); 746 cmdle_r__t gcmd_s_pt_out = { 747 . f = cmd_s_pt_out_rd , 748 . gda = NULL , 749 . ghp_r = "Pipeline outputort stats", 750 . gtoks = { 751 (*& cmd_s_pt_out_p_rg , 752 (*& cmd_s_pt_out_pe_id , 753 (*& cmd_s_pt_out_s_rg , 754 (*& cmd_s_pt_out_pt_rg , 755 (*& cmd_s_pt_out_out_rg , 756 (*& cmd_s_pt_out_pt_out_id , 757 NULL , 765  scmd_s_b_su { 766 cmdle_fixed_rg_t mp_rg ; 767 ut32_t mpe_id ; 768 cmdle_fixed_rg_t ms_rg ; 769 cmdle_fixed_rg_t mb_rg ; 770 ut32_t mb_id ; 774 $cmd_s_b_rd ( 775 * rd_su , 776 __e_unud  cmdle * , 777 * da ) 779  cmd_s_b_su * ms = rd_su ; 780  p_ms * p = da ; 781  e_pe_b_s s ; 782  us ; 784 us = `p_pe_s_b ( p , 785 ms -> pe_id , 786 ms -> b_id , 787 & s ); 789 i( us != 0) { 790 `tf ("Command failed\n"); 795 `tf ("P%" PRIu32 " - stats forable %" PRIu32 ":\n" 796 "\tPkt: %" PRIu64 "\n" 797 "\tPkt whookumiss: %" PRIu64 "\n" 798 "\tPkt whookuh drݳd by AH: %" PRIu64 "\n" 799 "\tPkt whookuh drݳd by oths: %" PRIu64 "\n" 800 "\tPkt whookumisdrݳd by AH: %" PRIu64 "\n" 801 "\tPkt whookumisdrݳd by oths: %" PRIu64 "\n", 802 ms -> pe_id , 803 ms -> b_id , 804 s .s. n_pkts_ , 805 s .s. n_pkts_lookup_miss , 806 s . n_pkts_drݳd_by_lkp_h_ah , 807 s . n_pkts_drݳd_lkp_h , 808 s . n_pkts_drݳd_by_lkp_miss_ah , 809 s . n_pkts_drݳd_lkp_miss ); 810 } } 812 cmdle_r_tok_rg_t gcmd_s_b_p_rg = 813 TOKEN_STRING_INITIALIZER ( cmd_s_b_su , p_rg , 816 cmdle_r_tok_num_t gcmd_s_b_pe_id = 817 TOKEN_NUM_INITIALIZER ( cmd_s_b_su , pe_id , 818 UINT32 ); 820 cmdle_r_tok_rg_t gcmd_s_b_s_rg = 821 TOKEN_STRING_INITIALIZER ( cmd_s_b_su , s_rg , 824 cmdle_r_tok_rg_t gcmd_s_b_b_rg = 825 TOKEN_STRING_INITIALIZER ( cmd_s_b_su , b_rg , 828 cmdle_r_tok_num_t gcmd_s_b_b_id = 829 TOKEN_NUM_INITIALIZER ( cmd_s_b_su , b_id , UINT32 ); 831 cmdle_r__t gcmd_s_b = { 832 . f = cmd_s_b_rd , 833 . gda = NULL , 834 . ghp_r = "Pipelineable stats", 835 . gtoks = { 836 (*& cmd_s_b_p_rg , 837 (*& cmd_s_b_pe_id , 838 (*& cmd_s_b_s_rg , 839 (*& cmd_s_b_b_rg , 840 (*& cmd_s_b_b_id , 841 NULL , 849  scmd_pt__ab_su { 850 cmdle_fixed_rg_t mp_rg ; 851 ut32_t mpe_id ; 852 cmdle_fixed_rg_t mpt_rg ; 853 cmdle_fixed_rg_t m_rg ; 854 ut32_t mpt__id ; 855 cmdle_fixed_rg_t mab_rg ; 859 $cmd_pt__ab_rd ( 860 * rd_su , 861 __e_unud  cmdle * , 862 * da ) 864  cmd_pt__ab_su * ms = rd_su ; 865  p_ms * p = da ; 866  us ; 868 us = `p_pe_pt__ab ( p , 869 ms -> pe_id , 870 ms -> pt__id ); 872 i( us != 0) 873 `tf ("Command failed\n"); 874 } } 876 cmdle_r_tok_rg_t gcmd_pt__ab_p_rg = 877 TOKEN_STRING_INITIALIZER ( cmd_pt__ab_su , p_rg , 880 cmdle_r_tok_num_t gcmd_pt__ab_pe_id = 881 TOKEN_NUM_INITIALIZER ( cmd_pt__ab_su , pe_id , 882 UINT32 ); 884 cmdle_r_tok_rg_t gcmd_pt__ab_pt_rg = 885 TOKEN_STRING_INITIALIZER ( cmd_pt__ab_su , pt_rg , 888 cmdle_r_tok_rg_t gcmd_pt__ab__rg = 889 TOKEN_STRING_INITIALIZER ( cmd_pt__ab_su , _rg , 892 cmdle_r_tok_num_t gcmd_pt__ab_pt__id = 893 TOKEN_NUM_INITIALIZER ( cmd_pt__ab_su , pt__id , 894 UINT32 ); 896 cmdle_r_tok_rg_t gcmd_pt__ab_ab_rg = 897 TOKEN_STRING_INITIALIZER ( cmd_pt__ab_su , 898 ab_rg , "enable"); 900 cmdle_r__t gcmd_pt__ab = { 901 . f = cmd_pt__ab_rd , 902 . gda = NULL , 903 . ghp_r = "Pipeline inputortnable", 904 . gtoks = { 905 (*& cmd_pt__ab_p_rg , 906 (*& cmd_pt__ab_pe_id , 907 (*& cmd_pt__ab_pt_rg , 908 (*& cmd_pt__ab__rg , 909 (*& cmd_pt__ab_pt__id , 910 (*& cmd_pt__ab_ab_rg , 911 NULL , 919  scmd_pt__dib_su { 920 cmdle_fixed_rg_t mp_rg ; 921 ut32_t mpe_id ; 922 cmdle_fixed_rg_t mpt_rg ; 923 cmdle_fixed_rg_t m_rg ; 924 ut32_t mpt__id ; 925 cmdle_fixed_rg_t mdib_rg ; 929 $cmd_pt__dib_rd ( 930 * rd_su , 931 __e_unud  cmdle * , 932 * da ) 934  cmd_pt__dib_su * ms = rd_su ; 935  p_ms * p = da ; 936  us ; 938 us = `p_pe_pt__dib ( p , 939 ms -> pe_id , 940 ms -> pt__id ); 942 i( us != 0) 943 `tf ("Command failed\n"); 944 } } 946 cmdle_r_tok_rg_t gcmd_pt__dib_p_rg = 947 TOKEN_STRING_INITIALIZER ( cmd_pt__dib_su , p_rg , 950 cmdle_r_tok_num_t gcmd_pt__dib_pe_id = 951 TOKEN_NUM_INITIALIZER ( cmd_pt__dib_su , pe_id , 952 UINT32 ); 954 cmdle_r_tok_rg_t gcmd_pt__dib_pt_rg = 955 TOKEN_STRING_INITIALIZER ( cmd_pt__dib_su , pt_rg , 958 cmdle_r_tok_rg_t gcmd_pt__dib__rg = 959 TOKEN_STRING_INITIALIZER ( cmd_pt__dib_su , _rg , 962 cmdle_r_tok_num_t gcmd_pt__dib_pt__id = 963 TOKEN_NUM_INITIALIZER ( cmd_pt__dib_su , pt__id , 964 UINT32 ); 966 cmdle_r_tok_rg_t gcmd_pt__dib_dib_rg = 967 TOKEN_STRING_INITIALIZER ( cmd_pt__dib_su , 968 dib_rg , "disable"); 970 cmdle_r__t gcmd_pt__dib = { 971 . f = cmd_pt__dib_rd , 972 . gda = NULL , 973 . ghp_r = "Pipeline inputort disable", 974 . gtoks = { 975 (*& cmd_pt__dib_p_rg , 976 (*& cmd_pt__dib_pe_id , 977 (*& cmd_pt__dib_pt_rg , 978 (*& cmd_pt__dib__rg , 979 (*& cmd_pt__dib_pt__id , 980 (*& cmd_pt__dib_dib_rg , 981 NULL , 990 $t_lk_fo ( p_lk_ms * p ) 992  e_h_s s ; 993  h_addr * mac_addr ; 994 ut32_t tmask = (~0U<< (32 - p -> dth ); 995 ut32_t ho = p -> & tmask ; 996 ut32_t b = ho | (~ tmask ); 998 `memt (& s , 0, (stats)); 999 `e_h_s_g ( p -> pmd_id , & s ); 1001 mac_addr = ( h_addr *& p ->mac_addr; 1003 i( ` ( p -> pci_bdf )) 1004 `tf ("%s(%s): flags=<%s>\n", 1005 p -> me , 1006 p -> pci_bdf , 1007 ( p -> e ) ? "UP" : "DOWN"); 1009 `tf ("%s: flags=<%s>\n", 1010 p -> me , 1011 ( p -> e ) ? "UP" : "DOWN"); 1013 i( p -> ) 1014 `tf ("\t %" PRIu32 ".%" PRIu32 1015 ".%" PRIu32 ".%" PRIu32 1016 "mask %" PRIu32 ".%" PRIu32 1017 ".%" PRIu32 ".%" PRIu32 " " 1018 "brd %" PRIu32 ".%" PRIu32 1019 ".%" PRIu32 ".%" PRIu32 "\n", 1020 ( p -> >> 24) & 0xFF, 1021 ( p -> >> 16) & 0xFF, 1022 ( p -> >> 8) & 0xFF, 1023 p -> & 0xFF, 1024 ( tmask >> 24) & 0xFF, 1025 ( tmask >> 16) & 0xFF, 1026 ( tmask >> 8) & 0xFF, 1027 tmask & 0xFF, 1028 ( b >> 24) & 0xFF, 1029 ( b >> 16) & 0xFF, 1030 ( b >> 8) & 0xFF, 1031 b & 0xFF); 1033 `tf ("\th %02" PRIx32 ":%02" PRIx32 ":%02" PRIx32 1034 ":%02" PRIx32 ":%02" PRIx32 ":%02" PRIx32 "\n", 1035 mac_addr -> addr_bys [0], 1036 mac_addr -> addr_bys [1], 1037 mac_addr -> addr_bys [2], 1038 mac_addr -> addr_bys [3], 1039 mac_addr -> addr_bys [4], 1040 mac_addr -> addr_bys [5]); 1042 `tf ("\tRXack%" PRIu64 1043 " by%" PRIu64 1045 s . acks , 1046 s . ibys ); 1048 `tf ("\tRXܠ%" PRIu64 1049 " misd %" PRIu64 1050 "o-mbu%" PRIu64 1052 s . s , 1053 s . imisd , 1054 s . rx_nombuf ); 1056 `tf ("\tTXack%" PRIu64 1057 " by%" PRIu64 "\n", 1058 s . acks , 1059 s . obys ); 1061 `tf ("\tTXܠ%" PRIu64 1063 s . ۼs ); 1065 `tf ("\n"); 1066 } } 1068  scmd_lk_cfig_su { 1069 cmdle_fixed_rg_t mlk_rg ; 1070 ut32_t mlk_id ; 1071 cmdle_fixed_rg_t mcfig_rg ; 1072 cmdle_addr_t m ; 1073 ut32_t mdth ; 1077 cmd_lk_cfig_rd ( 1078 * rd_su , 1079 __ibu__ (( unud ) cmdle * , 1080 * da ) 1082  cmd_lk_cfig_su * gms = rd_su ; 1083  p_ms * gp = da ; 1084  gus ; 1086 ut32_t glk_id = ms -> lk_id ; 1087 ut32_t g ; 1088 ut8_t gv6 [16]; 1089 i( gms -> g . gmy = AF_INET ) 1090 = e_bsw32 (( ut32_t ms ->. addr . v4 . s_addr ); 1092 memy ( v6 , ms -> . addr .v6. s6_addr , 16); 1094 ut32_t gdth = ms -> dth ; 1096 i( gms -> g . gmy = AF_INET ) 1097 us = p_lk_cfig ( p , lk_id , , dth ); 1099 gus = p_lk_cfig_v6 ( p , lk_id , v6 , dth ); 1101 i( gus ) 1102 tf ("Command failed\n"); 1104  p_lk_ms * gp ; 1106 APP_PARAM_FIND_BY_ID ( p -> lk_ms , "LINK", lk_id , p ); 1107 i( gp ) 1108 t_lk_fo ( p ); 1112 cmdle_r_tok_rg_t gcmd_lk_cfig_lk_rg = 1113 TOKEN_STRING_INITIALIZER ( cmd_lk_cfig_su , lk_rg , 1116 cmdle_r_tok_num_t gcmd_lk_cfig_lk_id = 1117 TOKEN_NUM_INITIALIZER ( cmd_lk_cfig_su , lk_id , UINT32 ); 1119 cmdle_r_tok_rg_t gcmd_lk_cfig_cfig_rg = 1120 TOKEN_STRING_INITIALIZER ( cmd_lk_cfig_su , cfig_rg , 1123 cmdle_r_tok_addr_t gcmd_lk_cfig_ = 1124 TOKEN_IPADDR_INITIALIZER ( cmd_lk_cfig_su , ); 1126 cmdle_r_tok_num_t gcmd_lk_cfig_dth = 1127 TOKEN_NUM_INITIALIZER ( cmd_lk_cfig_su , dth , UINT32 ); 1129 cmdle_r__t gcmd_lk_cfig = { 1130 . f = cmd_lk_cfig_rd , 1131 . gda = NULL , 1132 . ghp_r = "Link configuration", 1133 . gtoks = { 1134 (*)& cmd_lk_cfig_lk_rg , 1135 (*)& cmd_lk_cfig_lk_id , 1136 (*)& cmd_lk_cfig_cfig_rg , 1137 (*)& cmd_lk_cfig_ , 1138 (*)& cmd_lk_cfig_dth , 1139 NULL , 1147  scmd_lk_up_su { 1148 cmdle_fixed_rg_t mlk_rg ; 1149 ut32_t mlk_id ; 1150 cmdle_fixed_rg_t mup_rg ; 1154 cmd_lk_up_rd ( 1155 * rd_su , 1156 __ibu__ (( unud ) cmdle * , 1157 * da ) 1159  cmd_lk_up_su * gms = rd_su ; 1160  p_ms * gp = da ; 1161  gus ; 1163 gus = p_lk_up ( p , ms -> lk_id ); 1164 i( gus != 0) 1165 tf ("Command failed\n"); 1167  p_lk_ms * gp ; 1169 APP_PARAM_FIND_BY_ID ( p -> lk_ms , "LINK", ms -> lk_id , 1170 p ); 1171 i( gp ) 1172 t_lk_fo ( p ); 1176 cmdle_r_tok_rg_t gcmd_lk_up_lk_rg = 1177 TOKEN_STRING_INITIALIZER ( cmd_lk_up_su , lk_rg , 1180 cmdle_r_tok_num_t gcmd_lk_up_lk_id = 1181 TOKEN_NUM_INITIALIZER ( cmd_lk_up_su , lk_id , UINT32 ); 1183 cmdle_r_tok_rg_t gcmd_lk_up_up_rg = 1184 TOKEN_STRING_INITIALIZER ( cmd_lk_up_su , up_rg , "up"); 1186 cmdle_r__t gcmd_lk_up = { 1187 . f = cmd_lk_up_rd , 1188 . gda = NULL , 1189 . ghp_r = "Link UP", 1190 . gtoks = { 1191 (*)& cmd_lk_up_lk_rg , 1192 (*)& cmd_lk_up_lk_id , 1193 (*)& cmd_lk_up_up_rg , 1194 NULL , 1202  scmd_lk_down_su { 1203 cmdle_fixed_rg_t mlk_rg ; 1204 ut32_t mlk_id ; 1205 cmdle_fixed_rg_t mdown_rg ; 1209 cmd_lk_down_rd ( 1210 * rd_su , 1211 __ibu__ (( unud ) cmdle * , 1212 * da ) 1214  cmd_lk_down_su * gms = rd_su ; 1215  p_ms * gp = da ; 1216  gus ; 1218 gus = p_lk_down ( p , ms -> lk_id ); 1219 i( gus != 0) 1220 tf ("Command failed\n"); 1222  p_lk_ms * gp ; 1224 APP_PARAM_FIND_BY_ID ( p -> lk_ms , "LINK", ms -> lk_id , 1225 p ); 1226 i( gp ) 1227 t_lk_fo ( p ); 1231 cmdle_r_tok_rg_t gcmd_lk_down_lk_rg = 1232 TOKEN_STRING_INITIALIZER ( cmd_lk_down_su , lk_rg , 1235 cmdle_r_tok_num_t gcmd_lk_down_lk_id = 1236 TOKEN_NUM_INITIALIZER ( cmd_lk_down_su , lk_id , UINT32 ); 1238 cmdle_r_tok_rg_t gcmd_lk_down_down_rg = 1239 TOKEN_STRING_INITIALIZER ( cmd_lk_down_su , down_rg , 1242 cmdle_r__t gcmd_lk_down = { 1243 . f = cmd_lk_down_rd , 1244 . gda = NULL , 1245 . ghp_r = "Link DOWN", 1246 . gtoks = { 1247 (*& cmd_lk_down_lk_rg , 1248 (*& cmd_lk_down_lk_id , 1249 (*& cmd_lk_down_down_rg , 1250 NULL , 1258  scmd_lk_ls_su { 1259 cmdle_fixed_rg_t mlk_rg ; 1260 cmdle_fixed_rg_t mls_rg ; 1264 cmd_lk_ls_rd ( 1265 __ibu__ (( unud )* rd_su , 1266 __ibu__ (( unud ) cmdle * , 1267 * da ) 1269  p_ms * gp = da ; 1270 ut32_t glk_id ; 1272  glk_id = 0;k_id < gp -> gn_lks ;ink_id++) { 1273  p_lk_ms * gp ; 1275 APP_PARAM_FIND_BY_ID ( p -> lk_ms , "LINK", lk_id , p ); 1276 i( gp ) 1277 t_lk_fo ( p ); 1279 #ide VNF_ACL 1280 t_r_das (); 1284 cmdle_r_tok_rg_t gcmd_lk_ls_lk_rg = 1285 TOKEN_STRING_INITIALIZER ( cmd_lk_ls_su , lk_rg , 1288 cmdle_r_tok_rg_t gcmd_lk_ls_ls_rg = 1289 TOKEN_STRING_INITIALIZER ( cmd_lk_ls_su , ls_rg , "ls"); 1291 cmdle_r__t gcmd_lk_ls = { 1292 . f = cmd_lk_ls_rd , 1293 . gda = NULL , 1294 . ghp_r = "Linkist", 1295 . gtoks = { 1296 (*)& cmd_lk_ls_lk_rg , 1297 (*)& cmd_lk_ls_ls_rg , 1298 NULL , 1306  scmd_qu_su { 1307 cmdle_fixed_rg_t mqu ; 1311 $cmd_qu_rd ( 1312 __e_unud * rd_su , 1313  cmdle * , 1314 __e_unud * da ) 1316 `cmdle_qu ( ); 1317 } } 1319  cmdle_r_tok_rg_t gcmd_qu_qu = 1320 TOKEN_STRING_INITIALIZER ( cmd_qu_su , qu , "quit"); 1322  cmdle_r__t gcmd_qu = { 1323 . f = cmd_qu_rd , 1324 . gda = NULL , 1325 . ghp_r = "Quit", 1326 . gtoks = { 1327 (*& cmd_qu_qu , 1328 NULL , 1337 $p_run_fe ( 1338 cmdle_r_x_t * x , 1339 cڡ * fe_me ) 1341  cmdle * fe_ ; 1342  fd ; 1344 fd = `ݒ ( fe_me , O_RDONLY ); 1345 i( fd < 0) { 1346 `tf ("Cn of\"%s\"\n", fe_me ); 1350 fe_ = `cmdle_w ( x , "", fd , 1); 1351 `cmdle_ ( fe_ ); 1352 `o ( fd ); 1353 } } 1355  scmd_run_fe_su { 1356 cmdle_fixed_rg_t mrun_rg ; 1357  mfe_me [ APP_FILE_NAME_SIZE ]; 1361 cmd_run_rd ( 1362 * rd_su , 1363  cmdle * , 1364 __ibu__ (( unud )* da ) 1366  cmd_run_fe_su * gms = rd_su ; 1368 p_run_fe ( -> x , ms -> fe_me ); 1371 cmdle_r_tok_rg_t gcmd_run_run_rg = 1372 TOKEN_STRING_INITIALIZER ( cmd_run_fe_su , run_rg , 1375 cmdle_r_tok_rg_t gcmd_run_fe_me = 1376 TOKEN_STRING_INITIALIZER ( cmd_run_fe_su , fe_me , NULL ); 1378 cmdle_r__t gcmd_run = { 1379 . f = cmd_run_rd , 1380 . gda = NULL , 1381 . ghp_r = "Run CLI script file", 1382 . gtoks = { 1383 (*& cmd_run_run_rg , 1384 (*& cmd_run_fe_me , 1385 NULL , 1389  cmdle_r_x_t gpe_comm_cmds [] = { 1390 ( cmdle_r__t *& cmd_qu , 1391 ( cmdle_r__t *& cmd_run , 1393 ( cmdle_r__t *& cmd_lk_cfig , 1394 ( cmdle_r__t *& cmd_lk_up , 1395 ( cmdle_r__t *& cmd_lk_down , 1396 ( cmdle_r__t *& cmd_lk_ls , 1398 ( cmdle_r__t *& cmd_pg , 1399 ( cmdle_r__t *& cmd_s_pt_ , 1400 ( cmdle_r__t *& cmd_s_pt_out , 1401 ( cmdle_r__t *& cmd_s_b , 1402 ( cmdle_r__t *& cmd_pt__ab , 1403 ( cmdle_r__t *& cmd_pt__dib , 1404 NULL , 1408 $p_pe_comm_cmd_push ( p_ms * p ) 1410 ut32_t n_cmds , i ; 1413 n_cmds = `RTE_DIM ( pe_comm_cmds ) - 1; 1414 i( n_cmds > APP_MAX_CMDS - p ->n_cmds) 1415  - ENOMEM ; 1418 `memy (& p -> cmds [p-> n_cmds ], 1419 pe_comm_cmds , 1420 n_cmds * ( cmdle_r_x_t )); 1422  i = 0; i < n_cmds ; i++) 1423 p -> cmds [p-> n_cmds + i ]-> da =pp; 1425 p -> n_cmds +=_cmds; 1426 p -> cmds [p-> n_cmds ] = NULL ; 1429 } } @VIL/pipeline_common/pipeline_common_fe.h 17 #ide __INCLUDE_PIPELINE_COMMON_FE_H__ 18  #__INCLUDE_PIPELINE_COMMON_FE_H__ ) 20  ~ 21  ~ 22  ~ 23  ~ 25  ~"pe_comm_be.h " 26  ~"pe.h " 27  ~"p.h " 29 #ide MSG_TIMEOUT_DEFAULT 30  #MSG_TIMEOUT_DEFAULT 1000 ) 32  p_lk_ms gmylk [ APP_MAX_LINKS ]; 33  le  p_pe_da * 34 $p_pe_da ( p_ms * p , ut32_t id ) 36  p_pe_ms * ms ; 38 `APP_PARAM_FIND_BY_ID ( p -> pe_ms , "PIPELINE", id , ms ); 39 i( ms = NULL ) 40  NULL ; 42  & p -> pe_da [ ms --> pe_ms ]; 43 } } 45  le * 46 $p_pe_da_ ( p_ms * p , ut32_t id ,  pe_ty * y ) 48  p_pe_da * pe_da ; 50 pe_da = `p_pe_da ( p , id ); 51 i( pe_da = NULL ) 52  NULL ; 54 i( `rcmp ( pe_da -> y -> me ,type->name) != 0) 55  NULL ; 57 i( pe_da -> abd == 0) 58  NULL ; 60  pe_da -> ; 61 } } 63  le  e_rg * 64 $p_pe_msgq__g ( p_ms * p , 65 ut32_t pe_id ) 67  p_msgq_ms * p ; 69 `APP_PARAM_FIND_BY_ID ( p -> msgq_ms , 71 pe_id , 72 p ); 73 i( p = NULL ) 74  NULL ; 76  p -> msgq [ p --> msgq_ms ]; 77 } } 79  le  e_rg * 80 $p_pe_msgq_out_g ( p_ms * p , 81 ut32_t pe_id ) 83  p_msgq_ms * p ; 85 `APP_PARAM_FIND_BY_ID ( p -> msgq_ms , 87 pe_id , 88 p ); 89 i( p = NULL ) 90  NULL ; 92  p -> msgq [ p --> msgq_ms ]; 93 } } 95  le * 96 $p_msg_loc ( __e_unud  p_ms * p ) 98  `e_mloc ( NULL , 2048, RTE_CACHE_LINE_SIZE ); 99 } } 101  le  102 $p_msg_ ( __e_unud  p_ms * p , 103 * msg ) 105 `e_ ( msg ); 106 } } 108  le  109 $p_msg_nd ( p_ms * p , 110 ut32_t pe_id , 111 * msg ) 113  e_rg * r = `p_pe_msgq__g ( p , pe_id ); 114  us ; 117 us = `e_rg__queue ( r , msg ); 118 }  us =- ENOBUFS ); 119 } } 121  le * 122 $p_msg_cv ( p_ms * p , 123 ut32_t pe_id ) 125  e_rg * r = `p_pe_msgq_out_g ( p , pe_id ); 126 * msg ; 127  us = `e_rg_sc_dequeue ( r , & msg ); 129 i( us != 0) 130  NULL ; 132  msg ; 133 } } 135  le * 136 $p_msg_nd_cv ( p_ms * p , 137 ut32_t pe_id , 138 * msg , 139 ut32_t timeout_ms ) 141  e_rg * r_q = `p_pe_msgq__g ( p , pe_id ); 142  e_rg * r_r = `p_pe_msgq_out_g ( p , pe_id ); 143 ut64_t hz = `e_g_tsc_hz (); 144 * msg_cv = NULL ; 145 ut64_t ddle ; 146  us = 0; 150 if( r_q ) 151 us = `e_rg__queue ( r_q , (* msg ); 152 }  us =- ENOBUFS ); 155 ddle = ( timeout_ms ) ? 156 ( `e_rdtsc (+ (( hz * timeout_ms ) / 1000)) : 157 UINT64_MAX ; 160 i( `e_rdtsc (> ddle ) 161  NULL ; 162 i( r_r ) 163 us = `e_rg_sc_dequeue ( r_r , & msg_cv ); 164 }  us != 0); 166  msg_cv ; 167 } } 170 p_pe_pg ( p_ms * p , 171 ut32_t pe_id ); 174 p_pe_s_pt_ ( p_ms * p , 175 ut32_t pe_id , 176 ut32_t pt_id , 177  e_pe_pt__s * s ); 180 p_pe_s_pt_out ( p_ms * p , 181 ut32_t pe_id , 182 ut32_t pt_id , 183  e_pe_pt_out_s * s ); 186 p_pe_s_b ( p_ms * p , 187 ut32_t pe_id , 188 ut32_t b_id , 189  e_pe_b_s * s ); 192 p_pe_pt__ab ( p_ms * p , 193 ut32_t pe_id , 194 ut32_t pt_id ); 197 p_pe_pt__dib ( p_ms * p , 198 ut32_t pe_id , 199 ut32_t pt_id ); 202 p_lk_cfig ( p_ms * p , 203 ut32_t lk_id , 204 ut32_t , 205 ut32_t dth ); 208 p_lk_up ( p_ms * p , 209 ut32_t lk_id ); 212 p_lk_down ( p_ms * p , 213 ut32_t lk_id ); 216 p_pe_comm_cmd_push ( p_ms * p ); 219  cvt_efixn_to_tmask_v6 ( ut32_t dth , ut8_t tmask_v6 []); 222 g_ho_pti_v6 ( ut8_t v6 [], ut8_ tmask [], ut8_ ho_v6 []); 225 g_b_pti_v6 ( ut8_t ho [], ut8_ tmask [], ut8_ b_v6 []); 228 p_lk_cfig_v6 ( p_ms * p , 229 ut32_t lk_id , ut8_t v6 [], ut32_ dth ); @VIL/pipeline_loadb/pipeline_loadb.c 17  ~ 18  ~ 19  ~ 20  ~ 21  ~ 23  ~"p.h " 24  ~"pe_comm_.h " 25  ~"pe_ldb.h " 26  ~"vnf_comm.h " 28  ~"pe_picmp_be.h " 32 $p_pe_ldb_y_dbg ( p_ms * p , 33 ut32_t pe_id , ut8_t * msg ) 35  pe_ldb_y_dbg_msg_q * q ; 36  pe_ldb_y_dbg_msg_r * r ; 39 i( p = NULL ) 43 q = `p_msg_loc ( p ); 44 i( q = NULL ) 47 q -> ty = PIPELINE_MSG_REQ_CUSTOM ; 48 q -> subty = PIPELINE_LOADB_MSG_REQ_ENTRY_DBG ; 49 q -> da [0] = msg [0]; 50 q -> da [1] = msg [1]; 52 r = `p_msg_nd_cv ( p , pe_id , q , MSG_TIMEOUT_DEFAULT ); 53 i( r = NULL ) 57 i( r -> us ) { 58 `p_msg_ ( p , r ); 59 `tf ("E܄->u%d\n", r -> us ); 64 `p_msg_ ( p , r ); 67 } } 73  scmd_y_dbg_su { 74 cmdle_fixed_rg_t mp_rg ; 75 ut32_t mp ; 76 cmdle_fixed_rg_t my_rg ; 77 cmdle_fixed_rg_t mdbg_rg ; 78 ut8_t mcmd ; 79 ut8_t md1 ; 83 $cmd_y_dbg_rd (* rd_su , 84 __e_unud  cmdle * , * da ) 86  cmd_y_dbg_su * ms = rd_su ; 87  p_ms * p = da ; 88 ut8_t msg [2]; 89  us ; 91 msg [0] = ms -> cmd ; 92 msg [1] = ms -> d1 ; 93 us = `p_pe_ldb_y_dbg ( p , ms -> p , msg ); 95 i( us != 0) { 96 `tf ("Dbg Command failed\n"); 99 } } 101  cmdle_r_tok_rg_t glb_cmd_y_dbg_p_rg = 102 TOKEN_STRING_INITIALIZER ( cmd_y_dbg_su , p_rg , "p"); 104  cmdle_r_tok_num_t glb_cmd_y_dbg_p = 105 TOKEN_NUM_INITIALIZER ( cmd_y_dbg_su , p , UINT32 ); 107  cmdle_r_tok_rg_t glb_cmd_y_dbg_y_rg = 108 TOKEN_STRING_INITIALIZER ( cmd_y_dbg_su , 109 y_rg , "lbentry"); 111  cmdle_r_tok_rg_t glb_cmd_y_dbg_dbg_rg = 112 TOKEN_STRING_INITIALIZER ( cmd_y_dbg_su , dbg_rg , 115  cmdle_r_tok_num_t glb_cmd_y_dbg_cmd = 116 TOKEN_NUM_INITIALIZER ( cmd_y_dbg_su , cmd , UINT8 ); 118  cmdle_r_tok_num_t glb_cmd_y_dbg_d1 = 119 TOKEN_NUM_INITIALIZER ( cmd_y_dbg_su , d1 , UINT8 ); 121  cmdle_r__t glb_cmd_y_dbg = { 122 . f = cmd_y_dbg_rd , 123 . gda = NULL , 124 . ghp_r = "LOADB dbg cmd", 125 . gtoks = { 126 (*)& lb_cmd_y_dbg_p_rg , 127 (*)& lb_cmd_y_dbg_p , 128 (*)& lb_cmd_y_dbg_y_rg , 129 (*)& lb_cmd_y_dbg_dbg_rg , 130 (*)& lb_cmd_y_dbg_cmd , 131 (*)& lb_cmd_y_dbg_d1 , 132 NULL , 162  scmd_p_add_su { 163 cmdle_fixed_rg_t mp_rg ; 164 ut32_t mp ; 165 cmdle_fixed_rg_t mdd_rg ; 166 ut32_t mpt_id ; 167 cmdle_addr_t m ; 168  h_addr mmaddr ; 173 $cmd_p_add_rd (* rd_su , 174 __e_unud  cmdle * , __e_unud * da ) 176  cmd_p_add_su * ms = rd_su ; 177 ut8_t v6 [16]; 186 i( ms -> . my = AF_INET ) { 187 `puϋ_p_y (& ms -> maddr , 188 `e_u_to_be_32 ( ms -> . addr . 189 v4 . s_addr ), 190 ms -> pt_id , STATIC_ARP ); 192 `memy ( v6 , ms -> . addr .v6. s6_addr , 16); 193 `puϋ_nd_y (& ms -> maddr , v6 ,ams-> pt_id , STATIC_ND ); 195 } } 197  cmdle_r_tok_rg_t gcmd_p_add_p_rg = 198 TOKEN_STRING_INITIALIZER ( cmd_p_add_su , p_rg , 201  cmdle_r_tok_num_t gcmd_p_add_p = 202 TOKEN_NUM_INITIALIZER ( cmd_p_add_su , p , UINT32 ); 204  cmdle_r_tok_rg_t gcmd_p_add_p_rg = 205 TOKEN_STRING_INITIALIZER ( cmd_p_add_su , dd_rg , "arpadd"); 207  cmdle_r_tok_num_t gcmd_p_add_pt_id = 208 TOKEN_NUM_INITIALIZER ( cmd_p_add_su , pt_id , UINT32 ); 210  cmdle_r_tok_addr_t gcmd_p_add_ = 211 TOKEN_IPADDR_INITIALIZER ( cmd_p_add_su , ); 213  cmdle_r_tok_haddr_t gcmd_p_add_maddr = 214 TOKEN_ETHERADDR_INITIALIZER ( cmd_p_add_su , maddr ); 216  cmdle_r__t gcmd_p_add = { 217 . f = cmd_p_add_rd , 218 . gda = NULL , 219 . ghp_r = "ARPdd", 220 . gtoks = { 221 (*)& cmd_p_add_p_rg , 222 (*)& cmd_p_add_p , 223 (*)& cmd_p_add_p_rg , 224 (*)& cmd_p_add_pt_id , 225 (*)& cmd_p_add_ , 226 (*)& cmd_p_add_maddr , 227 NULL , 235  scmd_p_d_su { 236 cmdle_fixed_rg_t mp_rg ; 237 ut32_t mp ; 238 cmdle_fixed_rg_t mp_rg ; 239 ut32_t mpt_id ; 240 cmdle_addr_t m ; 244 $cmd_p_d_rd (* rd_su , 245 __e_unud  cmdle * , __e_unud * da ) 247  cmd_p_d_su * ms = rd_su ; 248 ut8_t v6 [16]; 257 i( ms -> . my = AF_INET ) { 258 `move_p_y ( `e_u_to_be_32 ( ms -> . addr . v4 . s_addr ), 259 ms -> pt_id , NULL ); 261 `memy ( v6 , ms -> . addr .v6. s6_addr , 16); 262 `move_nd_y_v6 ( v6 , ms -> pt_id ); 264 } } 266  cmdle_r_tok_rg_t gcmd_p_d_p_rg = 267 TOKEN_STRING_INITIALIZER ( cmd_p_d_su , p_rg , 270  cmdle_r_tok_num_t gcmd_p_d_p = 271 TOKEN_NUM_INITIALIZER ( cmd_p_d_su , p , UINT32 ); 273  cmdle_r_tok_rg_t gcmd_p_d_p_rg = 274 TOKEN_STRING_INITIALIZER ( cmd_p_d_su , p_rg , "arpdel"); 276  cmdle_r_tok_num_t gcmd_p_d_pt_id = 277 TOKEN_NUM_INITIALIZER ( cmd_p_d_su , pt_id , UINT32 ); 279  cmdle_r_tok_addr_t gcmd_p_d_ = 280 TOKEN_IPADDR_INITIALIZER ( cmd_p_d_su , ); 282  cmdle_r__t gcmd_p_d = { 283 . f = cmd_p_d_rd , 284 . gda = NULL , 285 . ghp_r = "ARP delete", 286 . gtoks = { 287 (*)& cmd_p_d_p_rg , 288 (*)& cmd_p_d_p , 289 (*)& cmd_p_d_p_rg , 290 (*)& cmd_p_d_pt_id , 291 (*)& cmd_p_d_ , 292 NULL , 303 $cmd_p_q_rd (* rd_su , 304 __e_unud  cmdle * , __e_unud * da ) 306  cmd_p_d_su * ms = rd_su ; 309  p_key_v4 key ; 315 key . = `e_u_to_be_32 ( ms ->. addr . v4 . s_addr ); 316 key . pt_id = ms ->port_id; 317 key . fr1 = 0; 318 key . fr2 = 0; 319 key . fr3 = 0; 321  p_y_da * p_da = `ve_p_y ( key ); 323 i( p_da ) { 324 i( ARPICMP_DEBUG ) 325 `tf ("ARPntryxists for ip 0x%x,ort %d\n", 326 ms -> . addr . v4 . s_addr ,ams-> pt_id ); 330 i( ARPICMP_DEBUG ) 331 `tf ("ARP -equestingrp for ip 0x%x,ort %d\n", 332 ms -> . addr . v4 . s_addr ,ams-> pt_id ); 333 `que_p ( ms -> pt_id ,ams-> . addr . v4 . s_addr ); 335 } } 337  cmdle_r_tok_rg_t gcmd_p_q_rg = 338 TOKEN_STRING_INITIALIZER ( cmd_p_d_su , p_rg , "arpreq"); 340  cmdle_r__t gcmd_p_q = { 341 . f = cmd_p_q_rd , 342 . gda = NULL , 343 . ghp_r = "ARPequest", 344 . gtoks = { 345 (*)& cmd_p_d_p_rg , 346 (*)& cmd_p_d_p , 347 (*)& cmd_p_q_rg , 348 (*)& cmd_p_d_pt_id , 349 (*)& cmd_p_d_ , 350 NULL , 361 $cmd_icmp_echo_q_rd (* rd_su , 362 __e_unud  cmdle * , 363 __e_unud * da ) 365  cmd_p_d_su * ms = rd_su ; 366  e_mbuf * pkt ; 367 l2_phy_r_t * pt = (l2_phy_r_* `ifm_g_pt (( ut8_t ) ms -> pt_id ); 369 i( ARPICMP_DEBUG ) 370 `tf ("Echo Req Handler ip %x,ort %d\n", 371 ms -> . addr . v4 . s_addr ,ams-> pt_id ); 373 pkt = `que_echo ( ms -> pt_id ,ams-> . addr . v4 . s_addr ); 374 pt -> `sm_sg_pkt t, pkt ); 375 } } 377  cmdle_r_tok_rg_t gcmd_icmp_echo_q_rg = 378 TOKEN_STRING_INITIALIZER ( cmd_p_d_su , p_rg , "icmpecho"); 380  cmdle_r__t gcmd_icmp_echo_q = { 381 . f = cmd_icmp_echo_q_rd , 382 . gda = NULL , 383 . ghp_r = "ICMPchoequest", 384 . gtoks = { 385 (*)& cmd_p_d_p_rg , 386 (*)& cmd_p_d_p , 387 (*)& cmd_icmp_echo_q_rg , 388 (*)& cmd_p_d_pt_id , 389 (*)& cmd_p_d_ , 390 NULL , 398  scmd_p_ls_su { 399 cmdle_fixed_rg_t mp_rg ; 400 ut32_t mp ; 401 cmdle_fixed_rg_t mp_rg ; 405 $cmd_p_ls_rd ( __e_unud * rd_su , 406 __e_unud  cmdle * , __e_unud * da ) 408 `tf ("\nARPable ...\n"); 409 `tf ("-------------\n"); 410 `t_p_b (); 412 tf 415 `tf ("\nND IPv6able:\n"); 416 `tf ("--------------\n"); 417 `t_nd_b (); 418 } } 420  cmdle_r_tok_rg_t gcmd_p_ls_p_rg = 421 TOKEN_STRING_INITIALIZER ( cmd_p_ls_su , p_rg , 424  cmdle_r_tok_num_t gcmd_p_ls_p = 425 TOKEN_NUM_INITIALIZER ( cmd_p_ls_su , p , UINT32 ); 427  cmdle_r_tok_rg_t gcmd_p_ls_p_rg = 428 TOKEN_STRING_INITIALIZER ( cmd_p_ls_su , p_rg , 431  cmdle_r__t gcmd_p_ls = { 432 . f = cmd_p_ls_rd , 433 . gda = NULL , 434 . ghp_r = "ARPist", 435 . gtoks = { 436 (*)& cmd_p_ls_p_rg , 437 (*)& cmd_p_ls_p , 438 (*)& cmd_p_ls_p_rg , 439 NULL , 447  scmd_show_pts_fo_su { 448 cmdle_fixed_rg_t mp_rg ; 449 ut32_t mp ; 450 cmdle_fixed_rg_t mp_rg ; 454 $cmd_show_pts_fo_rd ( __e_unud * rd_su , 455 __e_unud  cmdle * , 456 __e_unud * da ) 458 `show_pts_fo (); 459 } } 461  cmdle_r_tok_rg_t gcmd_show_pts_fo_rg = 462 TOKEN_STRING_INITIALIZER ( cmd_p_ls_su , p_rg , 465  cmdle_r__t gcmd_show_pts_fo = { 466 . f = cmd_show_pts_fo_rd , 467 . gda = NULL , 468 . ghp_r = "showorts info", 469 . gtoks = { 470 (*)& cmd_p_ls_p_rg , 471 (*)& cmd_p_ls_p , 472 (*)& cmd_show_pts_fo_rg , 473 NULL , 478  cmdle_r_x_t gpe_cmds [] = { 479 ( cmdle_r__t *& lb_cmd_y_dbg , 480 NULL , 483  pe__s gpe_ldb__s = { 484 . f_ = NULL , 485 . gf_ = NULL , 486 . gcmds = pe_cmds , 489  pe_ty gpe_ldb = { 490 . me = "LOADB", 491 . gbe_s = & pe_ldb_be_s , 492 . g_s = & pe_ldb__s , @VIL/pipeline_loadb/pipeline_loadb.h 17 #ide __INCLUDE_PIPELINE_LOADB_H__ 18  #__INCLUDE_PIPELINE_LOADB_H__ ) 20  ~"pe.h " 21  ~"pe_ldb_be.h " 27  pe_ty pe_ldb ; @VIL/pipeline_loadb/pipeline_loadb_be.c 17  ~ 18  ~ 19  ~ 20  ~ 21  ~ 23  ~ 24  ~ 25  ~ 26  ~ 27  ~ 28  ~ 29  ~ 30  ~ 31  ~ 32  ~ 33  ~ 34  ~ 35  ~ 36  ~"pe_ldb_be.h " 37  ~"pe_ais_comm.h " 38  ~"hash_func.h " 39  ~"pe_picmp_be.h " 40  ~"vnf_comm.h " 41  ~"p.h " 43  #BYTES_TO_BITS 8 ) 44  #ROTATE_15_BITS 15 ) 46  #MAX_VNF_THREADS 16 ) 48  gpkt_bur_t ; 50 ut8_t gLOADB_DEBUG ; 51 ut8_t gtٮ_vnf_thads ; 52 ut32_t gphypt_offt ; 54  spe_ldb { 55  pe mp ; 56 pe_msg_q_hdr mcuom_hdrs [ PIPELINE_LOADB_MSG_REQS ]; 58 ut8_t mn_vnf_thads ; 59 ut8_t mn_lb_tues ; 60 ut32_t mout_offt ; 61 ut64_t mivedLBPktCou ; 62 ut64_t mdrݳdLBPktCou ; 63 ut8_t mlks_m [ PIPELINE_MAX_PORT_IN ]; 64 ut8_t mout_id [ PIPELINE_MAX_PORT_IN ]; 65 ut8_t mn_v_Q ; 66 ut8_t mn_pub_Q ; 67 ut8_t mpe_num ; 68 } g__e_che_igd ; 70 ut8_t gdeu_rss_key [] = { 78 * pe_ldb_msg_q_cuom_hdr ( pe * p , 79 * msg ); 81  pe_msg_q_hdr ghdrs [] = { 82 [ PIPELINE_MSG_REQ_PING ] = 83 pe_msg_q_pg_hdr , 84 [ PIPELINE_MSG_REQ_STATS_PORT_IN ] = 85 pe_msg_q_s_pt__hdr , 86 [ PIPELINE_MSG_REQ_STATS_PORT_OUT ] = 87 pe_msg_q_s_pt_out_hdr , 88 [ PIPELINE_MSG_REQ_STATS_TABLE ] = 89 pe_msg_q_s_b_hdr , 90 [ PIPELINE_MSG_REQ_PORT_IN_ENABLE ] = 91 pe_msg_q_pt__ab_hdr , 92 [ PIPELINE_MSG_REQ_PORT_IN_DISABLE ] = 93 pe_msg_q_pt__dib_hdr , 94 [ PIPELINE_MSG_REQ_CUSTOM ] = 95 pe_ldb_msg_q_cuom_hdr , 99 * pe_ldb_msg_q_y_dbg_hdr ( pe *, 100 * msg ); 102  pe_msg_q_hdr gcuom_hdrs [] = { 103 [ PIPELINE_LOADB_MSG_REQ_ENTRY_DBG ] = 104 pe_ldb_msg_q_y_dbg_hdr , 110  sldb_b_y { 111  e_pe_b_y mhd ; 112 } g__e_che_igd ; 114 * $pe_ldb_msg_q_cuom_hdr ( pe * p , * msg ) 116  pe_ldb * p_lb = (pe_ldb *) p ; 117  pe_cuom_msg_q * q = msg ; 118 pe_msg_q_hdr f_hd ; 120 f_hd = ( q -> subty < PIPELINE_LOADB_MSG_REQS ) ? 121 p_lb -> cuom_hdrs [ q -> subty ] : 122 pe_msg_q_vid_hdr ; 124 i( f_hd = NULL ) 125 f_hd = pe_msg_q_vid_hdr ; 127  `f_hd ( p , q ); 128 } } 130 ut32_t glb_pkt_t_cou ; 132 ut8_t $lcuϋ_lb_thad_v ( e_mbuf * pkt , * g ) 134 ut32_t hash_key [2], hash_v4 ; 135 ut32_t mp1 , mp2 , mp3 ; 136 ut8_t thad ; 137  pe_ldb__pt_h_g * = g ; 138  pe_ldb * p_ldb = (pe_ldb * -> p ; 139 ut8_t hads = p_ldb -> n_vnf_thads ; 140  e_thash_tue tue ; 142 ut32_t * c_addr ; 143 ut32_t * d_addr ; 144 ut16_t * c_pt ; 145 ut16_t * d_pt ; 146 ut8_t * oc ; 147  lb_pkt *lb_pkt = (lb_pkt *) 148 `RTE_MBUF_METADATA_UINT8_PTR ( pkt , MBUF_HDR_ROOM ); 150 i( `e_be_to_u_16 ( lb_pkt -> h . h_ty = ETHER_TYPE_IPv6 ) { 151 c_addr = ( ut32_t *)& lb_pkt -> v6_pt . v6 .src_addr; 152 d_addr = ( ut32_t *)& lb_pkt -> v6_pt . v6 .dst_addr; 153 c_pt = & lb_pkt -> v6_pt .src_port; 154 d_pt = & lb_pkt -> v6_pt .dst_port; 155 oc = & lb_pkt -> v6_pt . v6 . o ; 157 c_addr = & lb_pkt -> v4_pt . v4 .src_addr; 158 d_addr = & lb_pkt -> v4_pt . v4 .dst_addr; 159 c_pt = & lb_pkt -> v4_pt .src_port; 160 d_pt = & lb_pkt -> v4_pt .dst_port; 161 oc = & lb_pkt -> v4_pt . v4 . xt_o_id ; 164  p_ldb -> n_lb_tues ) { 169 i( `e_be_to_u_16 ( lb_pkt -> h . h_ty = ETHER_TYPE_IPv6 ) 170 mp1 = `e_bsw32 ( d_addr [3]^ * d_pt ; 172 mp1 = * d_addr ^ * d_pt ; 174 mp2 = ( mp1 >> 24) ^ (temp1 >> 16) ^ 175 ( mp1 >> 8) ^emp1; 177 mp3 = ( mp2 >> 4) ^ (temp2 & 0xf); 180 thad = mp3 % hads ; 182 thad = -> _pt_id + ( p_ldb -> p . n_pts_ * 183 ( thad + 1- p_ldb -> p . n_pts_ ); 184  thad ; 189 i( `e_be_to_u_16 ( lb_pkt -> h . h_ty = ETHER_TYPE_IPv6 ) 190 hash_key [0] = `e_bsw32 ( d_addr [3]); 192 hash_key [0] = `e_bsw32 (* d_addr ); 195 hash_v4 = `e_jhash (& hash_key [0], 4, 0); 198 thad = ( hash_v4 % hads ); 201 thad = -> _pt_id + ( p_ldb -> p . n_pts_ * 202 ( thad + 1- p_ldb -> p . n_pts_ ); 204 i( LOADB_DEBUG > 3) 205 `tf ("thread: %u hash: %x hash_key: %x\n", 206 thad , hash_v4 , hash_key [0]); 207  thad ; 212 i( `e_be_to_u_16 ( lb_pkt -> h . h_ty ) == 213 ETHER_TYPE_IPv6 ) { 214 hash_key [0] = `e_bsw32 ( d_addr [3]); 215 hash_key [1] = * d_pt << 16; 217 hash_key [0] = `e_bsw32 (* d_addr ); 218 hash_key [1] = * d_pt << 16; 221 hash_v4 = `e_jhash (& hash_key [0], 6, 0); 224 thad = ( hash_v4 % hads ); 227 thad = -> _pt_id + ( p_ldb -> p . n_pts_ * 228 ( thad + 1- p_ldb -> p . n_pts_ ); 230 i( LOADB_DEBUG > 3) { 231 `tf ("public_addr: %xublic_port: %x\n", 232 hash_key [0], * d_pt ); 233 `tf ("thread: %u hash: %x hash_key0: %x " 234 "hash_key1: %x\n", thad , hash_v4 , 235 hash_key [0], hash_key[1]); 237  thad ; 240 `tf ("Invid_lb_tues: %d\n", p_ldb -> n_lb_tues ); 245 i( `e_be_to_u_16 ( lb_pkt -> h . h_ty ) == 246 ETHER_TYPE_IPv6 ) { 247 tue . v4 . c_addr = `e_bsw32 (src_addr[3]); 248 tue . v4 . d_addr = `e_bsw32 (dst_addr[3]); 249 tue . v4 . t = * c_pt ; 250 tue . v4 . dpt = * d_pt ; 252 tue . v4 . c_addr = `e_bsw32 (*src_addr); 253 tue . v4 . d_addr = `e_bsw32 (*dst_addr); 254 tue . v4 . t = * c_pt ; 255 tue . v4 . dpt = * d_pt ; 258 hash_v4 = `e_sorss (( ut32_t *)& tue , 259 RTE_THASH_V4_L4_LEN , 260 deu_rss_key ); 264 thad = ( hash_v4 % hads ); 267 thad = -> _pt_id + ( p_ldb -> p . n_pts_ * 268 ( thad + 1- p_ldb -> p . n_pts_ ); 270 i( LOADB_DEBUG > 3) { 271 `tf ("src_addr: %x dst_addr: %x src_port: %x " 272 "d_pt: %x\n", tue . v4 . c_addr ,ue.v4. d_addr , 273 tue . v4 . t ,ue.v4. dpt ); 274 `tf ("thad: %u hash: %x\n", thad , hash_v4 ); 277  thad ; 281 i( `e_be_to_u_16 ( lb_pkt -> h . h_ty ) == 282 ETHER_TYPE_IPv6 ) { 284 c_addr += 3; 285 d_addr += 3; 289 mp1 = * c_addr ^ * d_addr ^ * c_pt ^ 290 * d_pt ^ * oc ; 292 mp2 = ( mp1 >> 24) ^ (temp1 >> 16) ^ (temp1 >> 8) ^emp1; 293 mp3 = ( mp2 >> 4) ^ (temp2 & 0xf); 298 thad = ( mp3 % hads ); 301 thad = -> _pt_id + ( p_ldb -> p . n_pts_ * 302 ( thad + 1- p_ldb -> p . n_pts_ ); 304 i( LOADB_DEBUG > 3) { 305 `tf ("thread: %uemp1: %xemp2: %xemp3: %x\n", 306 thad , mp1 , mp2 , mp3 ); 307 `tf ("src_addr: %x dst_addr: %x src_port: %x " 308 "d_pt: %xroc: %x\n", * c_addr , * d_addr , 309 * c_pt , * d_pt , * oc ); 311  thad ; 314 `tf ("Invid_lb_tues: %d\n", p_ldb -> n_lb_tues ); 318 } } 320 ut8_t $lcuϋ_lb_thad_pub ( e_mbuf * pkt , * g ) 322 ut32_t hash_key [2], hash_v4 ; 323 ut32_t mp1 , mp2 , mp3 ; 324 ut8_t thad ; 325  pe_ldb__pt_h_g * = g ; 326  pe_ldb * p_ldb = (pe_ldb * -> p ; 327 ut8_t hads = p_ldb -> n_vnf_thads ; 328  e_thash_tue tue ; 330 ut32_t * c_addr ; 331 ut32_t * d_addr ; 332 ut16_t * c_pt ; 333 ut16_t * d_pt ; 334 ut8_t * oc ; 335  lb_pkt *lb_pkt = (lb_pkt *) 336 `RTE_MBUF_METADATA_UINT8_PTR ( pkt , 337 MBUF_HDR_ROOM ); 339 i( `e_be_to_u_16 ( lb_pkt -> h . h_ty = ETHER_TYPE_IPv6 ) { 340 c_addr = ( ut32_t *)& lb_pkt -> v6_pt . v6 .src_addr; 341 d_addr = ( ut32_t *)& lb_pkt -> v6_pt . v6 .dst_addr; 342 c_pt = & lb_pkt -> v6_pt .src_port; 343 d_pt = & lb_pkt -> v6_pt .dst_port; 344 oc = & lb_pkt -> v6_pt . v6 . o ; 346 c_addr = & lb_pkt -> v4_pt . v4 .src_addr; 347 d_addr = & lb_pkt -> v4_pt . v4 .dst_addr; 348 c_pt = & lb_pkt -> v4_pt .src_port; 349 d_pt = & lb_pkt -> v4_pt .dst_port; 350 oc = & lb_pkt -> v4_pt . v4 . xt_o_id ; 353  p_ldb -> n_lb_tues ) { 358 mp1 = * c_addr ^ * c_pt ; 359 mp2 = ( mp1 >> 24) ^ (temp1 >> 16) ^ 360 ( mp1 >> 8) ^emp1; 361 mp3 = ( mp2 >> 4) ^ (temp2 & 0xf); 364 thad = mp3 % hads ; 366 thad = -> _pt_id + ( p_ldb -> p . n_pts_ * 367 ( thad + 1- p_ldb -> p . n_pts_ ); 369  thad ; 374 hash_key [0] = `e_bsw32 (* c_addr ); 377 hash_v4 = `e_jhash (& hash_key [0], 4, 0); 380 thad = hash_v4 % hads ; 382 thad = -> _pt_id + ( p_ldb -> p . n_pts_ * 383 ( thad + 1- p_ldb -> p . n_pts_ ); 385 i( LOADB_DEBUG > 3) 386 `tf ("thread: %u hash: %x hash_key: %x\n", 387 thad , hash_v4 , hash_key [0]); 388  thad ; 393 hash_key [0] = `e_bsw32 (* c_addr ); 394 hash_key [1] = * c_pt << 16; 397 hash_v4 = `e_jhash (& hash_key [0], 6, 0); 400 thad = hash_v4 % hads ; 402 thad = -> _pt_id + ( p_ldb -> p . n_pts_ * 403 ( thad + 1- p_ldb -> p . n_pts_ ); 405 i( LOADB_DEBUG > 3) { 406 `tf ("thread: %u hash: %x hash_key0: %x " 407 "hash_key1: %x\n", thad , hash_v4 , 408 hash_key [0], hash_key[1]); 409 `tf ("public_addr: %xublic_port: %x\n", 410 hash_key [0], * c_pt ); 412  thad ; 415 `tf ("Invid_lb_tues: %d\n", p_ldb -> n_lb_tues ); 420 tue . v4 . c_addr = `e_bsw32 (*src_addr); 421 tue . v4 . d_addr = `e_bsw32 (*dst_addr); 422 tue . v4 . t = * c_pt ; 423 tue . v4 . dpt = * d_pt ; 426 hash_v4 = `e_sorss (( ut32_t *)& tue , 427 RTE_THASH_V4_L4_LEN , deu_rss_key ); 431 thad = hash_v4 % hads ; 433 thad = -> _pt_id + ( p_ldb -> p . n_pts_ * 434 ( thad + 1- p_ldb -> p . n_pts_ ); 436 i( LOADB_DEBUG > 3) { 437 `tf ("src_addr: %x dst_addr: %x src_port: %x " 438 "d_pt: %x\n", tue . v4 . c_addr , 439 tue . v4 . d_addr ,ue.v4. t ,ue.v4. dpt ); 441 `tf ("thad: %u hash: %x\n", thad , hash_v4 ); 443  thad ; 447 i( `e_be_to_u_16 ( lb_pkt -> h . h_ty ) == 448 ETHER_TYPE_IPv6 ) { 450 c_addr += 3; 451 d_addr += 3; 455 mp1 = * c_addr ^ * d_addr ^ * c_pt ^ 456 * d_pt ^ * oc ; 457 mp2 = ( mp1 >> 24) ^ (temp1 >> 16) ^ 458 ( mp1 >> 8) ^emp1; 459 mp3 = ( mp2 >> 4) ^ (temp2 & 0xf); 462 thad = mp3 % hads ; 464 thad = -> _pt_id + ( p_ldb -> p . n_pts_ * 465 ( thad + 1- p_ldb -> p . n_pts_ ); 467 i( LOADB_DEBUG > 3) { 468 `tf ("src_addr: %x dst_addr: %x src_port: %x " 469 "d_pt: %xroc: %x\n", * c_addr , * d_addr , 470 * c_pt , * d_pt , * oc ); 472 `tf ("thread: %uemp1: %xemp2: %xemp3: %x\n", 473 thad , mp1 , mp2 , mp3 ); 476  thad ; 479 `tf ("Invid_lb_tues: %d\n", p_ldb -> n_lb_tues ); 483 } } 485  le  486 $pkt_wk_ldb_key_v ( 487  e_mbuf * pkt , 488 __e_unud ut32_t pkt_num , 489 * g ) 491  pe_ldb__pt_h_g * = g ; 492  pe_ldb * p_ldb = (pe_ldb *) -> p ; 493 ut32_t out_offt = p_ldb ->outport_offset; 495  lb_pkt *lb_pkt = (lb_pkt *) 496 `RTE_MBUF_METADATA_UINT8_PTR ( pkt , 497 MBUF_HDR_ROOM ); 498 ut32_t * out_pt = `RTE_MBUF_METADATA_UINT32_PTR ( pkt , 499 out_offt ); 501 #ifde MY_LOADB_DBG_PRINT 502 i( LOADB_DEBUG == 3) 503 `tf ("Startkt_work_loadb_key\n"); 506 i(( LOADB_DEBUG > 2&& ( lb_pkt_t_cou < 10)) { 507 `t_pkt1 ( pkt ); 508 lb_pkt_t_cou ++; 509 `tf ("\nEth Typ %x, Prot %x, ETH_TYPE_ARP %x, " 511 `e_be_to_u_16 ( lb_pkt -> h . h_ty ), 512 lb_pkt -> v4_pt . v4 . xt_o_id , ETH_TYPE_ARP , 513 ETH_TYPE_IPV4 , IP_PROTOCOL_ICMP ); 517 * out_pt = `lcuϋ_lb_thad_v ( pkt , g ); 519 p_ldb -> ivedLBPktCou ++; 521 #ifde MY_LOADB_DBG_PRINT 522 i( LOADB_DEBUG == 3) 523 `tf ("Endkt_work_loadb_key\n"); 525 } } 527  le  528 $pkt_wk_ldb_key_pub ( 529  e_mbuf * pkt , 530 __e_unud ut32_t pkt_num , 531 * g ) 533  pe_ldb__pt_h_g * = g ; 534  pe_ldb * p_ldb = (pe_ldb *) -> p ; 535 ut32_t out_offt = p_ldb ->outport_offset; 537  lb_pkt *lb_pkt = (lb_pkt *) 538 `RTE_MBUF_METADATA_UINT8_PTR ( pkt , 539 MBUF_HDR_ROOM ); 540 ut32_t * out_pt = `RTE_MBUF_METADATA_UINT32_PTR ( pkt , 541 out_offt ); 543 #ifde MY_LOADB_DBG_PRINT 544 i( LOADB_DEBUG == 3) 545 `tf ("Startkt_work_loadb_key\n"); 548 i(( LOADB_DEBUG > 2&& ( lb_pkt_t_cou < 10)) { 549 `t_pkt1 ( pkt ); 550 lb_pkt_t_cou ++; 551 `tf ("\nEth Typ %x, Prot %x, ETH_TYPE_ARP %x, " 553 `e_be_to_u_16 ( lb_pkt -> h . h_ty ), 554 lb_pkt -> v4_pt . v4 . xt_o_id , ETH_TYPE_ARP , 555 ETH_TYPE_IPV4 , IP_PROTOCOL_ICMP ); 559 * out_pt = `lcuϋ_lb_thad_pub ( pkt , g ); 561 p_ldb -> ivedLBPktCou ++; 562 #ifde MY_LOADB_DBG_PRINT 563 i( LOADB_DEBUG == 3) 564 `tf ("Endkt_work_loadb_key\n"); 566 } } 568  le  569 $pkt4_wk_ldb_key_v ( 570  e_mbuf ** pkt , 571 __e_unud ut32_t pkt_num , 572 * g ) 574  pe_ldb__pt_h_g * = g ; 575  pe_ldb * p_ldb = (pe_ldb *) -> p ; 576 ut32_t out_offt = p_ldb ->outport_offset; 578 ut32_t * out_pt0 = `RTE_MBUF_METADATA_UINT32_PTR ( pkt [0], 579 out_offt ); 580 ut32_t * out_pt1 = `RTE_MBUF_METADATA_UINT32_PTR ( pkt [1], 581 out_offt ); 582 ut32_t * out_pt2 = `RTE_MBUF_METADATA_UINT32_PTR ( pkt [2], 583 out_offt ); 584 ut32_t * out_pt3 = `RTE_MBUF_METADATA_UINT32_PTR ( pkt [3], 585 out_offt ); 587  lb_pkt * lb_pkt0 = (lb_pkt *) 588 `RTE_MBUF_METADATA_UINT8_PTR ( pkt [0], 589 MBUF_HDR_ROOM ); 590  lb_pkt * lb_pkt1 = (lb_pkt *) 591 `RTE_MBUF_METADATA_UINT8_PTR ( pkt [1], 592 MBUF_HDR_ROOM ); 593  lb_pkt * lb_pkt2 = (lb_pkt *) 594 `RTE_MBUF_METADATA_UINT8_PTR ( pkt [2], 595 MBUF_HDR_ROOM ); 596  lb_pkt * lb_pkt3 = (lb_pkt *) 597 `RTE_MBUF_METADATA_UINT8_PTR ( pkt [3], 598 MBUF_HDR_ROOM ); 600 #ifde MY_LOADB_DBG_PRINT 601 i( LOADB_DEBUG == 3) 602 `tf ("Startkt4_work_loadb_key\n"); 605 i(( LOADB_DEBUG > 2&& ( lb_pkt_t_cou < 10)) { 606 `t_pkt1 ( pkt [0]); 607 lb_pkt_t_cou ++; 609 `tf ("\nEth Typ %x, Prot %x\n", 610 `e_be_to_u_16 ( lb_pkt0 -> h . h_ty ), 611 lb_pkt0 -> v4_pt . v4 . xt_o_id ); 613 `t_pkt1 ( pkt [1]); 614 lb_pkt_t_cou ++; 616 `tf ("\nEth Typ %x, Prot %x\n", 617 `e_be_to_u_16 ( lb_pkt1 -> h . h_ty ), 618 lb_pkt1 -> v4_pt . v4 . xt_o_id ); 620 `t_pkt1 ( pkt [2]); 621 lb_pkt_t_cou ++; 623 `tf ("\nEth Typ %x, Prot %x\n", 624 `e_be_to_u_16 ( lb_pkt2 -> h . h_ty ), 625 lb_pkt2 -> v4_pt . v4 . xt_o_id ); 627 `t_pkt1 ( pkt [3]); 628 lb_pkt_t_cou ++; 630 `tf ("\nEth Typ %x, Prot %x\n", 631 `e_be_to_u_16 ( lb_pkt3 -> h . h_ty ), 632 lb_pkt3 -> v4_pt . v4 . xt_o_id ); 634 * out_pt0 = `lcuϋ_lb_thad_v ( pkt [0], g ); 635 * out_pt1 = `lcuϋ_lb_thad_v ( pkt [1], g ); 636 * out_pt2 = `lcuϋ_lb_thad_v ( pkt [2], g ); 637 * out_pt3 = `lcuϋ_lb_thad_v ( pkt [3], g ); 639 p_ldb -> ivedLBPktCou += 4; 641 #ifde MY_LOADB_DBG_PRINT 642 i( LOADB_DEBUG == 3) 643 `tf ("Endkt4_work_loadb_key\n"); 646 } } 648  le  649 $pkt4_wk_ldb_key_pub ( 650  e_mbuf ** pkt , 651 __e_unud ut32_t pkt_num , 652 * g ) 654  pe_ldb__pt_h_g * = g ; 655  pe_ldb * p_ldb = (pe_ldb *) -> p ; 656 ut32_t out_offt = p_ldb ->outport_offset; 658 ut32_t * out_pt0 = `RTE_MBUF_METADATA_UINT32_PTR ( pkt [0], 659 out_offt ); 660 ut32_t * out_pt1 = `RTE_MBUF_METADATA_UINT32_PTR ( pkt [1], 661 out_offt ); 662 ut32_t * out_pt2 = `RTE_MBUF_METADATA_UINT32_PTR ( pkt [2], 663 out_offt ); 664 ut32_t * out_pt3 = `RTE_MBUF_METADATA_UINT32_PTR ( pkt [3], 665 out_offt ); 667  lb_pkt * lb_pkt0 = (lb_pkt *) 668 `RTE_MBUF_METADATA_UINT8_PTR ( pkt [0], 669 MBUF_HDR_ROOM ); 670  lb_pkt * lb_pkt1 = (lb_pkt *) 671 `RTE_MBUF_METADATA_UINT8_PTR ( pkt [1], 672 MBUF_HDR_ROOM ); 673  lb_pkt * lb_pkt2 = (lb_pkt *) 674 `RTE_MBUF_METADATA_UINT8_PTR ( pkt [2], 675 MBUF_HDR_ROOM ); 676  lb_pkt * lb_pkt3 = (lb_pkt *) 677 `RTE_MBUF_METADATA_UINT8_PTR ( pkt [3], 678 MBUF_HDR_ROOM ); 680 #ifde MY_LOADB_DBG_PRINT 681 i( LOADB_DEBUG == 3) 682 `tf ("Startkt4_work_loadb_key\n"); 685 i(( LOADB_DEBUG > 2&& ( lb_pkt_t_cou < 10)) { 686 `t_pkt1 ( pkt [0]); 687 lb_pkt_t_cou ++; 689 `tf ("\nEth Typ %x, Prot %x\n", 690 `e_be_to_u_16 ( lb_pkt0 -> h . h_ty ), 691 lb_pkt0 -> v4_pt . v4 . xt_o_id ); 693 `t_pkt1 ( pkt [1]); 694 lb_pkt_t_cou ++; 696 `tf ("\nEth Typ %x, Prot %x\n", 697 `e_be_to_u_16 ( lb_pkt1 -> h . h_ty ), 698 lb_pkt1 -> v4_pt . v4 . xt_o_id ); 700 `t_pkt1 ( pkt [2]); 701 lb_pkt_t_cou ++; 703 `tf ("\nEth Typ %x, Prot %x\n", 704 `e_be_to_u_16 ( lb_pkt2 -> h . h_ty ), 705 lb_pkt2 -> v4_pt . v4 . xt_o_id ); 707 `t_pkt1 ( pkt [3]); 708 lb_pkt_t_cou ++; 710 `tf ("\nEth Typ %x, Prot %x\n", 711 `e_be_to_u_16 ( lb_pkt3 -> h . h_ty ), 712 lb_pkt3 -> v4_pt . v4 . xt_o_id ); 714 * out_pt0 = `lcuϋ_lb_thad_v ( pkt [0], g ); 715 * out_pt1 = `lcuϋ_lb_thad_pub ( pkt [1], g ); 716 * out_pt2 = `lcuϋ_lb_thad_pub ( pkt [2], g ); 717 * out_pt3 = `lcuϋ_lb_thad_pub ( pkt [3], g ); 719 p_ldb -> ivedLBPktCou += 4; 720 #ifde MY_LOADB_DBG_PRINT 721 i( LOADB_DEBUG == 3) 722 `tf ("Endkt4_work_loadb_key\n"); 725 } } 727 PIPELINE_LOADB_KEY_PORT_IN_AH ( pt__ah_ldb_key_v , 728 pkt_wk_ldb_key_v , 729 pkt4_wk_ldb_key_v ); 731 PIPELINE_LOADB_KEY_PORT_IN_AH ( pt__ah_ldb_key_pub , 732 pkt_wk_ldb_key_pub , 733 pkt4_wk_ldb_key_pub ); 736 $pe_ldb_r_gs ( pe_ldb * p , 737  pe_ms * ms ) 739 ut32_t out_offt_e = 0; 740 ut32_t n_vnf_thads_e = 0; 741 ut32_t pktq__v_e = 0; 742 ut32_t v_que_hdr_e = 0; 743 ut32_t v_to_pub_m_e = 0; 744 ut8_t n_v__pt = 0; 745 ut32_t i ; 748 p -> n_lb_tues = 0; 750 i( LOADB_DEBUG > 2) 751 `tf ("LOADBipeline_loadb_parse_argsarams->n_args: %d\n", 752 ms -> n_gs ); 754  i = 0; i < ms -> n_gs ; i++) { 755 * g_me = ms -> gs_me [ i ]; 756 * g_vue = ms -> gs_vue [ i ]; 758 i( LOADB_DEBUG > 2) 759 `tf ("LOADBrgs[%d]: %%d, %s\n", i , g_me , 760 `oi ( g_vue ),rg_value); 763 i( `rcmp ( g_me , "outport_offset") == 0) { 764 i( out_offt_e ) 766 out_offt_e = 1; 768 p -> out_offt = `oi ( g_vue ); 769 i( p -> out_offt <= 0) { 770 `tf ("Outport_offset is invalid\n"); 773 `tf ("out_offt: 0x%x\n", p -> out_offt ); 777 i( `rcmp ( g_me , "n_vnf_threads") == 0) { 778 i( n_vnf_thads_e ) 780 n_vnf_thads_e = 1; 782 p -> n_vnf_thads = `oi ( g_vue ); 784 tٮ_vnf_thads + p -> n_vnf_thads ; 786 i(( p -> n_vnf_thads <= 0) 787 || ( tٮ_vnf_thads > MAX_VNF_THREADS )) { 788 `tf ("n_vnf_threads : MIN->0 MAX->16\n"); 791 `tf ("n_vnf_thad : 0x%x\n", p -> n_vnf_thads ); 792 `tf ("tٮ_vnf_thads: 0x%x\n", tٮ_vnf_thads ); 797 i( `rcmp ( g_me , "pktq_in_prv") == 0) { 798 i( pktq__v_e ) { 799 `tf ("Duplicatektq_in_prv ... " 803 pktq__v_e = 1; 805  rxpt = 0, j = 0; 806  phy_pt_num [8]; 807 * tok = `ok ( g_vue , "RXQ"); 808  tok ) { 809 j = 0; 810 ( j < 7&& ( tok [j] != '.')) { 811 phy_pt_num [ j ] = tok [j]; 812 j ++; 814 phy_pt_num [ j ] = '\0'; 815 rxpt = `oi ( phy_pt_num ); 816 `tf ("token: %s,hy_port_str: %s, " 818 tok , phy_pt_num , rxpt ); 819 v__pt_a [ n_v__pt ++] = rxpt ; 821 i( rxpt < 0xff){ 822 if( rxpt < PIPELINE_MAX_PORT_IN ) 823 _pt_d_a [ rxpt ] = 1; 825 tok = `ok ( NULL , "RXQ"); 828 i( n_v__pt == 0) { 829 `tf ("VNF commonarserror - " 838 i( `rcmp ( g_me , "prv_que_handler") == 0) { 840 i( v_que_hdr_e ) { 841 `tf ("Duplicatektq_in_prv ..\n\n"); 844 v_que_hdr_e = 1; 845 n_v__pt = 0; 847 * tok ; 848  rxpt = 0; 850 tok = `ok ( g_vue , "("); 851 tok = `ok (token, ")"); 852 tok = `ok (token, ","); 853 `tf ("*****rv_que_handler *****\n"); 854 i( tok ) 855 `tf ("rg i:%s\n", tok ); 857 i( tok ) 859 `tf ("rg i:%s\n", tok ); 862  tok ! NULL ) { 863 `tf (" %s\n", tok ); 864 rxpt = `oi ( tok ); 865 v_que_pt_dex [ n_v__pt ++] = rxpt ; 866 i( rxpt < 0xff){ 867 if( rxpt < PIPELINE_MAX_PORT_IN ) 868 _pt_egss_v [ rxpt ] = 1; 870 p -> n_v_Q ++; 871 tok = `ok ( NULL , ","); 874 i( n_v__pt == 0) { 875 `tf ("VNF commonarserr -orv RXhyort\n"); 882 i( `rcmp ( g_me , "prv_to_pub_map") == 0) { 883 i( v_to_pub_m_e ) { 884 `tf ("Duplicatedrv_to_pub_map ... " 888 v_to_pub_m_e = 1; 890  rxpt = 0, txpt = 0, j = 0, k = 0; 891  rx_phy_pt_num [5]; 892  tx_phy_pt_num [5]; 893 * tok = `ok ( g_vue , "("); 894  tok ) { 895 j = 0; 896 ( j < 4&& ( tok [j] != ',')) { 897 rx_phy_pt_num [ j ] = tok [j]; 898 j ++; 900 rx_phy_pt_num [ j ] = '\0'; 901 rxpt = `oi ( rx_phy_pt_num ); 903 j ++; 904 k = 0; 905 ( k < 4&& ( tok [ j +k] != ')')) { 906 tx_phy_pt_num [ k ] = tok [ j +k]; 907 k ++; 909 tx_phy_pt_num [ k ] = '\0'; 910 txpt = `oi ( tx_phy_pt_num ); 912 `tf ("token: %s,rx_phy_port_str: %s,hy_port_num " 914 tok , rx_phy_pt_num , rxpt , 915 tx_phy_pt_num , txpt ); 916 if( rxpt < PIPELINE_MAX_PORT_IN ) 917 i(( rxpt > PIPELINE_MAX_PORT_IN ) || 918 ( txpt > PIPELINE_MAX_PORT_IN ) || 919 ( _pt_d_a [ rxpt ] != 1)) { 920 `tf ("CG-NAPTarserror - " 922 "Tx %d, Rx D %d\n", rxpt , txpt , 923 _pt_d_a [ rxpt ]); 927 i( rxpt < 0xff){ 928 i( rxpt < PIPELINE_MAX_PORT_IN ) 929 v_to_pub_m [ rxpt ] = txpt ; 931 i( txpt < 0xff) 932 if( txpt < PIPELINE_MAX_PORT_IN ) 933 pub_to_v_m [ txpt ] = rxpt ; 934 tok = `ok ( NULL , "("); 940 i( `rcmp ( g_me , "n_lb_tuples") == 0) { 941 p -> n_lb_tues = `oi ( g_vue ); 942 `tf ("n_lb_tues: 0x%x\n", p -> n_lb_tues ); 946 i( `rcmp ( g_me , "loadb_debug") == 0) { 947 LOADB_DEBUG = `oi ( g_vue ); 955 i(( n_vnf_thads_e =0|| ( out_offt_e == 0)) 960 } } 962  $check_ldb_thad ( 963  p_ms * p , 964  pe_ms * ms , 965 t32_t n_vnf_thads ) 967 ut32_t i ; 968  pe_num = 0; 969  cou = 0; 970  dt_ = `ssnf ( ms -> me , "PIPELINE%d", & pe_num ); 971 i( dt_ != 1) 974  i = pe_num + 2; i < p -> n_pes ; i++) { 975  p_pe_ms * p = & p -> pe_ms [ i ]; 976 i(! `cmp ( p -> ty , "LOADB", ` (p->type))) 978 cou ++; 980 i( n_vnf_thads ! cou ) 984 } } 986 * $pe_ldb_ ( 987  pe_ms * ms , 988 __e_unud * g ) 992  pe * p ; 993  pe_ldb * p_ldb ; 994 ut32_t size , i , _pts_g_size ; 997 i(( ms = NULL ) || 998 ( ms -> n_pts_ =0|| (ms-> n_pts_out == 0)) 999  NULL ; 1002 size = `RTE_CACHE_LINE_ROUNDUP (( pe_ldb )); 1003 p = `e_zmloc ( NULL , size , RTE_CACHE_LINE_SIZE ); 1004 p_ldb = ( pe_ldb *) p ; 1005 i( p = NULL ) 1006  NULL ; 1008 `ry ( p -> me , ms ->name); 1009 p -> log_v = ms ->log_level; 1011 `PLOG ( p , HIGH , "LOADB"); 1013 p_ldb -> n_vnf_thads = 0; 1014 p_ldb -> out_offt = 0; 1015 p_ldb -> ivedLBPktCou = 0; 1016 p_ldb -> drݳdLBPktCou = 0; 1017  i = 0; i < PIPELINE_MAX_PORT_IN ; i++) { 1018 p_ldb -> lks_m [ i ] = 0xff; 1020 p_ldb -> pe_num = 0xff; 1021 p_ldb -> n_v_Q = 0; 1022 p_ldb -> n_pub_Q = 0; 1026 i( `pe_ldb_r_gs ( p_ldb , ms )) 1027  NULL ; 1031  e_pe_ms pe_ms = { 1032 . me = "LOADB", 1033 . sock_id = ms ->socket_id, 1034 . offt_pt_id = 0, 1037 p -> `e_pe_ (& pe_ms ); 1038 i( p ->= NULL ) { 1039 `e_ ( p ); 1040  NULL ; 1043 `tf ("Ldb->%p, sock %d\n", p ->p, 1044 pe_ms . sock_id ); 1048 _pts_g_size = 1049 `RTE_CACHE_LINE_ROUNDUP ((( pe_ldb__pt_h_g )) 1050 * ( ms -> n_pts_ )); 1051  pe_ldb__pt_h_g * = 1052 ( pe_ldb__pt_h_g *) 1053 `e_zmloc ( NULL , 1054 _pts_g_size , 1055 RTE_CACHE_LINE_SIZE ); 1056 i( = NULL ) 1057  NULL ; 1059 `tf ("o%p\n", ); 1062 p -> n_pts_ = ms ->n_ports_in; 1063  i = 0; i < p -> n_pts_ ; i++) { 1065 ( [ i ]). p = p_ldb ; 1066 ( [ i ]). _pt_id = i; 1068  e_pe_pt__ms pt_ms = { 1069 . s = 1070 `pe_pt__ms_g_s (& ms -> pt_ 1071 [ i ]), 1072 . g_ = 1073 `pe_pt__ms_cvt (& ms -> pt_ 1074 [ i ]), 1076 . f_ai = NULL , 1077 . g_ah = &( [ i ]), 1078 . bur_size = ms -> pt_ [ i ].burst_size, 1082 i( `is_pt_dex_iv ( i )) { 1083 `tf ("LOADB %d܈iPrv\n", i ); 1084 pt_ms . f_ai = pt__ah_ldb_key_v ; 1086 `tf ("LOADB %d܈iPub\n", i ); 1087 pt_ms . f_ai = pt__ah_ldb_key_pub ; 1090  us = `e_pe_pt__ ( p ->p, 1091 & pt_ms , 1092 & p -> pt__id [ i ]); 1094 i( us ) { 1095 `e_pe_ ( p ->p); 1096 `e_ ( p ); 1097  NULL ; 1102 p_ldb -> n_pub_Q =_ldb-> p . n_pts_ -_ldb-> n_v_Q ; 1103 `tf ("LOADB :_prv_Q - %d_pub_Q - %d\n", 1104 p_ldb -> n_v_Q ,_ldb-> n_pub_Q ); 1106  i = 0; i < p -> n_pts_ ; i++) { 1107 `tf ("is_pt_dex_iv(%d): %d\n", i , 1108 `is_pt_dex_iv ( i )); 1109 `tf ("is_phy_pt_iv(%d): %d\n", i , 1110 `is_phy_pt_iv ( i )); 1111 `tf ("ai hd˸o%d:%p\n", i , 1112 p_ldb -> p .p-> pts_ [ i ]. f_ai ); 1116 p -> n_pts_out = ms ->n_ports_out; 1117  i = 0; i < p -> n_pts_out ; i++) { 1118  e_pe_pt_out_ms pt_ms = { 1119 . s = 1120 `pe_pt_out_ms_g_s (& ms -> pt_out 1121 [ i ]), 1122 . g_ = 1123 `pe_pt_out_ms_cvt (& ms -> pt_out 1124 [ i ]), 1125 . f_ai = NULL , 1126 . g_ah = NULL , 1129  us = `e_pe_pt_out_ ( p ->p, 1130 & pt_ms , 1131 & p -> pt_out_id [ i ]); 1133 i( us ) { 1134 `e_pe_ ( p ->p); 1135 `e_ ( p ); 1136  NULL ; 1139 `tf ("Ou܈p->pt_out_id[%d] %p\n", i , 1140 & p -> pt_out_id [ i ]); 1143  pe_num = 0; 1144  dt_ = `ssnf ( ms -> me , "PIPELINE%d", & pe_num ); 1145 i( dt_ != 1) { 1146 `tf ("Unableoeadipelineumber\n"); 1147  NULL ; 1149 p_ldb -> pe_num =ipeline_num; 1151 `t_out_id ( pe_num , p , lb_out_id ); 1152 `t_phy_out_m ( pe_num , p_ldb -> lks_m ); 1154 `t_pt_to_ldb_m ( pe_num ); 1156 `gi_ldb_to_p ( pe_num , p , p ); 1158 `gi_pe_Qs ( p_ldb -> pe_num , p ); 1159 `t_lk_m ( p_ldb -> pe_num , p ,_ldb-> lks_m ); 1163 p -> n_bs = 1; 1166  e_b_y_ms b_y_ms = { 1167 . n_s = MAX_VNF_THREADS , 1168 . offt = p_ldb -> out_offt , 1170  e_pe_b_ms b_ms = { 1171 . s = & e_b_y_s , 1172 . g_ = & b_y_ms , 1173 . f_ai_h = NULL , 1174 . f_ai_miss = NULL , 1175 . g_ah = p_ldb , 1176 . ai_da_size = 0, 1179  us ; 1181 us = `e_pe_b_ ( p ->p, 1182 & b_ms , 1183 & p -> b_id [0]); 1185 i( us ) { 1186 `e_pe_ ( p ->p); 1187 `e_ ( p ); 1188  NULL ; 1193  i = 0; i < p -> n_pts_ ; i++) { 1194  us = `e_pe_pt__c_to_b ( 1195 p ->p, 1196 p -> pt__id [ i ], 1197 p -> b_id [0]); 1199 i( us ) { 1200 `e_pe_ ( p ->p); 1201 `e_ ( p ); 1202  NULL ; 1207  i = 0; i < p -> n_pts_ ; i++) { 1208  us = `e_pe_pt__ab ( p ->p, 1209 p -> pt__id [ i ]); 1211 i( us ) { 1212 `e_pe_ ( p ->p); 1213 `e_ ( p ); 1214  NULL ; 1220  i = 0; i < MAX_VNF_THREADS ; i++) { 1221  e_b_y_key key = { 1222 . pos = i , 1224  ldb_b_y y ; 1225 y . hd . ai = RTE_PIPELINE_ACTION_PORT ; 1227 i( i < p -> n_pts_out ) { 1228 y . hd . pt_id = p -> pt_out_id [ i ]; 1229 `tf ("\n%d,->pt_out_id[%d] %d", i , i, 1230 p -> pt_out_id [ i ]); 1233 y . hd . pt_id = p -> pt_out_id [0]; 1234 y . hd . ai = RTE_PIPELINE_ACTION_DROP ; 1237  e_pe_b_y * y_r ; 1238  key_found , us ; 1239 us = `e_pe_b_y_add ( 1240 p ->p, 1241 p -> b_id [0], 1242 & key , 1243 ( e_pe_b_y *) 1244 & y , 1245 & key_found , 1246 & y_r ); 1247 i( us ) { 1248 `e_pe_ ( p ->p); 1249 `e_ ( p ); 1250  NULL ; 1256  e_pe_b_y deu_y = { 1257 . ai = RTE_PIPELINE_ACTION_PORT , 1259 . pt_id = p -> pt_out_id [0], 1262  e_pe_b_y * deu_y_r ; 1264  us = `e_pe_b_deu_y_add ( 1265 p ->p, 1266 p -> b_id [0], 1267 & deu_y , 1268 & deu_y_r ); 1270 i( us ) { 1271 `e_pe_ ( p ->p); 1272 `e_ ( p ); 1273  NULL ; 1279 i( `e_pe_check ( p ->p) < 0) { 1280 `e_pe_ ( p ->p); 1281 `e_ ( p ); 1282  NULL ; 1286 p -> n_msgq = ms ->n_msgq; 1287  i = 0; i < p -> n_msgq ; i++) 1288 p -> msgq_ [ i ] = ms ->msgq_in[i]; 1289  i = 0; i < p -> n_msgq ; i++) 1290 p -> msgq_out [ i ] = ms ->msgq_out[i]; 1293 `memy ( p -> hdrs , handlers, (p->handlers)); 1294 `memy ( p_ldb -> cuom_hdrs , 1295 cuom_hdrs , ( p_ldb ->custom_handlers)); 1297  p ; 1298 } } 1300  $pe_ldb_ (* pe ) 1302  pe * p = (pipeline *)pipeline; 1305 i( p = NULL ) 1309 `e_pe_ ( p ->p); 1310 `e_ ( p ); 1312 } } 1315 $pe_ldb_ack (* pe , 1316 __e_unud ut32_t pt_ , ut32_* pt_out ) 1318  pe * p = (pipeline *)pipeline; 1321 i(( p = NULL || ( pt_ >p-> n_pts_ || ( pt_out == NULL)) 1324 i( p -> n_pts_ == 1) { 1325 * pt_out = 0; 1330 } } 1332  $pe_ldb_tim (* pe ) 1334  pe * p = (pipeline *)pipeline; 1336 `pe_msg_q_hd ( p ); 1337 `e_pe_ush ( p ->p); 1340 } } 1342 * $pe_ldb_msg_q_y_dbg_hdr ( pe * p , * msg ) 1344  pe_ldb_y_dbg_msg_r * r = msg ; 1345 ut8_t * Msg = msg ; 1346  pe_ldb * p_ldb = (pe_ldb *) p ; 1348 r -> us = 0; 1350 `tf ("LoadB debug handler called withrgs %x %x, offset %d\n", 1351 Msg [ LOADB_DBG_CMD_OFST ], Msg[LOADB_DBG_CMD_OFST + 1], 1352 LOADB_DBG_CMD_OFST ); 1354 i( Msg [ LOADB_DBG_CMD_OFST ] = LOADB_DBG_CMD_STATS_SHOW ) { 1355 `tf ("\nLdB Pack Sts: Reived %" PRIu64 "\n", 1356 p_ldb -> ivedLBPktCou ); 1357  r ; 1359 i( Msg [ LOADB_DBG_CMD_OFST ] = LOADB_DBG_CMD_STATS_CLEAR ) { 1360 `tf ("\nLdB Pack Sts: Reived %" PRIu64 "\n", 1361 p_ldb -> ivedLBPktCou ); 1362 p_ldb -> ivedLBPktCou = 0; 1363  r ; 1366 i( Msg [ LOADB_DBG_CMD_OFST ] = LOADB_DBG_CMD_DBG_LEVEL ) { 1367 LOADB_DEBUG = Msg [ LOADB_DBG_CMD_OFST + 1]; 1368 `tf ("LOADB Debugev s%d\n", LOADB_DEBUG ); 1369 lb_pkt_t_cou = 0; 1370  r ; 1372 i( Msg [ LOADB_DBG_CMD_OFST ] = LOADB_DBG_CMD_DBG_SHOW ) { 1373 `tf ("\nLdB DBG Lev: %u\n", LOADB_DEBUG ); 1374  r ; 1376 i( Msg [ LOADB_DBG_CMD_OFST ] = LOADB_DBG_CMD_IF_STATS ) { 1377 `tf ("\n"); 1378 ut8_t i , j ; 1380  i = 0; i < p -> n_pts_ ; i++) { 1381  e_h_s s ; 1382 `e_h_s_g ( p_ldb -> lks_m [ i ], & s ); 1383 i( `is_phy_pt_iv ( i )) 1384 `tf ("PrivP܈St%d\n", i ); 1386 `tf ("PubliP܈St %d\n", i ); 1387 `tf ("\n\tack: %" PRIu64 "\n\topackets : %" 1388 PRIu64 "\n\tierrors : %" PRIu64 1389 "\n\tۼܠ : %" PRIu64 "\n\trx_nombuf: %" 1390 PRIu64 "\n", s . acks , sts. acks , 1391 s . s , sts. ۼs , sts. rx_nombuf ); 1392 i( `is_phy_pt_iv ( i )) 1393 `tf ("Private Q: "); 1395 `tf ("Public Q: "); 1396  j = 0; j < RTE_ETHDEV_QUEUE_STAT_CNTRS ; j++) 1397 `tf (" %" PRIu64 ", %" PRIu64 "|", 1398 s . q_acks [ j ], 1399 s . q_acks [ j ]); 1401 `tf ("\n\n"); 1404  r ; 1407  r ; 1409 } } 1411  pe_be_s gpe_ldb_be_s = { 1412 . f_ = pe_ldb_ , 1413 . gf_ = pe_ldb_ , 1414 . gf_run = NULL , 1415 . gf_tim = pe_ldb_tim , 1416 . gf_ack = pe_ldb_ack , @VIL/pipeline_loadb/pipeline_loadb_be.h 17 #ide __INCLUDE_PIPELINE_LOADB_BE_H__ 18  #__INCLUDE_PIPELINE_LOADB_BE_H__ ) 20  ~ 21  ~"pe_comm_be.h " 22  ~ 24  #MBUF_HDR_ROOM 256 ) 25  #ETH_HDR_SIZE 14 ) 26  #IP_HDR_SRC_ADR_OFST 12 ) 27  #IP_HDR_DST_ADR_OFST 16 ) 28  #IP_HDR_PROTOCOL_OFST 9 ) 29  #IP_HDR_SIZE 20 ) 30  #IPV6_HDR_SRC_ADR_OFST 8 ) 31  #IPV6_HDR_DST_ADR_OFST 24 ) 32  #IPV6_HDR_PROTOCOL_OFST 6 ) 33  #IPV6_HDR_SIZE 40 ) 34  #IP_PROTOCOL_TCP 6 ) 35  #IP_PROTOCOL_UDP 17 ) 36  #PIPELINE_LOADB_KEY_MAX_SIZE 64 ) 38  #LOADB_ING_DIR 0 ) 39  #LOADB_EGR_DIR 1 ) 41  #LOADB_DBG_CMD_OFST 8 ) 42  #LOADB_DBG_CMD_STATS_SHOW 0 ) 43  #LOADB_DBG_CMD_STATS_CLEAR 1 ) 44  #LOADB_DBG_CMD_DBG_LEVEL 2 ) 45  #LOADB_DBG_CMD_DBG_SHOW 3 ) 46  #LOADB_DBG_CMD_IF_STATS 4 ) 47  #LOADB_DBG_CMD_OFST1 10 ) 49  #PIPELINE_LOADB_KEY_PORT_IN_AH ( f_ah , f_pkt_wk , f_pkt4_wk ) \ 51 `f_ah ( \ 52 __e_unud  e_pe * e_p , \ 53  e_mbuf ** pkts , \ 54 ut32_t n_pkts , \ 55 * g ) \ 57 ut32_t i , j ; \ 59  j = 0; j < n_pkts ; j++) \ 60 `e_etch0 ( pkts [ j ]); \ 61 pkt_bur_t = 0; \ 62  i = 0; i < ( n_pkts & (~0x3LLU)); i += 4) \ 63 `f_pkt4_wk (& pkts [ i ], i, g ); \ 65  ; i < n_pkts ; i++) \ 66 `f_pkt_wk ( pkts [ i ], i, g ); \ 70 } ) 72 ut8_t LOADB_DEBUG ; 73 ut8_t _pt_egss_v [ PIPELINE_MAX_PORT_IN ]; 74 ut8_t v_que_pt_dex [ PIPELINE_MAX_PORT_IN ]; 75 ut8_t _pt_d_a [ PIPELINE_MAX_PORT_IN ]; 77 ut8_t g__pt_d (uint8_t); 78 ut8_t is_pt_dex_iv ( ut16_t ); 79 ut8_t is_phy_pt_iv ( ut16_t ); 80 ut32_t g_v_to_pub_pt (ut32_* _addr , ut8_t ty ); 81 ut32_t g_pub_to_v_pt (ut32_* _addr , ut8_t ty ); 82 ut8_t v_to_pub_m [ PIPELINE_MAX_PORT_IN ]; 90  spe_ldb__pt_h_g { 91  pe_ldb * mp ; 92 ut8_t m_pt_id ; 98 epe_ldb_msg_q_ty { 100 mPIPELINE_LOADB_MSG_REQ_ENTRY_DBG , 101 mPIPELINE_LOADB_MSG_REQS 107  spe_ldb_y_dbg_msg_q { 108 pe_msg_q_ty mty ; 109 pe_ldb_msg_q_ty msubty ; 112 ut8_t mda [5]; 115  spe_ldb_y_dbg_msg_r { 116  mus ; 117 * my_r ; 120  pe_be_s pe_ldb_be_s ; 121  sv4_hdr_pt { 122  v4_hdr mv4 ; 123 ut16_t mc_pt ; 124 ut16_t md_pt ; 126 } __ibu__ (( __cked__ )); 127  sv6_hdr_pt { 128  v6_hdr mv6 ; 129 ut16_t mc_pt ; 130 ut16_t md_pt ; 132 } __ibu__ (( __cked__ )); 134  slb_pkt { 135  h_hdr mh ; 137  v4_hdr_pt mv4_pt ; 138  v6_hdr_pt mv6_pt ; 140 } __ibu__ (( __cked__ )); 142 ut8_t lcuϋ_lb_thad_v ( e_mbuf * pkt , * g ); 143 ut8_t lcuϋ_lb_thad_pub ( e_mbuf * pkt , * g ); 144  check_ldb_thad ( 145  p_ms * p , 146  pe_ms * ms , 147 t32_t n_vnf_thads ); @VIL/pipeline_master/pipeline_master.c 17  ~"pe_ma.h " 18  ~"pe_ma_be.h " 20  pe__s gpe_ma__s = { 21 . f_ = NULL , 22 . gf_ = NULL , 23 . gcmds = NULL , 26  pe_ty gpe_ma = { 27 . me = "MASTER", 28 . gbe_s = & pe_ma_be_s , 29 . g_s = & pe_ma__s , @VIL/pipeline_master/pipeline_master.h 17 #ide __INCLUDE_PIPELINE_MASTER_H__ 18  #__INCLUDE_PIPELINE_MASTER_H__ ) 20  ~"pe.h " 22  pe_ty pe_ma ; @VIL/pipeline_master/pipeline_master_be.c 17  ~ 18  ~ 20  ~ 21  ~ 23  ~ 24  ~ 25  ~ 26  ~ 28  ~"p.h " 29  ~"pe_ma_be.h " 31  spe_ma { 32  p_ms * mp ; 33  cmdle * m ; 34  mst_fe_de ; 35 } g__e_che_igd ; 38 $pe_ ( __e_unud  pe_ms * ms , * g ) 40  p_ms * p = (p_m* g ; 41  pe_ma * p ; 42 ut32_t size ; 45 i( p = NULL ) 46  NULL ; 49 size = `RTE_CACHE_LINE_ROUNDUP (( pe_ma )); 50 p = `e_zmloc ( NULL , size , RTE_CACHE_LINE_SIZE ); 51 i( p = NULL ) 52  NULL ; 55 p -> p =pp; 57 p -> = `cmdle_d_w ( p -> cmds , "pipeline> "); 58 i( p -> = NULL ) { 59 `e_ ( p ); 60  NULL ; 63 p -> st_fe_de = 0; 64 i( p -> st_fe = NULL ) 65 p -> st_fe_de = 1; 67  (* p ; 68 } } 71 $pe_ (* pe ) 73  pe_ma * p = (pe_ma * pe ; 75 i( p = NULL ) 76  - EINVAL ; 78 `cmdle_d_ex ( p -> ); 79 `e_ ( p ); 82 } } 85 $pe_run (* pe ) 87  pe_ma * p = (pe_ma * pe ; 88  us ; 90 i( p -> st_fe_de == 0) { 91  p_ms * p = p ->app; 92  fd = `ݒ ( p -> st_fe , O_RDONLY ); 94 i( fd < 0) 95 `tf ("Cannot open CLI script file \"%s\"\n", 96 p -> st_fe ); 98  cmdle * fe_ ; 100 `tf ("Running CLI script file \"%s\" ...\n", 101 p -> st_fe ); 102 fe_ = `cmdle_w ( p -> -> x , "", fd , 1); 103 `cmdle_ ( fe_ ); 104 `o ( fd ); 107 p -> st_fe_de = 1; 110 us = `cmdle_pl ( p -> ); 111 i( us < 0) 112 `e_nic ("CLIȔr (%" PRId32 ")\n", us ); 113 i( us = RDLINE_EXITED ) { 114 `cmdle_d_ex ( p -> ); 115 `e_ex (0, "Bye!\n"); 119 } } 122 $pe_tim ( __e_unud * pe ) 124 `e_tim_mage (); 126 } } 128  pe_be_s gpe_ma_be_s = { 129 . f_ = pe_ , 130 . gf_ = pe_ , 131 . gf_run = pe_run , 132 . gf_tim = pe_tim , 133 . gf_ack = NULL , @VIL/pipeline_master/pipeline_master_be.h 17 #ide __INCLUDE_PIPELINE_MASTER_BE_H__ 18  #__INCLUDE_PIPELINE_MASTER_BE_H__ ) 20  ~"pe_comm_be.h " 22  pe_be_s pe_ma_be_s ; @VIL/pipeline_passthrough/pipeline_passthrough.c 17  ~"pe_shrough.h " 18  ~"pe_shrough_be.h " 20  pe__s gpe_shrough__s = { 21 . f_ = NULL , 22 . gf_ = NULL , 23 . gcmds = NULL , 26  pe_ty gpe_shrough = { 27 . me = "PASS-THROUGH", 28 . gbe_s = & pe_shrough_be_s , 29 . g_s = & pe_shrough__s , @VIL/pipeline_passthrough/pipeline_passthrough.h 17 #ide __INCLUDE_PIPELINE_PASSTHROUGH_H__ 18  #__INCLUDE_PIPELINE_PASSTHROUGH_H__ ) 20  ~"pe.h " 22  pe_ty pe_shrough ; @VIL/pipeline_passthrough/pipeline_passthrough_be.c 17  ~ 19  ~ 20  ~ 21  ~ 22  ~ 23  ~ 24  ~ 26  ~"pe_shrough_be.h " 27  ~"pe_ais_comm.h " 28  ~"rr.h " 29  ~"hash_func.h " 31  spe_shrough { 32  pe mp ; 33  pe_shrough_ms mms ; 34 e_b_hash__hash mf_hash ; 35 } g__e_che_igd ; 37  pe_msg_q_hdr ghdrs [] = { 38 [ PIPELINE_MSG_REQ_PING ] = 39 pe_msg_q_pg_hdr , 40 [ PIPELINE_MSG_REQ_STATS_PORT_IN ] = 41 pe_msg_q_s_pt__hdr , 42 [ PIPELINE_MSG_REQ_STATS_PORT_OUT ] = 43 pe_msg_q_s_pt_out_hdr , 44 [ PIPELINE_MSG_REQ_STATS_TABLE ] = 45 pe_msg_q_s_b_hdr , 46 [ PIPELINE_MSG_REQ_PORT_IN_ENABLE ] = 47 pe_msg_q_pt__ab_hdr , 48 [ PIPELINE_MSG_REQ_PORT_IN_DISABLE ] = 49 pe_msg_q_pt__dib_hdr , 50 [ PIPELINE_MSG_REQ_CUSTOM ] = 51 pe_msg_q_vid_hdr , 54  le __ibu__ (( ways_le ))  55 $pkt_wk ( 56  e_mbuf * pkt , 57 * g , 58 ut32_t dma_size , 59 ut32_t hash_abd , 60 ut32_t lb_hash , 61 ut32_t pt_out_pow2 ) 63  pe_shrough * p = g ; 65 ut64_t * dma_d = `RTE_MBUF_METADATA_UINT64_PTR ( pkt , 66 p -> ms . dma_d_offt ); 67 ut64_t * dma_c = `RTE_MBUF_METADATA_UINT64_PTR ( pkt , 68 p -> ms . dma_c_offt ); 69 ut64_t * dma_mask = (ut64_* p -> ms . dma_c_mask ; 70 ut32_t * dma_hash = `RTE_MBUF_METADATA_UINT32_PTR ( pkt , 71 p -> ms . dma_hash_offt ); 72 ut32_t i ; 75  i = 0; i < ( dma_size / 8); i++) 76 dma_d [ i ] = dma_c [i] & dma_mask [i]; 79 i( hash_abd ) { 80 ut32_t hash = p -> `f_hash ( dma_d , dma_size , 0); 81 * dma_hash = hash ; 83 i( lb_hash ) { 84 ut32_t pt_out ; 86 i( pt_out_pow2 ) 87 pt_out 88 hash & ( p ->p. n_pts_out - 1); 90 pt_out 91 hash % p ->p. n_pts_out ; 93 `e_pe_pt_out_ck_ ( p ->p.p, 94 pt_out , pkt ); 97 } } 99  le __ibu__ (( ways_le ))  100 $pkt4_wk ( 101  e_mbuf ** pkts , 102 * g , 103 ut32_t dma_size , 104 ut32_t hash_abd , 105 ut32_t lb_hash , 106 ut32_t pt_out_pow2 ) 108  pe_shrough * p = g ; 110 ut64_t * dma_d0 = `RTE_MBUF_METADATA_UINT64_PTR ( pkts [0], 111 p -> ms . dma_d_offt ); 112 ut64_t * dma_d1 = `RTE_MBUF_METADATA_UINT64_PTR ( pkts [1], 113 p -> ms . dma_d_offt ); 114 ut64_t * dma_d2 = `RTE_MBUF_METADATA_UINT64_PTR ( pkts [2], 115 p -> ms . dma_d_offt ); 116 ut64_t * dma_d3 = `RTE_MBUF_METADATA_UINT64_PTR ( pkts [3], 117 p -> ms . dma_d_offt ); 119 ut64_t * dma_c0 = `RTE_MBUF_METADATA_UINT64_PTR ( pkts [0], 120 p -> ms . dma_c_offt ); 121 ut64_t * dma_c1 = `RTE_MBUF_METADATA_UINT64_PTR ( pkts [1], 122 p -> ms . dma_c_offt ); 123 ut64_t * dma_c2 = `RTE_MBUF_METADATA_UINT64_PTR ( pkts [2], 124 p -> ms . dma_c_offt ); 125 ut64_t * dma_c3 = `RTE_MBUF_METADATA_UINT64_PTR ( pkts [3], 126 p -> ms . dma_c_offt ); 128 ut64_t * dma_mask = (ut64_* p -> ms . dma_c_mask ; 130 ut32_t * dma_hash0 = `RTE_MBUF_METADATA_UINT32_PTR ( pkts [0], 131 p -> ms . dma_hash_offt ); 132 ut32_t * dma_hash1 = `RTE_MBUF_METADATA_UINT32_PTR ( pkts [1], 133 p -> ms . dma_hash_offt ); 134 ut32_t * dma_hash2 = `RTE_MBUF_METADATA_UINT32_PTR ( pkts [2], 135 p -> ms . dma_hash_offt ); 136 ut32_t * dma_hash3 = `RTE_MBUF_METADATA_UINT32_PTR ( pkts [3], 137 p -> ms . dma_hash_offt ); 139 ut32_t i ; 142  i = 0; i < ( dma_size / 8); i++) { 143 dma_d0 [ i ] = dma_c0 [i] & dma_mask [i]; 144 dma_d1 [ i ] = dma_c1 [i] & dma_mask [i]; 145 dma_d2 [ i ] = dma_c2 [i] & dma_mask [i]; 146 dma_d3 [ i ] = dma_c3 [i] & dma_mask [i]; 150 i( hash_abd ) { 151 ut32_t hash0 = p -> `f_hash ( dma_d0 , dma_size , 0); 152 ut32_t hash1 = p -> `f_hash ( dma_d1 , dma_size , 0); 153 ut32_t hash2 = p -> `f_hash ( dma_d2 , dma_size , 0); 154 ut32_t hash3 = p -> `f_hash ( dma_d3 , dma_size , 0); 156 * dma_hash0 = hash0 ; 157 * dma_hash1 = hash1 ; 158 * dma_hash2 = hash2 ; 159 * dma_hash3 = hash3 ; 161 i( lb_hash ) { 162 ut32_t pt_out0 , pt_out1 , pt_out2 , pt_out3 ; 164 i( pt_out_pow2 ) { 165 pt_out0 166 hash0 & ( p ->p. n_pts_out - 1); 167 pt_out1 168 hash1 & ( p ->p. n_pts_out - 1); 169 pt_out2 170 hash2 & ( p ->p. n_pts_out - 1); 171 pt_out3 172 hash3 & ( p ->p. n_pts_out - 1); 174 pt_out0 175 hash0 % p ->p. n_pts_out ; 176 pt_out1 177 hash1 % p ->p. n_pts_out ; 178 pt_out2 179 hash2 % p ->p. n_pts_out ; 180 pt_out3 181 hash3 % p ->p. n_pts_out ; 183 `e_pe_pt_out_ck_ ( p ->p.p, 184 pt_out0 , pkts [0]); 185 `e_pe_pt_out_ck_ ( p ->p.p, 186 pt_out1 , pkts [1]); 187 `e_pe_pt_out_ck_ ( p ->p.p, 188 pt_out2 , pkts [2]); 189 `e_pe_pt_out_ck_ ( p ->p.p, 190 pt_out3 , pkts [3]); 193 } } 195  #PKT_WORK ( dma_size , hash_abd , lb_hash , pt_pow2 ) \ 196  le \ 197 pkt_wk_size ## dma_size ## _hash ## hash_abd \ 198 ## _lb ## lb_hash ## _pw ## `pt_pow2 ( \ 199  e_mbuf * pkt , \ 200 * g ) \ 202 `pkt_wk ( pkt , g , dma_size , hash_abd , lb_hash , pt_pow2 ); \ 203 } ) 205  #PKT4_WORK ( dma_size , hash_abd , lb_hash , pt_pow2 ) \ 206  le \ 207 pkt4_wk_size ## dma_size ## _hash ## hash_abd \ 208 ## _lb ## lb_hash ## _pw ## `pt_pow2 ( \ 209  e_mbuf ** pkts , \ 210 * g ) \ 212 `pkt4_wk ( pkts , g , dma_size , hash_abd , lb_hash , pt_pow2 ); \ 213 } ) 215  #pt__ah ( dma_size , hash_abd , lb_hash , pt_pow2 ) \ 216 `PKT_WORK ( dma_size , hash_abd , lb_hash , pt_pow2 ) \ 217 `PKT4_WORK ( dma_size , hash_abd , lb_hash , pt_pow2 ) \ 218 `PIPELINE_PORT_IN_AH ( pt__ah_size ## dma_size ## _hash \ 219 ## hash_abd ## _lb ## lb_hash ## _pw ## pt_pow2 , \ 220 pkt_wk_size ## dma_size ## _hash ## hash_abd \ 221 ## _lb ## lb_hash ## _pw ## pt_pow2 , \ 222 pkt4_wk_size ## dma_size ## _hash ## hash_abd \ 223 ## _lb ## lb_hash ## _pw ## pt_pow2 ) ) 226  #pt__ah_lb ( dma_size , hash_abd , lb_hash , pt_pow2 ) \ 227 `PKT_WORK ( dma_size , hash_abd , lb_hash , pt_pow2 ) \ 228 `PKT4_WORK ( dma_size , hash_abd , lb_hash , pt_pow2 ) \ 229 `PIPELINE_PORT_IN_AH_HIJACK_ALL ( \ 230 pt__ah_size ## dma_size ## _hash ## hash_abd \ 231 ## _lb ## lb_hash ## _pw ## pt_pow2 , \ 232 pkt_wk_size ## dma_size ## _hash ## hash_abd \ 233 ## _lb ## lb_hash ## _pw ## pt_pow2 , \ 234 pkt4_wk_size ## dma_size ## _hash ## hash_abd \ 235 ## _lb ## lb_hash ## _pw ## pt_pow2 ) ) 239 $pt__ah (8, 0, 0, 0) 240 $pt__ah (8, 1, 0, 0) 241 $pt__ah_lb (8, 1, 1, 0) 242 $pt__ah_lb (8, 1, 1, 1) 244 $pt__ah (16, 0, 0, 0) 245 $pt__ah (16, 1, 0, 0) 246 $pt__ah_lb (16, 1, 1, 0) 247 $pt__ah_lb (16, 1, 1, 1) 249 $pt__ah (24, 0, 0, 0) 250 $pt__ah (24, 1, 0, 0) 251 $pt__ah_lb (24, 1, 1, 0) 252 $pt__ah_lb (24, 1, 1, 1) 254 $pt__ah (32, 0, 0, 0) 255 $pt__ah (32, 1, 0, 0) 256 $pt__ah_lb (32, 1, 1, 0) 257 $pt__ah_lb (32, 1, 1, 1) 259 $pt__ah (40, 0, 0, 0) 260 $pt__ah (40, 1, 0, 0) 261 $pt__ah_lb (40, 1, 1, 0) 262 $pt__ah_lb (40, 1, 1, 1) 264 $pt__ah (48, 0, 0, 0) 265 $pt__ah (48, 1, 0, 0) 266 $pt__ah_lb (48, 1, 1, 0) 267 $pt__ah_lb (48, 1, 1, 1) 269 $pt__ah (56, 0, 0, 0) 270 $pt__ah (56, 1, 0, 0) 271 $pt__ah_lb (56, 1, 1, 0) 272 $pt__ah_lb (56, 1, 1, 1) 274 $pt__ah (64, 0, 0, 0) 275 $pt__ah (64, 1, 0, 0) 276 $pt__ah_lb (64, 1, 1, 0) 277 $pt__ah_lb (64, 1, 1, 1) 279  e_pe_pt__ai_hdr 280 $g_pt__ah ( pe_shrough * p ) 282 i( p -> ms . dma_abd == 0) 283  NULL ; 285 i( p -> ms . dma_hash_abd ) { 286 i( p -> ms . lb_hash_abd ) { 287 i( `e_is_pow_of_2 ( p ->p. n_pts_out )) 288  p -> ms . dma_size ) { 290 8:  pt__ah_size8_hash1_lb1_pw1 ; 291 16:  pt__ah_size16_hash1_lb1_pw1 ; 292 24:  pt__ah_size24_hash1_lb1_pw1 ; 293 32:  pt__ah_size32_hash1_lb1_pw1 ; 294 40:  pt__ah_size40_hash1_lb1_pw1 ; 295 48:  pt__ah_size48_hash1_lb1_pw1 ; 296 56:  pt__ah_size56_hash1_lb1_pw1 ; 297 64:  pt__ah_size64_hash1_lb1_pw1 ; 298 :  NULL ; 301  p -> ms . dma_size ) { 303 8:  pt__ah_size8_hash1_lb1_pw0 ; 304 16:  pt__ah_size16_hash1_lb1_pw0 ; 305 24:  pt__ah_size24_hash1_lb1_pw0 ; 306 32:  pt__ah_size32_hash1_lb1_pw0 ; 307 40:  pt__ah_size40_hash1_lb1_pw0 ; 308 48:  pt__ah_size48_hash1_lb1_pw0 ; 309 56:  pt__ah_size56_hash1_lb1_pw0 ; 310 64:  pt__ah_size64_hash1_lb1_pw0 ; 311 :  NULL ; 314  p -> ms . dma_size ) { 316 8:  pt__ah_size8_hash1_lb0_pw0 ; 317 16:  pt__ah_size16_hash1_lb0_pw0 ; 318 24:  pt__ah_size24_hash1_lb0_pw0 ; 319 32:  pt__ah_size32_hash1_lb0_pw0 ; 320 40:  pt__ah_size40_hash1_lb0_pw0 ; 321 48:  pt__ah_size48_hash1_lb0_pw0 ; 322 56:  pt__ah_size56_hash1_lb0_pw0 ; 323 64:  pt__ah_size64_hash1_lb0_pw0 ; 324 :  NULL ; 327  p -> ms . dma_size ) { 329 8:  pt__ah_size8_hash0_lb0_pw0 ; 330 16:  pt__ah_size16_hash0_lb0_pw0 ; 331 24:  pt__ah_size24_hash0_lb0_pw0 ; 332 32:  pt__ah_size32_hash0_lb0_pw0 ; 333 40:  pt__ah_size40_hash0_lb0_pw0 ; 334 48:  pt__ah_size48_hash0_lb0_pw0 ; 335 56:  pt__ah_size56_hash0_lb0_pw0 ; 336 64:  pt__ah_size64_hash0_lb0_pw0 ; 337 :  NULL ; 339 } } 342 $pe_shrough_r_gs ( pe_shrough_ms * p , 343  pe_ms * ms ) 345 ut32_t dma_d_offt_e = 0; 346 ut32_t dma_c_offt_e = 0; 347 ut32_t dma_c_mask_e = 0; 348 ut32_t dma_size_e = 0; 349 ut32_t dma_hash_offt_e = 0; 350 ut32_t lb_e = 0; 351 ut32_t i ; 352  dma_mask_r [ PIPELINE_PASSTHROUGH_DMA_SIZE_MAX * 2]; 355 p -> dma_abd = 0; 356 p -> dma_hash_abd = 0; 357 p -> lb_hash_abd = 0; 358 `memt ( p -> dma_c_mask , 0xFF, (p->dma_src_mask)); 360  i = 0; i < ms -> n_gs ; i++) { 361 * g_me = ms -> gs_me [ i ]; 362 * g_vue = ms -> gs_vue [ i ]; 365 i( `rcmp ( g_me , "dma_dst_offset") == 0) { 366  us ; 368 `PIPELINE_PARSE_ERR_DUPLICATE ( 369 dma_d_offt_e =0, ms -> me , 370 g_me ); 371 dma_d_offt_e = 1; 373 us = `rr_ad_ut32 (& p -> dma_d_offt , 374 g_vue ); 375 `PIPELINE_PARSE_ERR_INV_VAL (( us !- EINVAL ), 376 ms -> me , g_me , g_vue ); 377 `PIPELINE_PARSE_ERR_OUT_RNG (( us !- ERANGE ), 378 ms -> me , g_me , g_vue ); 380 p -> dma_abd = 1; 386 i( `rcmp ( g_me , "dma_src_offset") == 0) { 387  us ; 389 `PIPELINE_PARSE_ERR_DUPLICATE ( 390 dma_c_offt_e =0, ms -> me , 391 g_me ); 392 dma_c_offt_e = 1; 394 us = `rr_ad_ut32 (& p -> dma_c_offt , 395 g_vue ); 396 `PIPELINE_PARSE_ERR_INV_VAL (( us !- EINVAL ), 397 ms -> me , g_me , g_vue ); 398 `PIPELINE_PARSE_ERR_OUT_RNG (( us !- ERANGE ), 399 ms -> me , g_me , g_vue ); 401 p -> dma_abd = 1; 407 i( `rcmp ( g_me , "dma_size") == 0) { 408  us ; 410 `PIPELINE_PARSE_ERR_DUPLICATE ( 411 dma_size_e =0, ms -> me , 412 g_me ); 413 dma_size_e = 1; 415 us = `rr_ad_ut32 (& p -> dma_size , 416 g_vue ); 417 `PIPELINE_PARSE_ERR_INV_VAL ((( us !- EINVAL ) && 418 ( p -> dma_size != 0) && 419 (( p -> dma_size % 8) == 0)), 420 ms -> me , g_me , g_vue ); 421 `PIPELINE_PARSE_ERR_OUT_RNG ((( us !- ERANGE ) && 422 ( p -> dma_size <= 423 PIPELINE_PASSTHROUGH_DMA_SIZE_MAX )), 424 ms -> me , g_me , g_vue ); 426 p -> dma_abd = 1; 432 i( `rcmp ( g_me , "dma_src_mask") == 0) { 433  mask_r_n = ` ( g_vue ); 435 `PIPELINE_PARSE_ERR_DUPLICATE ( 436 dma_c_mask_e == 0, 437 ms -> me , g_me ); 438 dma_c_mask_e = 1; 440 `PIPELINE_ARG_CHECK (( mask_r_n < 441 ( PIPELINE_PASSTHROUGH_DMA_SIZE_MAX * 2)), 443 "\"%s\"olg", ms -> me , 444 g_me ); 446 `tf ( dma_mask_r , mask_r_n + 1, 447 "%s", g_vue ); 449 p -> dma_abd = 1; 455 i( `rcmp ( g_me , "dma_hash_offset") == 0) { 456  us ; 458 `PIPELINE_PARSE_ERR_DUPLICATE ( 459 dma_hash_offt_e == 0, 460 ms -> me , g_me ); 461 dma_hash_offt_e = 1; 463 us = `rr_ad_ut32 (& p -> dma_hash_offt , 464 g_vue ); 465 `PIPELINE_PARSE_ERR_INV_VAL (( us !- EINVAL ), 466 ms -> me , g_me , g_vue ); 467 `PIPELINE_PARSE_ERR_OUT_RNG (( us !- ERANGE ), 468 ms -> me , g_me , g_vue ); 470 p -> dma_hash_abd = 1; 471 p -> dma_abd = 1; 477 i( `rcmp ( g_me , "lb") == 0) { 478 `PIPELINE_PARSE_ERR_DUPLICATE ( 479 lb_e == 0, 480 ms -> me , g_me ); 481 lb_e = 1; 483 i(( `rcmp ( g_vue , "hash") == 0) || 484 ( `rcmp ( g_vue , "HASH") == 0)) 485 p -> lb_hash_abd = 1; 487 `PIPELINE_PARSE_ERR_INV_VAL (0, 488 ms -> me , 489 g_me , 490 g_vue ); 496 `PIPELINE_PARSE_ERR_INV_ENT (0, ms -> me , g_me ); 500 `PIPELINE_ARG_CHECK (( dma_d_offt_e = p -> dma_abd ), 502 "\"dma_d_offt\"", ms -> me ); 503 `PIPELINE_ARG_CHECK (( dma_c_offt_e = p -> dma_abd ), 505 "\"dma_c_offt\"", ms -> me ); 506 `PIPELINE_ARG_CHECK (( dma_size_e = p -> dma_abd ), 508 "\"dma_size\"", ms -> me ); 509 `PIPELINE_ARG_CHECK (( dma_hash_offt_e = p -> dma_abd ), 511 "\"dma_hash_offt\"", ms -> me ); 512 `PIPELINE_ARG_CHECK (( p -> lb_hash_abd dma_hash_abd ), 514 "\"dma_hash_offt\"", ms -> me ); 516 i( dma_c_mask_e ) { 517 ut32_t dma_size = p ->dma_size; 518  us ; 520 `PIPELINE_ARG_CHECK (( ` ( dma_mask_r ) == 521 ( dma_size * 2)), "Parserror in section " 523 "digs", ms -> me , ( dma_size * 2)); 525 us = `r_hex_rg ( dma_mask_r , p -> dma_c_mask , 526 & p -> dma_size ); 528 `PIPELINE_PARSE_ERR_INV_VAL ((( us == 0) && 529 ( dma_size = p ->dma_size)), ms -> me , 530 "dma_c_mask", dma_mask_r ); 534 } } 537  e_b_hash__hash 538 $g_hash_funi ( pe_shrough * p ) 540  p -> ms . dma_size ) { 542 8:  hash_deu_key8 ; 543 16:  hash_deu_key16 ; 544 24:  hash_deu_key24 ; 545 32:  hash_deu_key32 ; 546 40:  hash_deu_key40 ; 547 48:  hash_deu_key48 ; 548 56:  hash_deu_key56 ; 549 64:  hash_deu_key64 ; 550 :  NULL ; 552 } } 555 $pe_shrough_ ( pe_ms * ms , 556 __e_unud * g ) 558  pe * p ; 559  pe_shrough * p_ ; 560 ut32_t size , i ; 563 i(( ms = NULL ) || 564 ( ms -> n_pts_ == 0) || 565 ( ms -> n_pts_out == 0) || 566 ( ms -> n_pts_ n_pts_out ) || 567 ( ms -> n_pts_ %ams-> n_pts_out )) 568  NULL ; 571 size = `RTE_CACHE_LINE_ROUNDUP (( pe_shrough )); 572 p = `e_zmloc ( NULL , size , RTE_CACHE_LINE_SIZE ); 573 p_ = ( pe_shrough * p ; 574 i( p = NULL ) 575  NULL ; 577 `ry ( p -> me , ms ->name); 578 p -> log_v = ms ->log_level; 580 `PLOG ( p , HIGH , "Pass-through"); 583 i( `pe_shrough_r_gs (& p_ -> ms ,arams)) 584  NULL ; 585 p_ -> f_hash = `g_hash_funi (p_pt); 589  e_pe_ms pe_ms = { 590 . me = "PASS-THROUGH", 591 . sock_id = ms ->socket_id, 592 . offt_pt_id = 0, 595 p -> `e_pe_ (& pe_ms ); 596 i( p ->= NULL ) { 597 `e_ ( p ); 598  NULL ; 602 p -> n_pts_ = ms ->n_ports_in; 603 p -> n_pts_out = ms ->n_ports_out; 604 p -> n_bs =-> n_pts_ ; 607  i = 0; i < p -> n_pts_ ; i++) { 608  e_pe_pt__ms pt_ms = { 609 . s = `pe_pt__ms_g_s ( 610 & ms -> pt_ [ i ]), 611 . g_ = `pe_pt__ms_cvt ( 612 & ms -> pt_ [ i ]), 613 . f_ai = `g_pt__ah ( p_ ), 614 . g_ah = p_ , 615 . bur_size = ms -> pt_ [ i ].burst_size, 618  us = `e_pe_pt__ ( p ->p, 619 & pt_ms , 620 & p -> pt__id [ i ]); 622 i( us ) { 623 `e_pe_ ( p ->p); 624 `e_ ( p ); 625  NULL ; 630  i = 0; i < p -> n_pts_out ; i++) { 631  e_pe_pt_out_ms pt_ms = { 632 . s = `pe_pt_out_ms_g_s ( 633 & ms -> pt_out [ i ]), 634 . g_ = `pe_pt_out_ms_cvt ( 635 & ms -> pt_out [ i ]), 636 . f_ai = NULL , 637 . g_ah = NULL , 640  us = `e_pe_pt_out_ ( p ->p, 641 & pt_ms , 642 & p -> pt_out_id [ i ]); 644 i( us ) { 645 `e_pe_ ( p ->p); 646 `e_ ( p ); 647  NULL ; 652  i = 0; i < p -> n_pts_ ; i++) { 653  e_pe_b_ms b_ms = { 654 . s = & e_b_ub_s , 655 . g_ = NULL , 656 . f_ai_h = NULL , 657 . f_ai_miss = NULL , 658 . g_ah = NULL , 659 . ai_da_size = 0, 662  us = `e_pe_b_ ( p ->p, 663 & b_ms , 664 & p -> b_id [ i ]); 666 i( us ) { 667 `e_pe_ ( p ->p); 668 `e_ ( p ); 669  NULL ; 674  i = 0; i < p -> n_pts_ ; i++) { 675  us = `e_pe_pt__c_to_b ( p ->p, 676 p -> pt__id [ i ], 677 p -> b_id [ i ]); 679 i( us ) { 680 `e_pe_ ( p ->p); 681 `e_ ( p ); 682  NULL ; 687  i = 0; i < p -> n_pts_ ; i++) { 688  e_pe_b_y deu_y = { 689 . ai = RTE_PIPELINE_ACTION_PORT , 690 {. pt_id = p -> pt_out_id [ 691 i / ( p -> n_pts_ /-> n_pts_out )]}, 694  e_pe_b_y * deu_y_r ; 696  us = `e_pe_b_deu_y_add ( p ->p, 697 p -> b_id [ i ], 698 & deu_y , 699 & deu_y_r ); 701 i( us ) { 702 `e_pe_ ( p ->p); 703 `e_ ( p ); 704  NULL ; 709  i = 0; i < p -> n_pts_ ; i++) { 710  us = `e_pe_pt__ab ( p ->p, 711 p -> pt__id [ i ]); 713 i( us ) { 714 `e_pe_ ( p ->p); 715 `e_ ( p ); 716  NULL ; 721 i( `e_pe_check ( p ->p) < 0) { 722 `e_pe_ ( p ->p); 723 `e_ ( p ); 724  NULL ; 728 p -> n_msgq = ms ->n_msgq; 729  i = 0; i < p -> n_msgq ; i++) 730 p -> msgq_ [ i ] = ms ->msgq_in[i]; 731  i = 0; i < p -> n_msgq ; i++) 732 p -> msgq_out [ i ] = ms ->msgq_out[i]; 735 `memy ( p -> hdrs , handlers, (p->handlers)); 737  p ; 738 } } 741 $pe_shrough_ (* pe ) 743  pe * p = (pipeline *)ipeline; 746 i( p = NULL ) 750 `e_pe_ ( p ->p); 751 `e_ ( p ); 753 } } 756 $pe_shrough_tim (* pe ) 758  pe * p = (pipeline *)ipeline; 760 `pe_msg_q_hd ( p ); 761 `e_pe_ush ( p ->p); 764 } } 767 $pe_shrough_ack (* pe , ut32_t pt_ , ut32_* pt_out ) 769  pe * p = (pipeline *)ipeline; 772 i(( p = NULL ) || 773 ( pt_ > p -> n_pts_ ) || 774 ( pt_out = NULL )) 777 * pt_out = pt_ / p -> n_pts_ ; 779 } } 781  pe_be_s gpe_shrough_be_s = { 782 . f_ = pe_shrough_ , 783 . gf_ = pe_shrough_ , 784 . gf_run = NULL , 785 . gf_tim = pe_shrough_tim , 786 . gf_ack = pe_shrough_ack , @VIL/pipeline_passthrough/pipeline_passthrough_be.h 17 #ide __INCLUDE_PIPELINE_PASSTHROUGH_BE_H__ 18  #__INCLUDE_PIPELINE_PASSTHROUGH_BE_H__ ) 20  ~"pe_comm_be.h " 22  #PIPELINE_PASSTHROUGH_DMA_SIZE_MAX 64 ) 24  spe_shrough_ms { 25 ut32_t mdma_abd ; 26 ut32_t mdma_d_offt ; 27 ut32_t mdma_c_offt ; 28 ut8_t mdma_c_mask [ PIPELINE_PASSTHROUGH_DMA_SIZE_MAX ]; 29 ut32_t mdma_size ; 31 ut32_t mdma_hash_abd ; 32 ut32_t mdma_hash_offt ; 33 ut32_t mlb_hash_abd ; 37 pe_shrough_r_gs ( pe_shrough_ms * p , 38  pe_ms * ms ); 40  pe_be_s pe_shrough_be_s ; @VIL/pipeline_txrx/pipeline_txrx.c 17  ~ 18  ~ 19  ~ 20  ~ 21  ~ 23  ~"p.h " 24  ~"pe_comm_.h " 25  ~"pe_txrx.h " 26  ~"vnf_comm.h " 28  ~"pe_picmp_be.h " 31 $p_pe_txrx_y_dbg ( p_ms * p , 32 ut32_t pe_id , ut8_t * msg ) 34  pe_txrx_y_dbg_msg_q * q ; 35  pe_txrx_y_dbg_msg_r * r ; 38 i( p = NULL ) 42 q = `p_msg_loc ( p ); 43 i( q = NULL ) 46 q -> ty = PIPELINE_MSG_REQ_CUSTOM ; 47 q -> subty = PIPELINE_TXRX_MSG_REQ_ENTRY_DBG ; 48 q -> da [0] = msg [0]; 49 q -> da [1] = msg [1]; 51 r = `p_msg_nd_cv ( p , pe_id , q , MSG_TIMEOUT_DEFAULT ); 52 i( r = NULL ) 56 i( r -> us ) { 57 `p_msg_ ( p , r ); 58 `tf ("E܄->u%d\n", r -> us ); 63 `p_msg_ ( p , r ); 66 } } 73  scmd_y_dbg_su { 74 cmdle_fixed_rg_t mp_rg ; 75 ut32_t mp ; 76 cmdle_fixed_rg_t my_rg ; 77 cmdle_fixed_rg_t mdbg_rg ; 78 ut8_t mcmd ; 79 ut8_t md1 ; 83 $cmd_y_dbg_rd (* rd_su , 84 __e_unud  cmdle * , * da ) 86  cmd_y_dbg_su * ms = rd_su ; 87  p_ms * p = da ; 88 ut8_t msg [2]; 89  us ; 91 msg [0] = ms -> cmd ; 92 msg [1] = ms -> d1 ; 93 us = `p_pe_txrx_y_dbg ( p , ms -> p , msg ); 95 i( us != 0) { 96 `tf ("Dbg Command failed\n"); 99 } } 101  cmdle_r_tok_rg_t glb_cmd_y_dbg_p_rg = 102 TOKEN_STRING_INITIALIZER ( cmd_y_dbg_su , p_rg , "p"); 104  cmdle_r_tok_num_t glb_cmd_y_dbg_p = 105 TOKEN_NUM_INITIALIZER ( cmd_y_dbg_su , p , UINT32 ); 107  cmdle_r_tok_rg_t glb_cmd_y_dbg_y_rg = 108 TOKEN_STRING_INITIALIZER ( cmd_y_dbg_su , 109 y_rg , "txrx"); 111  cmdle_r_tok_rg_t glb_cmd_y_dbg_dbg_rg = 112 TOKEN_STRING_INITIALIZER ( cmd_y_dbg_su , dbg_rg , 115  cmdle_r_tok_num_t glb_cmd_y_dbg_cmd = 116 TOKEN_NUM_INITIALIZER ( cmd_y_dbg_su , cmd , UINT8 ); 118  cmdle_r_tok_num_t glb_cmd_y_dbg_d1 = 119 TOKEN_NUM_INITIALIZER ( cmd_y_dbg_su , d1 , UINT8 ); 121  cmdle_r__t glb_cmd_y_dbg = { 122 . f = cmd_y_dbg_rd , 123 . gda = NULL , 124 . ghp_r = "TXRX dbg cmd", 125 . gtoks = { 126 (*)& lb_cmd_y_dbg_p_rg , 127 (*)& lb_cmd_y_dbg_p , 128 (*)& lb_cmd_y_dbg_y_rg , 129 (*)& lb_cmd_y_dbg_dbg_rg , 130 (*)& lb_cmd_y_dbg_cmd , 131 (*)& lb_cmd_y_dbg_d1 , 132 NULL , 136  cmdle_r_x_t gpe_cmds [] = { 137 ( cmdle_r__t *& lb_cmd_y_dbg , 138 NULL , 141  pe__s gpe_txrx__s = { 142 . f_ = NULL , 143 . gf_ = NULL , 144 . gcmds = pe_cmds , 147  pe_ty gpe_txrx = { 148 . me = "TXRX", 149 . gbe_s = & pe_txrx_be_s , 150 . g_s = & pe_txrx__s , @VIL/pipeline_txrx/pipeline_txrx.h 17 #ide __INCLUDE_PIPELINE_TXRX_H__ 18  #__INCLUDE_PIPELINE_TXRX_H__ ) 20  ~"pe.h " 21  ~"pe_txrx_be.h " 26  pe_ty pe_txrx ; @VIL/pipeline_txrx/pipeline_txrx_be.c 17  ~ 19  ~ 20  ~ 21  ~ 22  ~ 23  ~ 24  ~ 26  ~"pe_txrx_be.h " 27  ~"pe_ais_comm.h " 28  ~"rr.h " 29  ~"hash_func.h " 30  ~"pe_picmp_be.h " 31  ~"vnf_comm.h " 32  ~"p.h " 33 #ide VNF_ACL 34  ~"lib_icmpv6.h " 37 ut8_t gTXRX_DEBUG ; 38  gpkt_bur_t ; 40  spe_txrx { 41  pe mp ; 42 pe_msg_q_hdr 43 mcuom_hdrs [ PIPELINE_TXRX_MSG_REQS ]; 44 ut64_t mivedPktCou ; 45 ut64_t mdrݳdPktCou ; 46 ut8_t mlks_m [ PIPELINE_MAX_PORT_IN ]; 47 ut8_t mout_id [ PIPELINE_MAX_PORT_IN ]; 48 ut8_t mpe_num ; 49 ut8_t mtxrx_ty ; 50 } g__e_che_igd ; 53 mTYPE_TXTX , 54 mTYPE_RXRX , 56 * pe_txrx_msg_q_cuom_hdr ( pe * p , 57 * msg ); 59  pe_msg_q_hdr ghdrs [] = { 60 [ PIPELINE_MSG_REQ_PING ] = 61 pe_msg_q_pg_hdr , 62 [ PIPELINE_MSG_REQ_STATS_PORT_IN ] = 63 pe_msg_q_s_pt__hdr , 64 [ PIPELINE_MSG_REQ_STATS_PORT_OUT ] = 65 pe_msg_q_s_pt_out_hdr , 66 [ PIPELINE_MSG_REQ_STATS_TABLE ] = 67 pe_msg_q_s_b_hdr , 68 [ PIPELINE_MSG_REQ_PORT_IN_ENABLE ] = 69 pe_msg_q_pt__ab_hdr , 70 [ PIPELINE_MSG_REQ_PORT_IN_DISABLE ] = 71 pe_msg_q_pt__dib_hdr , 72 [ PIPELINE_MSG_REQ_CUSTOM ] = 73 pe_txrx_msg_q_cuom_hdr , 77 * pe_txrx_msg_q_y_dbg_hdr ( pe * p , 78 * msg ); 79 * $pe_txrx_msg_q_y_dbg_hdr ( 80 __e_unud  pe * p , 81 __e_unud * msg ) 84  NULL ; 85 } } 87  __e_unud pe_msg_q_hdr gcuom_hdrs [] = { 88 [ PIPELINE_TXRX_MSG_REQ_ENTRY_DBG ] = 89 pe_txrx_msg_q_y_dbg_hdr , 103 * $pe_txrx_msg_q_cuom_hdr ( pe * p , * msg ) 105  pe_txrx * p_txrx = (pe_txrx *) p ; 106  pe_cuom_msg_q * q = msg ; 107 pe_msg_q_hdr f_hd ; 109 f_hd = ( q -> subty < PIPELINE_TXRX_MSG_REQS ) ? 110 p_txrx -> cuom_hdrs [ q -> subty ] : 111 pe_msg_q_vid_hdr ; 113 i( f_hd = NULL ) 114 f_hd = pe_msg_q_vid_hdr ; 116  `f_hd ( p , q ); 117 } } 123 pe_txrx_r_gs ( pe_txrx * p , 124  pe_ms * ms ); 126 $pe_txrx_r_gs ( pe_txrx * p , 127  pe_ms * ms ) 129 ut32_t i ; 130 ut8_t txrx_ty_e = 0; 132 i( TXRX_DEBUG > 2) 133 `tf ("TXRXipeline_txrx_parse_argsarams->n_args: %d\n", 134 ms -> n_gs ); 136  i = 0; i < ms -> n_gs ; i++) { 137 * g_me = ms -> gs_me [ i ]; 138 * g_vue = ms -> gs_vue [ i ]; 140 i( TXRX_DEBUG > 2) 141 `tf ("TXRXrgs[%d]: %%d, %s\n", i , g_me , 142 `oi ( g_vue ),rg_value); 145 i( `rcmp ( g_me , "pipeline_txrx_type") == 0) { 146 i( txrx_ty_e ) 148 txrx_ty_e = 1; 151 i( `rcmp ( g_vue , "TXTX") == 0) { 152 p -> txrx_ty = TYPE_TXTX ; 153 `tf ("pipeline_txrx_type is TXTX\n"); 155 i( `rcmp ( g_vue , "RXRX") == 0) { 156 p -> txrx_ty = TYPE_RXRX ; 157 `tf ("pipeline_txrx_type is RXRX\n"); 163 i(! txrx_ty_e ) { 164 `tf ("TXRXypeot specified\n"); 170 } } 172 ut32_t gtxrx_pkt_t_cou ; 173  le  174 $pkt_wk_txrx ( e_mbuf * pkt , ut32_t pkt_num , * g ) 177  pe_txrx__pt_h_g * = g ; 178  pe_txrx * p_txrx = (pe_txrx *) -> p ; 179 ut8_t siced_node_mui_addr [16] = 182 p_txrx -> ivedPktCou ++; 184 i( p_txrx -> txrx_ty = TYPE_TXTX ) 187 ut8_t _pt_id = pkt -> pt ; 188 ut32_t h_o_offt = MBUF_HDR_ROOM + 12; 190 ut32_t pkt_mask = 1 << pkt_num ; 192 ut32_t out_pt = p_txrx -> p . n_pts_out - 1; 194 ut16_t * h_o = 195 `RTE_MBUF_METADATA_UINT16_PTR ( pkt , h_o_offt ); 197 ut8_t * oc ; 198 ut32_t _offt = 199 MBUF_HDR_ROOM + ETH_HDR_SIZE + IP_HDR_PROTOCOL_OFST ; 201 #ifde IPV6 202  v6_hdr * v6_h ; 203 v6_h = `e_pktmbuf_mtod_offt ( pkt ,  v6_hdr *, ( h_hdr )); 204 ut32_t _offt_v6 = 205 MBUF_HDR_ROOM + ETH_HDR_SIZE + IPV6_HDR_PROTOCOL_OFST ; 207 i( `e_be_to_u_16 (* h_o = ETHER_TYPE_IPv6 ) 208 oc = `RTE_MBUF_METADATA_UINT8_PTR ( pkt , _offt_v6 ); 210 oc = `RTE_MBUF_METADATA_UINT8_PTR ( pkt , _offt ); 212 oc = `RTE_MBUF_METADATA_UINT8_PTR ( pkt , _offt ); 216 i(( TXRX_DEBUG > 2&& ( txrx_pkt_t_cou < 10)) { 217 `t_pkt1 ( pkt ); 218 txrx_pkt_t_cou ++; 219 `tf ("\nEth Typ %x, Prot %x, ETH_TYPE_ARP %x, " 221 `e_be_to_u_16 (* h_o ), * oc , ETH_TYPE_ARP , 222 ETH_TYPE_IPV4 , IP_PROTOCOL_ICMP ); 225  p_lk_ms * lk ; 227 lk = & myA -> lk_ms [ _pt_id ]; 230 ut32_t d_addr_offt = 231 MBUF_HDR_ROOM + ETH_HDR_SIZE + IP_HDR_DST_ADR_OFST ; 232 ut32_t * d_addr = `RTE_MBUF_METADATA_UINT32_PTR ( pkt , d_addr_offt ); 234 i( TXRX_DEBUG > 2) 235 i( `e_be_to_u_16 (* h_o = ETH_TYPE_IPV4 ) 236 `tf ("%s:kIp: %x, d_addr: %x\n", __FUNCTION__ , lk -> , * d_addr ); 239  `e_be_to_u_16 (* h_o )) { 240  ETH_TYPE_ARP : 241 `e_pe_pt_out_ck_ ( p_txrx -> p .p, 242 out_pt , pkt ); 243 `e_pe_ah_ck_dr ( p_txrx -> p .p, pkt_mask ); 246  ETH_TYPE_IPV4 : 247 i((* oc = IP_PROTOCOL_ICMP ) && 248 ( lk -> = `e_be_to_u_32 (* d_addr ))) { 249 i( `is_phy_pt_iv ( pkt -> pt )) { 250 `e_pe_pt_out_ck_ ( 251 p_txrx -> p .p, 252 out_pt , pkt ); 253 `e_pe_ah_ck_dr ( 254 p_txrx -> p .p, 255 pkt_mask ); 261 #ifde IPV6 262  ETH_TYPE_IPV6 : 263 i(* oc = ICMPV6_PROTOCOL_ID ) { 264 #ide VNF_ACL 265 i(! `memcmp ( v6_h -> d_addr , lk -> v6 , 16) 266 || ! `memcmp ( v6_h -> d_addr , siced_node_mui_addr , 13)) { 268 `e_pe_pt_out_ck_ ( p_txrx -> p .p, 269 out_pt , pkt ); 270 `e_pe_ah_ck_dr ( p_txrx -> p .p, pkt_mask ); 271 #ide VNF_ACL 273 `tf ("Droppinghe IPv6kt\n"); 274 `e_pe_ah_ck_dr ( p_txrx -> p .p, pkt_mask ); 282 `tf ("Droppinghekt\n"); 283 `e_pe_ah_ck_dr ( p_txrx -> p .p, pkt_mask ); 288 } } 290  le  291 $pkt4_wk_txrx ( e_mbuf ** pkt , ut32_t pkt_num , * g ) 293  pe_txrx__pt_h_g * = g ; 294  pe_txrx * p_txrx = (pe_txrx *) -> p ; 295 ut8_t siced_node_mui_addr [16] = 299 i( p_txrx -> txrx_ty = TYPE_TXTX ) 302 ut16_t _pt_id = (* pkt )-> pt ; 303 ut32_t h_o_offt = MBUF_HDR_ROOM + 12; 306 ut32_t pkt_mask0 = 1 << pkt_num ; 307 ut32_t pkt_mask1 = 1 << ( pkt_num + 1); 308 ut32_t pkt_mask2 = 1 << ( pkt_num + 2); 309 ut32_t pkt_mask3 = 1 << ( pkt_num + 3); 312 ut32_t out_pt = p_txrx -> p . n_pts_out - 1; 314 ut16_t * h_o0 = 315 `RTE_MBUF_METADATA_UINT16_PTR ( pkt [0], h_o_offt ); 316 ut16_t * h_o1 = 317 `RTE_MBUF_METADATA_UINT16_PTR ( pkt [1], h_o_offt ); 318 ut16_t * h_o2 = 319 `RTE_MBUF_METADATA_UINT16_PTR ( pkt [2], h_o_offt ); 320 ut16_t * h_o3 = 321 `RTE_MBUF_METADATA_UINT16_PTR ( pkt [3], h_o_offt ); 323 ut8_t * oc0 , * oc1 , * oc2 , * oc3 ; 324 ut32_t _offt = 325 MBUF_HDR_ROOM + ETH_HDR_SIZE + IP_HDR_PROTOCOL_OFST ; 327 #ifde IPV6 328  v6_hdr * v6_h0 , * v6_h1 , * v6_h2 , * v6_h3 ; 329 v6_h0 = `e_pktmbuf_mtod_offt ( pkt [0],  v6_hdr *, ( h_hdr )); 330 ut32_t _offt_v6 = 331 MBUF_HDR_ROOM + ETH_HDR_SIZE + IPV6_HDR_PROTOCOL_OFST ; 334 i( `e_be_to_u_16 (* h_o0 = ETHER_TYPE_IPv6 ) 335 oc0 = 336 `RTE_MBUF_METADATA_UINT8_PTR ( pkt [0], _offt_v6 ); 338 oc0 = `RTE_MBUF_METADATA_UINT8_PTR ( pkt [0], _offt ); 341 v6_h1 = `e_pktmbuf_mtod_offt ( pkt [1],  v6_hdr *, ( h_hdr )); 342 i( `e_be_to_u_16 (* h_o1 = ETHER_TYPE_IPv6 ) 343 oc1 = 344 `RTE_MBUF_METADATA_UINT8_PTR ( pkt [1], _offt_v6 ); 346 oc1 = `RTE_MBUF_METADATA_UINT8_PTR ( pkt [1], _offt ); 349 v6_h2 = `e_pktmbuf_mtod_offt ( pkt [2],  v6_hdr *, ( h_hdr )); 350 i( `e_be_to_u_16 (* h_o2 = ETHER_TYPE_IPv6 ) 351 oc2 = 352 `RTE_MBUF_METADATA_UINT8_PTR ( pkt [2], _offt_v6 ); 354 oc2 = `RTE_MBUF_METADATA_UINT8_PTR ( pkt [2], _offt ); 357 v6_h3 = `e_pktmbuf_mtod_offt ( pkt [3],  v6_hdr *, ( h_hdr )); 358 i( `e_be_to_u_16 (* h_o3 = ETHER_TYPE_IPv6 ) 359 oc3 = 360 `RTE_MBUF_METADATA_UINT8_PTR ( pkt [3], _offt_v6 ); 362 oc3 = `RTE_MBUF_METADATA_UINT8_PTR ( pkt [3], _offt ); 364 oc0 = `RTE_MBUF_METADATA_UINT8_PTR ( pkt [0], _offt ); 365 oc1 = `RTE_MBUF_METADATA_UINT8_PTR ( pkt [1], _offt ); 366 oc2 = `RTE_MBUF_METADATA_UINT8_PTR ( pkt [2], _offt ); 367 oc3 = `RTE_MBUF_METADATA_UINT8_PTR ( pkt [3], _offt ); 370 i(( TXRX_DEBUG > 2&& ( txrx_pkt_t_cou < 10)) { 371 `t_pkt1 ( pkt [0]); 372 txrx_pkt_t_cou ++; 373 `tf ("\nEth Typ %x, Prot %x, ETH_TYPE_ARP %x, " 375 `e_be_to_u_16 (* h_o0 ), * oc0 , ETH_TYPE_ARP , 376 ETH_TYPE_IPV4 , IP_PROTOCOL_ICMP ); 379  p_lk_ms * lk ; 381 lk = & myA -> lk_ms [ _pt_id ]; 384 ut32_t d_addr_offt0 = 385 MBUF_HDR_ROOM + ETH_HDR_SIZE + IP_HDR_DST_ADR_OFST ; 386 ut32_t * d_addr0 = 387 `RTE_MBUF_METADATA_UINT32_PTR ( pkt [0], d_addr_offt0 ); 389 i( TXRX_DEBUG > 2) 390 i( `e_be_to_u_16 (* h_o0 = ETH_TYPE_IPV4 ) 391 `tf ("%s:kIp: %x, d_addr0: %x\n", __FUNCTION__ , lk -> , * d_addr0 ); 394  `e_be_to_u_16 (* h_o0 )) { 395  ETH_TYPE_ARP : 396 `e_pe_pt_out_ck_ ( p_txrx -> p .p, 397 out_pt , pkt [0]); 398 `e_pe_ah_ck_dr ( p_txrx -> p .p, pkt_mask0 ); 401  ETH_TYPE_IPV4 : 402 i((* oc0 = IP_PROTOCOL_ICMP ) && 403 ( lk -> = `e_be_to_u_32 (* d_addr0 ))) { 404 i( `is_phy_pt_iv ( pkt [0]-> pt )) { 405 `e_pe_pt_out_ck_ ( 406 p_txrx -> p .p, out_pt , pkt [0]); 407 `e_pe_ah_ck_dr ( 408 p_txrx -> p .p, pkt_mask0 ); 414 #ifde IPV6 415  ETH_TYPE_IPV6 : 416 i(* oc0 = ICMPV6_PROTOCOL_ID ) { 417 #ide VNF_ACL 418 i(! `memcmp ( v6_h0 -> d_addr , lk -> v6 , 16) 419 || ! `memcmp ( v6_h0 -> d_addr , siced_node_mui_addr , 13)) { 421 `e_pe_pt_out_ck_ ( p_txrx -> p .p, 422 out_pt , pkt [0]); 423 `e_pe_ah_ck_dr ( p_txrx -> p .p, pkt_mask0 ); 425 #ide VNF_ACL 427 `tf ("Droppinghe IPv6kt\n"); 428 `e_pe_ah_ck_dr ( p_txrx -> p .p, pkt_mask0 ); 436 `e_pe_ah_ck_dr ( p_txrx -> p .p, pkt_mask0 ); 441 i(( TXRX_DEBUG > 2&& ( txrx_pkt_t_cou < 10)) { 442 `t_pkt1 ( pkt [1]); 443 txrx_pkt_t_cou ++; 444 `tf ("\nEth Typ %x, Prot %x, ETH_TYPE_ARP %x, " 446 `e_be_to_u_16 (* h_o1 ), * oc1 , ETH_TYPE_ARP , 447 ETH_TYPE_IPV4 , IP_PROTOCOL_ICMP ); 451 ut32_t d_addr_offt1 = 452 MBUF_HDR_ROOM + ETH_HDR_SIZE + IP_HDR_DST_ADR_OFST ; 453 ut32_t * d_addr1 = 454 `RTE_MBUF_METADATA_UINT32_PTR ( pkt [1], d_addr_offt1 ); 456 i( TXRX_DEBUG > 2) 457 i( `e_be_to_u_16 (* h_o1 = ETH_TYPE_IPV4 ) 458 `tf ("%s:kIp: %x, d_addr1: %x\n", __FUNCTION__ , lk -> , * d_addr1 ); 460  `e_be_to_u_16 (* h_o1 )) { 461  ETH_TYPE_ARP : 462 `e_pe_pt_out_ck_ ( p_txrx -> p .p, 463 out_pt , pkt [1]); 464 `e_pe_ah_ck_dr ( p_txrx -> p .p, pkt_mask1 ); 467  ETH_TYPE_IPV4 : 468 i((* oc1 = IP_PROTOCOL_ICMP ) && 469 ( lk -> = `e_be_to_u_32 (* d_addr1 ))) { 470 i( `is_phy_pt_iv ( pkt [1]-> pt )) { 471 `e_pe_pt_out_ck_ ( 472 p_txrx -> p .p, 473 out_pt , pkt [1]); 474 `e_pe_ah_ck_dr ( 475 p_txrx -> p .p, 476 pkt_mask1 ); 482 #ifde IPV6 483  ETH_TYPE_IPV6 : 484 i(* oc1 = ICMPV6_PROTOCOL_ID ) { 485 #ide VNF_ACL 486 i(! `memcmp ( v6_h1 -> d_addr , lk -> v6 , 16) 487 || ! `memcmp ( v6_h1 -> d_addr , siced_node_mui_addr , 13)) { 489 `e_pe_pt_out_ck_ ( p_txrx -> p .p, 490 out_pt , pkt [1]); 491 `e_pe_ah_ck_dr ( p_txrx -> p .p, pkt_mask1 ); 492 #ide VNF_ACL 494 `tf ("Droppinghe IPv6kt\n"); 495 `e_pe_ah_ck_dr ( p_txrx -> p .p, pkt_mask1 ); 503 `e_pe_ah_ck_dr ( p_txrx -> p .p, pkt_mask1 ); 507 i(( TXRX_DEBUG > 2&& ( txrx_pkt_t_cou < 10)) { 508 `t_pkt1 ( pkt [2]); 509 txrx_pkt_t_cou ++; 510 `tf ("\nEth Typ %x, Prot %x, ETH_TYPE_ARP %x, " 512 `e_be_to_u_16 (* h_o2 ), * oc2 , ETH_TYPE_ARP , 513 ETH_TYPE_IPV4 , IP_PROTOCOL_ICMP ); 517 ut32_t d_addr_offt2 = 518 MBUF_HDR_ROOM + ETH_HDR_SIZE + IP_HDR_DST_ADR_OFST ; 519 ut32_t * d_addr2 = 520 `RTE_MBUF_METADATA_UINT32_PTR ( pkt [2], d_addr_offt2 ); 522 i( TXRX_DEBUG > 2) 523 i( `e_be_to_u_16 (* h_o2 = ETH_TYPE_IPV4 ) 524 `tf ("%s:kIp: %x, d_addr2: %x\n", __FUNCTION__ , lk -> , * d_addr2 ); 526  `e_be_to_u_16 (* h_o2 )) { 527  ETH_TYPE_ARP : 528 `e_pe_pt_out_ck_ ( p_txrx -> p .p, 529 out_pt , pkt [2]); 530 `e_pe_ah_ck_dr ( p_txrx -> p .p, pkt_mask2 ); 533  ETH_TYPE_IPV4 : 534 i((* oc2 = IP_PROTOCOL_ICMP ) && 535 ( lk -> = `e_be_to_u_32 (* d_addr2 ))) { 536 i( `is_phy_pt_iv ( pkt [2]-> pt )) { 537 `e_pe_pt_out_ck_ ( 538 p_txrx -> p .p, 539 out_pt , pkt [2]); 540 `e_pe_ah_ck_dr ( 541 p_txrx -> p .p, 542 pkt_mask2 ); 548 #ifde IPV6 549  ETH_TYPE_IPV6 : 550 i(* oc2 = ICMPV6_PROTOCOL_ID ) { 551 #ide VNF_ACL 552 i(! `memcmp ( v6_h2 -> d_addr , lk -> v6 , 16) 553 || ! `memcmp ( v6_h2 -> d_addr , siced_node_mui_addr , 13)) { 555 `e_pe_pt_out_ck_ ( p_txrx -> p .p, 556 out_pt , pkt [2]); 557 `e_pe_ah_ck_dr ( p_txrx -> p .p, pkt_mask2 ); 558 #ide VNF_ACL 560 `tf ("Droppinghe IPv6kt\n"); 561 `e_pe_ah_ck_dr ( p_txrx -> p .p, pkt_mask2 ); 569 `e_pe_ah_ck_dr ( p_txrx -> p .p, pkt_mask2 ); 573 i(( TXRX_DEBUG > 2&& ( txrx_pkt_t_cou < 10)) { 574 `t_pkt1 ( pkt [3]); 575 txrx_pkt_t_cou ++; 576 `tf ("\nEth Typ %x, Prot %x, ETH_TYPE_ARP %x, " 578 `e_be_to_u_16 (* h_o3 ), * oc3 , ETH_TYPE_ARP , 579 ETH_TYPE_IPV4 , IP_PROTOCOL_ICMP ); 583 ut32_t d_addr_offt3 = 584 MBUF_HDR_ROOM + ETH_HDR_SIZE + IP_HDR_DST_ADR_OFST ; 585 ut32_t * d_addr3 = 586 `RTE_MBUF_METADATA_UINT32_PTR ( pkt , d_addr_offt3 ); 588 i( TXRX_DEBUG > 2) 589 i( `e_be_to_u_16 (* h_o3 = ETH_TYPE_IPV4 ) 590 `tf ("%s:kIp: %x, d_addr3: %x\n", __FUNCTION__ , lk -> , * d_addr3 ); 592  `e_be_to_u_16 (* h_o3 )) { 593  ETH_TYPE_ARP : 594 `e_pe_pt_out_ck_ ( p_txrx -> p .p, 595 out_pt , pkt [3]); 596 `e_pe_ah_ck_dr ( p_txrx -> p .p, pkt_mask3 ); 599  ETH_TYPE_IPV4 : 600 i((* oc3 = IP_PROTOCOL_ICMP ) && 601 ( lk -> = `e_be_to_u_32 (* d_addr3 ))) { 602 i( `is_phy_pt_iv ( pkt [3]-> pt )) { 603 `e_pe_pt_out_ck_ ( 604 p_txrx -> p .p, 605 out_pt , pkt [3]); 606 `e_pe_ah_ck_dr ( 607 p_txrx -> p .p, 608 pkt_mask3 ); 614 #ifde IPV6 615  ETH_TYPE_IPV6 : 616 i(* oc3 = ICMPV6_PROTOCOL_ID ) { 617 #ide VNF_ACL 618 i(! `memcmp ( v6_h3 -> d_addr , lk -> v6 , 16) 619 || ! `memcmp ( v6_h3 -> d_addr , siced_node_mui_addr , 13)) { 621 `e_pe_pt_out_ck_ ( p_txrx -> p .p, 622 out_pt , pkt [3]); 623 `e_pe_ah_ck_dr ( p_txrx -> p .p, pkt_mask3 ); 624 #ide VNF_ACL 626 `tf ("Droppinghe IPv6kt\n"); 627 `e_pe_ah_ck_dr ( p_txrx -> p .p, pkt_mask3 ); 635 `e_pe_ah_ck_dr ( p_txrx -> p .p, pkt_mask3 ); 639 p_txrx -> ivedPktCou += 4; 641 } } 643 PIPELINE_TXRX_KEY_PORT_IN_AH ( pt__ah_txrx , pkt_wk_txrx , pkt4_wk_txrx ); 645 * $pe_txrx_ ( pe_ms * ms , 646 __e_unud * g ) 648  pe * p ; 649  pe_txrx * p_ ; 650 ut32_t size , i , _pts_g_size ; 652 `tf ("Startipeline_txrx_init\n"); 655 i(( ms = NULL ) || 656 ( ms -> n_pts_ == 0) || 657 ( ms -> n_pts_out == 0)) 658  NULL ; 661 size = `RTE_CACHE_LINE_ROUNDUP (( pe_txrx )); 662 p = `e_zmloc ( NULL , size , RTE_CACHE_LINE_SIZE ); 663 p_ = ( pe_txrx *) p ; 664 i( p = NULL ) 665  NULL ; 667 `PLOG ( p , HIGH , "TXRX"); 668 `ry ( p -> me , ms ->name); 669 p -> log_v = ms ->log_level; 671 p_ -> ivedPktCou = 0; 672 p_ -> drݳdPktCou = 0; 673  i = 0; i < PIPELINE_MAX_PORT_IN ; i++) 674 p_ -> lks_m [ i ] = 0xff; 676 p_ -> pe_num = 0; 677 `tf ("txrx initialization of variables done\n"); 680 i( `pe_txrx_r_gs ( p_ , ms )) 681  NULL ; 685  e_pe_ms pe_ms = { 686 . me = "TXRX", 687 . sock_id = ms ->socket_id, 688 . offt_pt_id = 0, 691 p -> `e_pe_ (& pe_ms ); 692 i( p ->= NULL ) { 693 `e_ ( p ); 694  NULL ; 698 p -> n_pts_ = ms ->n_ports_in; 699 p -> n_pts_out = ms ->n_ports_out; 700 p -> n_bs =-> n_pts_ ; 703 _pts_g_size = 704 `RTE_CACHE_LINE_ROUNDUP (( 705 ( pe_txrx__pt_h_g )) * 706 ( ms -> n_pts_ )); 707  pe_txrx__pt_h_g * = 708 ( pe_txrx__pt_h_g *) `e_zmloc ( NULL , 709 _pts_g_size , 710 RTE_CACHE_LINE_SIZE ); 711 i( = NULL ) 712  NULL ; 714  i = 0; i < p -> n_pts_ ; i++) { 716 ( [ i ]). p = p_ ; 717 ( [ i ]). _pt_id = i; 718  e_pe_pt__ms pt_ms = { 719 . s = 720 `pe_pt__ms_g_s (& ms -> 721 pt_ [ i ]), 722 . g_ = 723 `pe_pt__ms_cvt (& ms -> 724 pt_ [ i ]), 725 . f_ai = NULL , 726 . g_ah = &( [ i ]), 727 . bur_size = ms -> pt_ [ i ].burst_size, 730 pt_ms . f_ai = pt__ah_txrx ; 732  us = `e_pe_pt__ ( p ->p, 733 & pt_ms , 734 & p -> pt__id [ i ]); 736 i( us ) { 737 `e_pe_ ( p ->p); 738 `e_ ( p ); 739  NULL ; 744  i = 0; i < p -> n_pts_out ; i++) { 745  e_pe_pt_out_ms pt_ms = { 746 . s = 747 `pe_pt_out_ms_g_s (& ms -> 748 pt_out [ i ]), 749 . g_ = 750 `pe_pt_out_ms_cvt (& ms -> 751 pt_out [ i ]), 752 . f_ai = NULL , 753 . g_ah = NULL , 756  us = `e_pe_pt_out_ ( p ->p, 757 & pt_ms , 758 & p -> pt_out_id [ i ]); 760 i( us ) { 761 `e_pe_ ( p ->p); 762 `e_ ( p ); 763  NULL ; 767  pe_num = 0; 768  us = `ssnf ( ms -> me , "PIPELINE%d", & pe_num ); 769 i( us < 0) { 770 `tf ("Unableoeadipelineumber\n"); 771  NULL ; 773 p_ -> pe_num = ( ut8_t )ipeline_num; 775 `gi_pe_Qs ( p_ -> pe_num , p ); 776 `t_lk_m ( p_ -> pe_num , p ,_-> lks_m ); 777 `t_out_id ( p_ -> pe_num , p ,_-> out_id ); 780  i = 0; i < p -> n_pts_ ; i++) { 781  e_pe_b_ms b_ms = { 782 . s = & e_b_ub_s , 783 . g_ = NULL , 784 . f_ai_h = NULL , 785 . f_ai_miss = NULL , 786 . g_ah = NULL , 787 . ai_da_size = 0, 790  us = `e_pe_b_ ( p ->p, 791 & b_ms , 792 & p -> b_id [ i ]); 794 i( us ) { 795 `e_pe_ ( p ->p); 796 `e_ ( p ); 797  NULL ; 802  i = 0; i < p -> n_pts_ ; i++) { 803  us = `e_pe_pt__c_to_b ( p ->p, 804 p -> 805 pt__id 806 [ i ], 807 p -> 808 b_id [ i ]); 810 i( us ) { 811 `e_pe_ ( p ->p); 812 `e_ ( p ); 813  NULL ; 818  i = 0; i < p -> n_pts_ ; i++) { 819  e_pe_b_y deu_y = { 820 . ai = RTE_PIPELINE_ACTION_PORT , 821 . pt_id = p -> pt_out_id [ i ], 824  e_pe_b_y * deu_y_r ; 826  us = `e_pe_b_deu_y_add ( 827 p ->p, 828 p -> 829 b_id [ i ], 830 & deu_y , 831 & deu_y_r ); 833 i( us ) { 834 `e_pe_ ( p ->p); 835 `e_ ( p ); 836  NULL ; 841  i = 0; i < p -> n_pts_ ; i++) { 842  us = `e_pe_pt__ab ( p ->p, 843 p -> pt__id [ i ]); 845 i( us ) { 846 `e_pe_ ( p ->p); 847 `e_ ( p ); 848  NULL ; 853 i( `e_pe_check ( p ->p) < 0) { 854 `e_pe_ ( p ->p); 855 `e_ ( p ); 856  NULL ; 860 p -> n_msgq = ms ->n_msgq; 861  i = 0; i < p -> n_msgq ; i++) 862 p -> msgq_ [ i ] = ms ->msgq_in[i]; 863  i = 0; i < p -> n_msgq ; i++) 864 p -> msgq_out [ i ] = ms ->msgq_out[i]; 867 `memy ( p -> hdrs , handlers, (p->handlers)); 869  p ; 870 } } 872  $pe_txrx_ (* pe ) 874  pe * p = (pipeline *)pipeline; 877 i( p = NULL ) 881 `e_pe_ ( p ->p); 882 `e_ ( p ); 884 } } 886  $pe_txrx_tim (* pe ) 888  pe * p = (pipeline *)pipeline; 890 `pe_msg_q_hd ( p ); 891 `e_pe_ush ( p ->p); 894 } } 897 $pe_txrx_ack (* pe , ut32_t pt_ , ut32_* pt_out ) 899  pe * p = (pipeline *)pipeline; 902 i(( p = NULL || ( pt_ >p-> n_pts_ || ( pt_out == NULL)) 905 * pt_out = pt_ / p -> n_pts_ ; 907 } } 909  pe_be_s gpe_txrx_be_s = { 910 . f_ = pe_txrx_ , 911 . gf_ = pe_txrx_ , 912 . gf_run = NULL , 913 . gf_tim = pe_txrx_tim , 914 . gf_ack = pe_txrx_ack , @VIL/pipeline_txrx/pipeline_txrx_be.h 17 #ide __INCLUDE_PIPELINE_TXRX_BE_H__ 18  #__INCLUDE_PIPELINE_TXRX_BE_H__ ) 20  ~"pe_comm_be.h " 21  #PIPELINE_TXRX_KEY_PORT_IN_AH ( f_ah , f_pkt_wk , f_pkt4_wk ) \ 23 `f_ah ( \ 24 __e_unud  e_pe * e_p , \ 25  e_mbuf ** pkts , \ 26 ut32_t n_pkts , \ 27 * g ) \ 29 ut32_t i , j ; \ 31  j = 0; j < n_pkts ; j++) \ 32 `e_etch0 ( pkts [ j ]); \ 34 pkt_bur_t = 0; \ 35  i = 0; i < ( n_pkts & (~0x3LLU)); i += 4) \ 36 `f_pkt4_wk (& pkts [ i ], i, g ); \ 38  ; i < n_pkts ; i++) \ 39 `f_pkt_wk ( pkts [ i ], i, g ); \ 43 } ) 45  pe_be_s pe_txrx_be_s ; 49 epe_txrx_msg_q_ty { 50 mPIPELINE_TXRX_MSG_REQ_ENTRY_DBG , 51 mPIPELINE_TXRX_MSG_REQS 56  spe_txrx_y_dbg_msg_q { 57 pe_msg_q_ty mty ; 58 pe_txrx_msg_q_ty msubty ; 61 ut8_t mda [5]; 67  spe_txrx__pt_h_g { 68  pe_txrx * mp ; 69 ut8_t m_pt_id ; 72  spe_txrx_y_dbg_msg_r { 73  mus ; @vnf_common/app.h 17 #ide __INCLUDE_APP_H__ 18  #__INCLUDE_APP_H__ ) 20  ~ 21  ~ 23  ~ 24  ~ 25  ~ 26  ~ 27  ~ 28  ~ 30  ~ 32  ~"u_ce_m.h " 33  ~"pe.h " 35  #APP_PARAM_NAME_SIZE PIPELINE_NAME_SIZE ) 36  #APP_LINK_PCI_BDF_SIZE 32 ) 37  p_lk_ms * gfd_p_lk ; 38  sp_mempo_ms { 39 * mme ; 40 ut32_t mrd ; 41 ut32_t mbufr_size ; 42 ut32_t mpo_size ; 43 ut32_t mche_size ; 44 ut32_t mu_sock_id ; 47  sp_lk_ms { 48 * mme ; 49 ut32_t mrd ; 50 ut32_t mpmd_id ; 51 ut32_t mp_q ; 52 ut32_t mt_syn_q ; 53 ut32_t m_lol_q ; 54 ut32_t mt_lol_q ; 55 ut32_t mudp_lol_q ; 56 ut32_t msp_lol_q ; 57 ut32_t me ; 58 ut32_t m ; 59 ut8_t mv6 [16]; 60 ut32_t mdth ; 61 ut32_t mdth_v6 ; 62 ut64_t mmac_addr ; 63  mpci_bdf [ APP_LINK_PCI_BDF_SIZE ]; 65  e_h_cf mcf ; 66 ut8_t momisc ; 69  sp_pktq_hwq__ms { 70 * mme ; 71 ut32_t mrd ; 72 ut32_t mmempo_id ; 73 ut32_t msize ; 74 ut32_t mbur ; 76  e_h_rxcf mcf ; 79  sp_pktq_hwq_out_ms { 80 * mme ; 81 ut32_t mrd ; 82 ut32_t msize ; 83 ut32_t mbur ; 84 ut32_t mdrss ; 85 ut64_t mn_s ; 86  e_h_txcf mcf ; 89  sp_pktq_swq_ms { 90 * mme ; 91 ut32_t mrd ; 92 ut32_t msize ; 93 ut32_t mbur_ad ; 94 ut32_t mbur_wre ; 95 ut32_t mdrss ; 96 ut64_t mn_s ; 97 ut32_t mu_sock_id ; 98 ut32_t mv4_ag ; 99 ut32_t mv6_ag ; 100 ut32_t mv4_s ; 101 ut32_t mv6_s ; 102 ut32_t mmtu ; 103 ut32_t mmada_size ; 104 ut32_t mmempo_de_id ; 105 ut32_t mmempo_de_id ; 108 #ide APP_FILE_NAME_SIZE 109  #APP_FILE_NAME_SIZE 256 ) 112 #ide APP_MAX_SCHED_SUBPORTS 113  #APP_MAX_SCHED_SUBPORTS 8 ) 116 #ide APP_MAX_SCHED_PIPES 117  #APP_MAX_SCHED_PIPES 4096 ) 120  sp_pktq_tm_ms { 121 * mme ; 122 ut32_t mrd ; 123 cڡ * mfe_me ; 124  e_sched_pt_ms msched_pt_ms ; 125  e_sched_subpt_ms 126 msched_subpt_ms [ APP_MAX_SCHED_SUBPORTS ]; 127  e_sched_pe_ms 128 msched_pe_ofes [ RTE_SCHED_PIPE_PROFILES_PER_PORT ]; 129  msched_pe_to_ofe [ APP_MAX_SCHED_SUBPORTS * APP_MAX_SCHED_PIPES ]; 130 ut32_t mbur_ad ; 131 ut32_t mbur_wre ; 134  sp_pktq_sour_ms { 135 * mme ; 136 ut32_t mrd ; 137 ut32_t mmempo_id ; 138 ut32_t mbur ; 139 * mfe_me ; 140 ut32_t mn_bys_r_pkt ; 143  sp_pktq_sk_ms { 144 * mme ; 145 ut8_t mrd ; 146 * mfe_me ; 147 ut32_t mn_pkts_to_dump ; 150  sp_msgq_ms { 151 * mme ; 152 ut32_t mrd ; 153 ut32_t msize ; 154 ut32_t mu_sock_id ; 157 ep_pktq__ty { 158 mAPP_PKTQ_IN_HWQ , 159 mAPP_PKTQ_IN_SWQ , 160 mAPP_PKTQ_IN_TM , 161 mAPP_PKTQ_IN_SOURCE , 164  sp_pktq__ms { 165 p_pktq__ty mty ; 166 ut32_t mid ; 169 ep_pktq_out_ty { 170 mAPP_PKTQ_OUT_HWQ , 171 mAPP_PKTQ_OUT_SWQ , 172 mAPP_PKTQ_OUT_TM , 173 mAPP_PKTQ_OUT_SINK , 176  sp_pktq_out_ms { 177 p_pktq_out_ty mty ; 178 ut32_t mid ; 181 #ide APP_PIPELINE_TYPE_SIZE 182  #APP_PIPELINE_TYPE_SIZE 64 ) 185  #APP_MAX_PIPELINE_PKTQ_IN PIPELINE_MAX_PORT_IN ) 186  #APP_MAX_PIPELINE_PKTQ_OUT PIPELINE_MAX_PORT_OUT ) 187  #APP_MAX_PIPELINE_MSGQ_IN PIPELINE_MAX_MSGQ_IN ) 188  #APP_MAX_PIPELINE_MSGQ_OUT PIPELINE_MAX_MSGQ_OUT ) 190  #APP_MAX_PIPELINE_ARGS PIPELINE_MAX_ARGS ) 192  sp_pe_ms { 193 * mme ; 194 ut8_t mrd ; 196  mty [ APP_PIPELINE_TYPE_SIZE ]; 198 ut32_t msock_id ; 199 ut32_t mce_id ; 200 ut32_t mhyr_th_id ; 202  p_pktq__ms mpktq_ [ APP_MAX_PIPELINE_PKTQ_IN ]; 203  p_pktq_out_ms mpktq_out [ APP_MAX_PIPELINE_PKTQ_OUT ]; 204 ut32_t mmsgq_ [ APP_MAX_PIPELINE_MSGQ_IN ]; 205 ut32_t mmsgq_out [ APP_MAX_PIPELINE_MSGQ_OUT ]; 207 ut32_t mn_pktq_ ; 208 ut32_t mn_pktq_out ; 209 ut32_t mn_msgq_ ; 210 ut32_t mn_msgq_out ; 212 ut32_t mtim_riod ; 214 * mgs_me [ APP_MAX_PIPELINE_ARGS ]; 215 * mgs_vue [ APP_MAX_PIPELINE_ARGS ]; 216 ut32_t mn_gs ; 219  sp_pe_da { 220 * mbe ; 221 * m ; 222  pe_ty * my ; 223 ut64_t mtim_riod ; 224 ut32_t mabd ; 227  sp_thad_pe_da { 228 ut32_t mpe_id ; 229 * mbe ; 230 pe_be__run mf_run ; 231 pe_be__tim mf_tim ; 232 ut64_t mtim_riod ; 233 ut64_t mddle ; 236 #ide APP_MAX_THREAD_PIPELINES 237  #APP_MAX_THREAD_PIPELINES 32 ) 240 #ide APP_THREAD_TIMER_PERIOD 241  #APP_THREAD_TIMER_PERIOD 1 ) 244  sp_thad_da { 245  p_thad_pe_da mgur [ APP_MAX_THREAD_PIPELINES ]; 246  p_thad_pe_da mcuom [ APP_MAX_THREAD_PIPELINES ]; 248 ut32_t mn_gur ; 249 ut32_t mn_cuom ; 251 ut64_t mtim_riod ; 252 ut64_t mthad_q_ddle ; 254 ut64_t mddle ; 256  e_rg * mmsgq_ ; 257  e_rg * mmsgq_out ; 259 ut64_t mhdroom_time ; 260 ut64_t mhdroom_cyes ; 261  mhdroom_tio ; 264 #ide APP_MAX_LINKS 265  #APP_MAX_LINKS 32 ) 268  sp_l_ms { 270 * mcem ; 273 ut32_t mma_lce_e ; 274 ut32_t mma_lce ; 277 ut32_t mchls_e ; 278 ut32_t mchls ; 281 ut32_t mmemy_e ; 282 ut32_t mmemy ; 285 ut32_t mnks_e ; 286 ut32_t mnks ; 289 * mpci_bckli [ APP_MAX_LINKS ]; 292 * mpci_whi [ APP_MAX_LINKS ]; 295 * mvdev [ APP_MAX_LINKS ]; 298 ut32_t mvmwe_tsc_m_e ; 299  mvmwe_tsc_m ; 302 * moc_ty ; 305 * msyog ; 308 ut32_t mlog_v_e ; 309 ut32_t mlog_v ; 312 ut32_t mvsi_e ; 313  mvsi ; 316 ut32_t mhp_e ; 317  mhp ; 320 ut32_t mno_huge_e ; 321  mno_huge ; 324 ut32_t mno_pci_e ; 325  mno_pci ; 328 ut32_t mno_ht_e ; 329  mno_ht ; 332 ut32_t mno_shcf_e ; 333  mno_shcf ; 336 * madd_driv ; 339 * msock_mem ; 342 * mhuge_d ; 345 * mfe_efix ; 348 * mba_vddr ; 351 ut32_t m_uio_dev_e ; 352  m_uio_dev ; 355 * mvfio_ ; 358 ut32_t mx_dom0_e ; 359  mx_dom0 ; 362 #ide APP_APPNAME_SIZE 363  #APP_APPNAME_SIZE 256 ) 366 #ide APP_MAX_MEMPOOLS 367  #APP_MAX_MEMPOOLS 8 ) 370 #ide APP_LINK_MAX_HWQ_IN 371  #APP_LINK_MAX_HWQ_IN 64 ) 374 #ide APP_LINK_MAX_HWQ_OUT 375  #APP_LINK_MAX_HWQ_OUT 64 ) 378  #APP_MAX_HWQ_IN ( APP_MAX_LINKS * APP_LINK_MAX_HWQ_IN ) ) 380  #APP_MAX_HWQ_OUT ( APP_MAX_LINKS * APP_LINK_MAX_HWQ_OUT ) ) 382 #ide APP_MAX_PKTQ_SWQ 383  #APP_MAX_PKTQ_SWQ 256 ) 386  #APP_MAX_PKTQ_TM APP_MAX_LINKS ) 388 #ide APP_MAX_PKTQ_SOURCE 389  #APP_MAX_PKTQ_SOURCE 32 ) 392 #ide APP_MAX_PKTQ_SINK 393  #APP_MAX_PKTQ_SINK 32 ) 396 #ide APP_MAX_MSGQ 397  #APP_MAX_MSGQ 128 ) 400 #ide APP_MAX_PIPELINES 401  #APP_MAX_PIPELINES 64 ) 404 #ide APP_EAL_ARGC 405  #APP_EAL_ARGC 32 ) 408 #ide APP_MAX_PIPELINE_TYPES 409  #APP_MAX_PIPELINE_TYPES 64 ) 412 #ide APP_MAX_THREADS 413  #APP_MAX_THREADS RTE_MAX_LCORE ) 416 #ide APP_MAX_CMDS 417  #APP_MAX_CMDS 128 ) 420 #ide APP_THREAD_HEADROOM_STATS_COLLECT 421  #APP_THREAD_HEADROOM_STATS_COLLECT 1 ) 424 ut8_t gab_hwlb ; 425 ut8_t gab_ow_d ; 427  #APP_CORE_MASK_SIZE \ 428 ( RTE_MAX_LCORE / 64 + ((RTE_MAX_LCORE % 64? 1 : 0)) ) 430  sp_ms { 432  mp_me [ APP_APPNAME_SIZE ]; 433 cڡ * mcfig_fe ; 434 cڡ * mst_fe ; 435 cڡ * mrr_fe ; 436 cڡ * mouut_fe ; 437 cڡ * mroc ; 438 cڡ * mroc_gs ; 439 ut64_t mpt_mask ; 440 ut32_t mlog_v ; 442  p_l_ms ml_ms ; 443  p_mempo_ms mmempo_ms [ APP_MAX_MEMPOOLS ]; 444  p_lk_ms mlk_ms [ APP_MAX_LINKS ]; 445  p_pktq_hwq__ms mhwq__ms [ APP_MAX_HWQ_IN ]; 446  p_pktq_hwq_out_ms mhwq_out_ms [ APP_MAX_HWQ_OUT ]; 447  p_pktq_swq_ms mswq_ms [ APP_MAX_PKTQ_SWQ ]; 448  p_pktq_tm_ms mtm_ms [ APP_MAX_PKTQ_TM ]; 449  p_pktq_sour_ms msour_ms [ APP_MAX_PKTQ_SOURCE ]; 450  p_pktq_sk_ms msk_ms [ APP_MAX_PKTQ_SINK ]; 451  p_msgq_ms mmsgq_ms [ APP_MAX_MSGQ ]; 452  p_pe_ms mpe_ms [ APP_MAX_PIPELINES ]; 454 ut32_t mn_mempos ; 455 ut32_t mn_lks ; 456 ut32_t mn_pktq_hwq_ ; 457 ut32_t mn_pktq_hwq_out ; 458 ut32_t mn_pktq_swq ; 459 ut32_t mn_pktq_tm ; 460 ut32_t mn_pktq_sour ; 461 ut32_t mn_pktq_sk ; 462 ut32_t mn_msgq ; 463 ut32_t mn_pes ; 465 ut32_t mhd_csum_q ; 466 ut32_t mn_hwlb_q ; 468 * ml_gv [1 + APP_EAL_ARGC ]; 469  u_ce_m * mce_m ; 470 ut64_t mce_mask [ APP_CORE_MASK_SIZE ]; 471  e_mempo * mmempo [ APP_MAX_MEMPOOLS ]; 472  e_rg * mswq [ APP_MAX_PKTQ_SWQ ]; 473  e_sched_pt * mtm [ APP_MAX_PKTQ_TM ]; 474  e_rg * mmsgq [ APP_MAX_MSGQ ]; 475  pe_ty mpe_ty [ APP_MAX_PIPELINE_TYPES ]; 476  p_pe_da mpe_da [ APP_MAX_PIPELINES ]; 477  p_thad_da mthad_da [ APP_MAX_THREADS ]; 478 cmdle_r_x_t mcmds [ APP_MAX_CMDS + 1]; 480  ml_gc ; 481 ut32_t mn_pe_tys ; 482 ut32_t mn_cmds ; 485  #APP_PARAM_VALID ( obj ((obj)-> me ! NULL ) ) 487  #APP_PARAM_COUNT ( obj_y , n_objs ) \ 489 size_t i ; \ 491 n_objs = 0; \ 492  i = 0; i < `RTE_DIM ( obj_y ); i++) \ 493 i( `APP_PARAM_VALID (&(( obj_y )[ i ]))) \ 494 n_objs ++; \ 495 } ) 497  #APP_PARAM_FIND ( obj_y , key ) \ 499 ssize_t obj_idx ; \ 500 cڡ ssize_t obj_cou = `RTE_DIM ( obj_y ); \ 502  obj_idx = 0; obj_idx < obj_cou ; obj_idx++) { \ 503 i(! `APP_PARAM_VALID (&(( obj_y )[ obj_idx ]))) \ 506 i( `rcmp ( key , ( obj_y )[ obj_idx ]. me ) == 0) \ 509 obj_idx < obj_cou ? obj_idx : - ENOENT ; \ 510 }) ) 512  #APP_PARAM_FIND_BY_ID ( obj_y , efix , id , obj ) \ 514  me [ APP_PARAM_NAME_SIZE ]; \ 515 ssize_t pos ; \ 517 `rtf ( me , efix "%" PRIu32 , id ); \ 518 pos = `APP_PARAM_FIND ( obj_y , me ); \ 519 obj = ( pos < 0? NULL : &(( obj_y )[pos]); \ 520 } 0) ) 522  #APP_PARAM_GET_ID ( obj , efix , id ) \ 524 `ssnf ( obj -> me , efix "%" SCNu32 , & id ); \ 526 ) 527  #APP_PARAM_ADD ( obj_y , obj_me ) \ 529 ssize_t obj_idx ; \ 530 cڡ ssize_t obj_cou = `RTE_DIM ( obj_y ); \ 532 obj_idx = `APP_PARAM_FIND ( obj_y , obj_me ); \ 533 i( obj_idx < 0) { \ 534  obj_idx = 0; obj_idx < obj_cou ; obj_idx++) { \ 535 i(! `APP_PARAM_VALID (&(( obj_y )[ obj_idx ]))) \ 539 i( obj_idx < obj_cou ) { \ 540 ( obj_y )[ obj_idx ]. me = `rdup ( obj_me ); \ 541 i(( obj_y )[ obj_idx ]. me = NULL ) \ 542 obj_idx = - EINVAL ; \ 544 obj_idx = - ENOMEM ; \ 546 obj_idx ; \ 547 }) ) 549  #APP_CHECK ( exp , fmt , ...) \ 551 i(!( exp )) { \ 552 `rtf ( dr , fmt "\n", ## __VA_ARGS__ ); \ 553 `abt (); \ 555 } 0) ) 557 ep_log_v { 558 mAPP_LOG_LEVEL_HIGH = 1, 559 mAPP_LOG_LEVEL_LOW , 560 mAPP_LOG_LEVELS 563  #APP_LOG ( p , v , fmt , ...) \ 565 i( p -> log_v > APP_LOG_LEVEL_ ## v ) \ 566 `rtf ( dout , "[APP] " fmt "\n", ## __VA_ARGS__ ); \ 567 } 0) ) 569  le ut32_t 570 $p_lk_g_n_rxq ( p_ms * p ,  p_lk_ms * lk ) 572 ut32_t n_rxq = 0, lk_id , i ; 573 ut32_t n_pktq_hwq_ = `RTE_MIN ( p ->n_pktq_hwq_in, 574 `RTE_DIM ( p -> hwq__ms )); 576 `APP_PARAM_GET_ID ( lk , "LINK", lk_id ); 578  i = 0; i < n_pktq_hwq_ ; i++) { 579  p_pktq_hwq__ms * p = & p -> hwq__ms [ i ]; 580 ut32_t rxq_lk_id , rxq_queue_id ; 582 `ssnf ( p -> me , "RXQ%" SCNu32 ".%" SCNu32, 583 & rxq_lk_id , & rxq_queue_id ); 584 i( rxq_lk_id = lk_id ) 585 n_rxq ++; 588  n_rxq ; 589 } } 591  le ut32_t 592 $p_lk_g_n_txq ( p_ms * p ,  p_lk_ms * lk ) 594 ut32_t n_txq = 0, lk_id , i ; 595 ut32_t n_pktq_hwq_out = `RTE_MIN ( p ->n_pktq_hwq_out, 596 `RTE_DIM ( p -> hwq_out_ms )); 598 `APP_PARAM_GET_ID ( lk , "LINK", lk_id ); 600  i = 0; i < n_pktq_hwq_out ; i++) { 601  p_pktq_hwq_out_ms * p = & p -> hwq_out_ms [ i ]; 602 ut32_t txq_lk_id , txq_queue_id ; 604 `ssnf ( p -> me , "TXQ%" SCNu32 ".%" SCNu32, 605 & txq_lk_id , & txq_queue_id ); 606 i( txq_lk_id = lk_id ) 607 n_txq ++; 610  n_txq ; 611 } } 613  le ut32_t 614 $p_rxq_g_ads ( p_ms * p ,  p_pktq_hwq__ms * rxq ) 616 ut32_t pos = rxq - p -> hwq__ms ; 617 ut32_t n_pes = `RTE_MIN ( p ->n_pipelines, 618 `RTE_DIM ( p -> pe_ms )); 619 ut32_t n_ads = 0, i ; 621  i = 0; i < n_pes ; i++) { 622  p_pe_ms * p = & p -> pe_ms [ i ]; 623 ut32_t n_pktq_ = `RTE_MIN ( p ->n_pktq_, `RTE_DIM -> pktq_ )); 624 ut32_t j ; 626  j = 0; j < n_pktq_ ; j++) { 627  p_pktq__ms * pktq = & p -> pktq_ [ j ]; 629 i(( pktq -> ty = APP_PKTQ_IN_HWQ ) && 630 ( pktq -> id = pos )) 631 n_ads ++; 635  n_ads ; 636 } } 638  le ut32_t 639 $p_swq_g_ads ( p_ms * p ,  p_pktq_swq_ms * swq ) 641 ut32_t pos = swq - p -> swq_ms ; 642 ut32_t n_pes = `RTE_MIN ( p ->n_pipelines, 643 `RTE_DIM ( p -> pe_ms )); 644 ut32_t n_ads = 0, i ; 646  i = 0; i < n_pes ; i++) { 647  p_pe_ms * p = & p -> pe_ms [ i ]; 648 ut32_t n_pktq_ = `RTE_MIN ( p ->n_pktq_, `RTE_DIM -> pktq_ )); 649 ut32_t j ; 651  j = 0; j < n_pktq_ ; j++) { 652  p_pktq__ms * pktq = & p -> pktq_ [ j ]; 654 i(( pktq -> ty = APP_PKTQ_IN_SWQ ) && 655 ( pktq -> id = pos )) 656 n_ads ++; 660  n_ads ; 661 } } 663  le ut32_t 664 $p_tm_g_ads ( p_ms * p ,  p_pktq_tm_ms * tm ) 666 ut32_t pos = tm - p -> tm_ms ; 667 ut32_t n_pes = `RTE_MIN ( p ->n_pipelines, 668 `RTE_DIM ( p -> pe_ms )); 669 ut32_t n_ads = 0, i ; 671  i = 0; i < n_pes ; i++) { 672  p_pe_ms * p = & p -> pe_ms [ i ]; 673 ut32_t n_pktq_ = `RTE_MIN ( p ->n_pktq_, `RTE_DIM -> pktq_ )); 674 ut32_t j ; 676  j = 0; j < n_pktq_ ; j++) { 677  p_pktq__ms * pktq = & p -> pktq_ [ j ]; 679 i(( pktq -> ty = APP_PKTQ_IN_TM ) && 680 ( pktq -> id = pos )) 681 n_ads ++; 685  n_ads ; 686 } } 688  le ut32_t 689 $p_sour_g_ads ( p_ms * p , 690  p_pktq_sour_ms * sour ) 692 ut32_t pos = sour - p -> sour_ms ; 693 ut32_t n_pes = `RTE_MIN ( p ->n_pipelines, 694 `RTE_DIM ( p -> pe_ms )); 695 ut32_t n_ads = 0, i ; 697  i = 0; i < n_pes ; i++) { 698  p_pe_ms * p = & p -> pe_ms [ i ]; 699 ut32_t n_pktq_ = `RTE_MIN ( p ->n_pktq_, `RTE_DIM -> pktq_ )); 700 ut32_t j ; 702  j = 0; j < n_pktq_ ; j++) { 703  p_pktq__ms * pktq = & p -> pktq_ [ j ]; 705 i(( pktq -> ty = APP_PKTQ_IN_SOURCE ) && 706 ( pktq -> id = pos )) 707 n_ads ++; 711  n_ads ; 712 } } 714  le ut32_t 715 $p_msgq_g_ads ( p_ms * p ,  p_msgq_ms * msgq ) 717 ut32_t pos = msgq - p -> msgq_ms ; 718 ut32_t n_pes = `RTE_MIN ( p ->n_pipelines, 719 `RTE_DIM ( p -> pe_ms )); 720 ut32_t n_ads = 0, i ; 722  i = 0; i < n_pes ; i++) { 723  p_pe_ms * p = & p -> pe_ms [ i ]; 724 ut32_t n_msgq_ = `RTE_MIN ( p ->n_msgq_, `RTE_DIM -> msgq_ )); 725 ut32_t j ; 727  j = 0; j < n_msgq_ ; j++) 728 i( p -> msgq_ [ j ] = pos ) 729 n_ads ++; 732  n_ads ; 733 } } 735  le ut32_t 736 $p_txq_g_wrs ( p_ms * p ,  p_pktq_hwq_out_ms * txq ) 738 ut32_t pos = txq - p -> hwq_out_ms ; 739 ut32_t n_pes = `RTE_MIN ( p ->n_pipelines, 740 `RTE_DIM ( p -> pe_ms )); 741 ut32_t n_wrs = 0, i ; 743  i = 0; i < n_pes ; i++) { 744  p_pe_ms * p = & p -> pe_ms [ i ]; 745 ut32_t n_pktq_out = `RTE_MIN ( p ->n_pktq_out, 746 `RTE_DIM ( p -> pktq_out )); 747 ut32_t j ; 749  j = 0; j < n_pktq_out ; j++) { 750  p_pktq_out_ms * pktq = & p -> pktq_out [ j ]; 752 i(( pktq -> ty = APP_PKTQ_OUT_HWQ ) && 753 ( pktq -> id = pos )) 754 n_wrs ++; 758  n_wrs ; 759 } } 761  le ut32_t 762 $p_swq_g_wrs ( p_ms * p ,  p_pktq_swq_ms * swq ) 764 ut32_t pos = swq - p -> swq_ms ; 765 ut32_t n_pes = `RTE_MIN ( p ->n_pipelines, 766 `RTE_DIM ( p -> pe_ms )); 767 ut32_t n_wrs = 0, i ; 769  i = 0; i < n_pes ; i++) { 770  p_pe_ms * p = & p -> pe_ms [ i ]; 771 ut32_t n_pktq_out = `RTE_MIN ( p ->n_pktq_out, 772 `RTE_DIM ( p -> pktq_out )); 773 ut32_t j ; 775  j = 0; j < n_pktq_out ; j++) { 776  p_pktq_out_ms * pktq = & p -> pktq_out [ j ]; 778 i(( pktq -> ty = APP_PKTQ_OUT_SWQ ) && 779 ( pktq -> id = pos )) 780 n_wrs ++; 784  n_wrs ; 785 } } 787  le ut32_t 788 $p_tm_g_wrs ( p_ms * p ,  p_pktq_tm_ms * tm ) 790 ut32_t pos = tm - p -> tm_ms ; 791 ut32_t n_pes = `RTE_MIN ( p ->n_pipelines, 792 `RTE_DIM ( p -> pe_ms )); 793 ut32_t n_wrs = 0, i ; 795  i = 0; i < n_pes ; i++) { 796  p_pe_ms * p = & p -> pe_ms [ i ]; 797 ut32_t n_pktq_out = `RTE_MIN ( p ->n_pktq_out, 798 `RTE_DIM ( p -> pktq_out )); 799 ut32_t j ; 801  j = 0; j < n_pktq_out ; j++) { 802  p_pktq_out_ms * pktq = & p -> pktq_out [ j ]; 804 i(( pktq -> ty = APP_PKTQ_OUT_TM ) && 805 ( pktq -> id = pos )) 806 n_wrs ++; 810  n_wrs ; 811 } } 813  le ut32_t 814 $p_sk_g_wrs ( p_ms * p ,  p_pktq_sk_ms * sk ) 816 ut32_t pos = sk - p -> sk_ms ; 817 ut32_t n_pes = `RTE_MIN ( p ->n_pipelines, 818 `RTE_DIM ( p -> pe_ms )); 819 ut32_t n_wrs = 0, i ; 821  i = 0; i < n_pes ; i++) { 822  p_pe_ms * p = & p -> pe_ms [ i ]; 823 ut32_t n_pktq_out = `RTE_MIN ( p ->n_pktq_out, 824 `RTE_DIM ( p -> pktq_out )); 825 ut32_t j ; 827  j = 0; j < n_pktq_out ; j++) { 828  p_pktq_out_ms * pktq = & p -> pktq_out [ j ]; 830 i(( pktq -> ty = APP_PKTQ_OUT_SINK ) && 831 ( pktq -> id = pos )) 832 n_wrs ++; 836  n_wrs ; 837 } } 839  le ut32_t 840 $p_ce_is_abd ( p_ms * p , ut32_t lce_id ) { 841 ( p -> ce_mask [ lce_id / 64] & 842 (1LLU << ( lce_id % 64))); 843 } } 845  le  846 $p_ce_ab__ce_mask ( p_ms * p ,  lce_id ) { 847 p -> ce_mask [ lce_id / 64] |= 1LLU << (lcore_id % 64); 849 } } 851  le  852 $p_ce_bud_ce_mask_rg ( p_ms * p ,  853 * mask_bufr ) { 854  i ; 856 mask_bufr [0] = '\0'; 857  i = () `RTE_DIM ( p -> ce_mask ); i > 0; i--) { 859  bufr [(64 / 8) * 2 + 1]; 860 `memt ( bufr , 0, (buffer)); 861 `tf ( bufr , (bufr), "%016" PRIx64 , 862 p -> ce_mask [ i -1]); 863 `rt ( mask_bufr , bufr ); 865 } } 867  le ut32_t 868 $p_msgq_g_wrs ( p_ms * p ,  p_msgq_ms * msgq ) 870 ut32_t pos = msgq - p -> msgq_ms ; 871 ut32_t n_pes = `RTE_MIN ( p ->n_pipelines, 872 `RTE_DIM ( p -> pe_ms )); 873 ut32_t n_wrs = 0, i ; 875  i = 0; i < n_pes ; i++) { 876  p_pe_ms * p = & p -> pe_ms [ i ]; 877 ut32_t n_msgq_out = `RTE_MIN ( p ->n_msgq_out, 878 `RTE_DIM ( p -> msgq_out )); 879 ut32_t j ; 881  j = 0; j < n_msgq_out ; j++) 882 i( p -> msgq_out [ j ] = pos ) 883 n_wrs ++; 886  n_wrs ; 887 } } 889  le  p_lk_ms * 890 $p_g_lk_f_rxq ( p_ms * p ,  p_pktq_hwq__ms * p ) 892  lk_me [ APP_PARAM_NAME_SIZE ]; 893 ssize_t lk_m_idx ; 894 ut32_t rxq_lk_id , rxq_queue_id ; 896 `ssnf ( p -> me , "RXQ%" SCNu32 ".%" SCNu32, 897 & rxq_lk_id , & rxq_queue_id ); 898 `rtf ( lk_me , "LINK%" PRIu32 , rxq_lk_id ); 899 lk_m_idx = `APP_PARAM_FIND ( p -> lk_ms , lk_me ); 900 `APP_CHECK (( lk_m_idx >= 0), 901 "Cn fd %f %s", lk_me , p -> me ); 903  & p -> lk_ms [ lk_m_idx ]; 904 } } 906  le  p_lk_ms * 907 $p_g_lk_f_txq ( p_ms * p ,  p_pktq_hwq_out_ms * p ) 909  lk_me [ APP_PARAM_NAME_SIZE ]; 910 ssize_t lk_m_idx ; 911 ut32_t txq_lk_id , txq_queue_id ; 913 `ssnf ( p -> me , "TXQ%" SCNu32 ".%" SCNu32, 914 & txq_lk_id , & txq_queue_id ); 915 `rtf ( lk_me , "LINK%" PRIu32 , txq_lk_id ); 916 lk_m_idx = `APP_PARAM_FIND ( p -> lk_ms , lk_me ); 917 `APP_CHECK (( lk_m_idx >= 0), 918 "Cn fd %f %s", lk_me , p -> me ); 920  & p -> lk_ms [ lk_m_idx ]; 921 } } 923  le  p_lk_ms * 924 $p_g_lk_f_tm ( p_ms * p ,  p_pktq_tm_ms * p_tm ) 926  lk_me [ APP_PARAM_NAME_SIZE ]; 927 ut32_t lk_id ; 928 ssize_t lk_m_idx ; 930 `ssnf ( p_tm -> me , "TM%" PRIu32 , & lk_id ); 931 `rtf ( lk_me , "LINK%" PRIu32 , lk_id ); 932 lk_m_idx = `APP_PARAM_FIND ( p -> lk_ms , lk_me ); 933 `APP_CHECK (( lk_m_idx >= 0), 934 "Cn fd %f %s", lk_me , p_tm -> me ); 936  & p -> lk_ms [ lk_m_idx ]; 937 } } 939  p_cfig_ ( p_ms * p ); 941  p_cfig_gs ( p_ms * p , 942  gc , ** gv ); 944  p_cfig_roc ( p_ms * p ); 946  p_cfig_r ( p_ms * p , 947 cڡ * fe_me ); 949  p_cfig_r_tm ( p_ms * p ); 951  p_cfig_ve ( p_ms * p , 952 cڡ * fe_me ); 954  p_cfig_check ( p_ms * p ); 956  p_ ( p_ms * p ); 958  p_thad (* g ); 960  p_pe_ty_gi ( p_ms * p , 961  pe_ty * y ); 963  pe_ty * p_pe_ty_fd ( p_ms * p , 964 * me ); 966  p_lk_up_ ( p_ms * p , 967  p_lk_ms * ); 969  p_lk_down_ ( p_ms * p , 970  p_lk_ms * ); @vnf_common/config_check.c 17  ~ 19  ~ 21  ~"p.h " 23 ut8_t gg_n_hwq_ ; 25 $check_mempos ( p_ms * p ) 27 ut32_t i ; 29  i = 0; i < p -> n_mempos ; i++) { 30  p_mempo_ms * p = & p -> mempo_ms [ i ]; 32 `APP_CHECK (( p -> po_size > 0), 33 "Mempo %sizi0\n", p -> me ); 35 `APP_CHECK (( p -> che_size > 0), 36 "Mempo %chsizi0\n", p -> me ); 38 `APP_CHECK ( `e_is_pow_of_2 ( p -> che_size ), 39 "Mempo %chsiznهow o2\n", p -> me ); 41 } } 44 $check_lks ( p_ms * p ) 46 ut32_t i ; 49 i( p -> pt_mask ) { 50 ut32_t n_lks_pt_mask = 51 `__but_pcou ( p -> pt_mask ); 53 `APP_CHECK (( p -> n_lks = n_lks_pt_mask ), 57  i = 0; i < p -> n_lks ; i++) { 58  p_lk_ms * lk = & p -> lk_ms [ i ]; 59 ut32_t rxq_max , n_rxq , n_txq , lk_id , i ; 61 `APP_PARAM_GET_ID ( lk , "LINK", lk_id ); 64 rxq_max = 0; 65 i( lk -> p_q > rxq_max ) 66 rxq_max = lk -> p_q ; 67 i( lk -> t_syn_q > rxq_max ) 68 rxq_max = lk -> t_syn_q ; 69 i( lk -> _lol_q > rxq_max ) 70 rxq_max = lk -> _lol_q ; 71 i( lk -> t_lol_q > rxq_max ) 72 rxq_max = lk -> t_lol_q ; 73 i( lk -> udp_lol_q > rxq_max ) 74 rxq_max = lk -> udp_lol_q ; 75 i( lk -> sp_lol_q > rxq_max ) 76 rxq_max = lk -> sp_lol_q ; 78 if( ab_hwlb || ab_ow_d ){ 79 g_n_hwq_ = p -> n_hwlb_q ; 80 rxq_max = ( g_n_hwq_ - 1); 81  i = g_n_hwq_ ; i < rxq_max ; i++) 82 `APP_CHECK ((( lk -> p_q = i ) || 83 ( lk -> t_syn_q = i ) || 84 ( lk -> _lol_q = i ) || 85 ( lk -> t_lol_q = i ) || 86 ( lk -> udp_lol_q = i ) || 87 ( lk -> sp_lol_q = i )), 88 "%RXQn ctiguou(A)\n", lk -> me ); 92  i = 1; i < rxq_max ; i++) 93 `APP_CHECK ((( lk -> p_q = i ) || 94 ( lk -> t_syn_q = i ) || 95 ( lk -> _lol_q = i ) || 96 ( lk -> t_lol_q = i ) || 97 ( lk -> udp_lol_q = i ) || 98 ( lk -> sp_lol_q = i )), 99 "%RXQn ctiguou(A)\n", lk -> me ); 101 n_rxq = `p_lk_g_n_rxq ( p , lk ); 103 `APP_CHECK (( n_rxq ), "%d۠n havy RXQ\n", lk -> me ); 104 `tf ("n_rxq = %d\n", n_rxq ); 105 `tf ("rxq_max = %d\n", rxq_max ); 109  i = 0; i < n_rxq ; i++) { 110  me [ APP_PARAM_NAME_SIZE ]; 111  pos ; 113 `rtf ( me , "RXQ%" PRIu32 ".%" PRIu32, 114 lk_id , i ); 115 pos = `APP_PARAM_FIND ( p -> hwq__ms , me ); 116 `APP_CHECK (( pos >= 0), 117 "%RXQn ctiguou(C)\n", lk -> me ); 121 n_txq = `p_lk_g_n_txq ( p , lk ); 123 `APP_CHECK (( n_txq ), "%d۠n havy TXQ\n", lk -> me ); 125  i = 0; i < n_txq ; i++) { 126  me [ APP_PARAM_NAME_SIZE ]; 127  pos ; 129 `rtf ( me , "TXQ%" PRIu32 ".%" PRIu32, 130 lk_id , i ); 131 pos = `APP_PARAM_FIND ( p -> hwq_out_ms , me ); 132 `APP_CHECK (( pos >= 0), 133 "%TXQn ctiguous\n", lk -> me ); 136 } } 139 $check_rxqs ( p_ms * p ) 141 ut32_t i ; 143  i = 0; i < p -> n_pktq_hwq_ ; i++) { 144  p_pktq_hwq__ms * p = & p -> hwq__ms [ i ]; 145 ut32_t n_ads = `p_rxq_g_ads ( p , p ); 147 `APP_CHECK (( p -> size > 0), 148 "%sizi0\n", p -> me ); 150 `APP_CHECK (( `e_is_pow_of_2 ( p -> size )), 151 "%sizinهow o2\n", p -> me ); 153 `APP_CHECK (( p -> bur > 0), 154 "%bur sizi0\n", p -> me ); 156 `APP_CHECK (( p -> bur size ), 157 "%bur sizibiggh itsize\n", p -> me ); 159 `APP_CHECK (( n_ads != 0), 160 "%hanػad\n", p -> me ); 162 `APP_CHECK (( n_ads == 1), 163 "%hamܐth oÄd\n", p -> me ); 165 } } 168 $check_txqs ( p_ms * p ) 170 ut32_t i ; 172  i = 0; i < p -> n_pktq_hwq_out ; i++) { 173  p_pktq_hwq_out_ms * p = & p -> hwq_out_ms [ i ]; 174 ut32_t n_wrs = `p_txq_g_wrs ( p , p ); 176 `APP_CHECK (( p -> size > 0), 177 "%sizi0\n", p -> me ); 179 `APP_CHECK (( `e_is_pow_of_2 ( p -> size )), 180 "%sizinهow o2\n", p -> me ); 182 `APP_CHECK (( p -> bur > 0), 183 "%bur sizi0\n", p -> me ); 185 `APP_CHECK (( p -> bur size ), 186 "%bur sizibiggh itsize\n", p -> me ); 188 `APP_CHECK (( n_wrs != 0), 189 "%hanwr\n", p -> me ); 191 `APP_CHECK (( n_wrs == 1), 192 "%hamܐth o wr\n", p -> me ); 194 } } 197 $check_swqs ( p_ms * p ) 199 ut32_t i ; 201  i = 0; i < p -> n_pktq_swq ; i++) { 202  p_pktq_swq_ms * p = & p -> swq_ms [ i ]; 203 ut32_t n_ads = `p_swq_g_ads ( p , p ); 204 ut32_t n_wrs = `p_swq_g_wrs ( p , p ); 205 ut32_t n_ags ; 207 `APP_CHECK (( p -> size > 0), 208 "%sizi0\n", p -> me ); 210 `APP_CHECK (( `e_is_pow_of_2 ( p -> size )), 211 "%sizinهow o2\n", p -> me ); 213 `APP_CHECK (( p -> bur_ad > 0), 214 "%ad bur sizi0\n", p -> me ); 216 `APP_CHECK (( p -> bur_ad size ), 218 p -> me ); 220 `APP_CHECK (( p -> bur_wre > 0), 221 "%wrbur sizi0\n", p -> me ); 223 `APP_CHECK (( p -> bur_wre size ), 225 p -> me ); 227 `APP_CHECK (( n_ads != 0), 228 "%hanػad\n", p -> me ); 230 i( n_ads > 1) 231 `APP_LOG ( p , LOW , "%hamܐth oÄd", p -> me ); 233 `APP_CHECK (( n_wrs != 0), 234 "%hanwr\n", p -> me ); 236 i( n_wrs > 1) 237 `APP_LOG ( p , LOW , "%hamܐth o wr", p -> me ); 239 n_ags = p -> v4_ag +-> v6_ag +-> v4_s +-> v6_s ; 241 `APP_CHECK (( n_ags < 2), 243 p -> me ); 245 `APP_CHECK ((!(( n_ads > 1&& ( n_ags == 1))), 248 p -> me ); 250 `APP_CHECK ((!(( n_wrs > 1&& ( n_ags == 1))), 253 p -> me ); 255 n_ags = p -> v4_s +-> v6_s ; 257 `APP_CHECK ((!(( p -> drss =1&& ( n_ags == 1))), 258 "%hadrswhsmbly modabd\n", p -> me ); 260 n_ags = p -> v4_ag +-> v6_ag ; 262 i( n_ags == 1) { 263 ut16_t _hdr_size = ( p -> v4_ag ? ( v4_hdr ) : 264 ( v6_hdr ); 266 `APP_CHECK (( p -> mtu > _hdr_size ), 267 "%mtu sizism˸th ihd\n", p -> me ); 269 `APP_CHECK ((!(( p -> mtu - _hdr_size ) % 8)), 270 "%mtu sizicܻ\n", p -> me ); 273 } } 276 $check_tms ( p_ms * p ) 278 ut32_t i ; 280  i = 0; i < p -> n_pktq_tm ; i++) { 281  p_pktq_tm_ms * p = & p -> tm_ms [ i ]; 282 ut32_t n_ads = `p_tm_g_ads ( p , p ); 283 ut32_t n_wrs = `p_tm_g_wrs ( p , p ); 285 `APP_CHECK (( n_ads != 0), 286 "%hanػad\n", p -> me ); 288 `APP_CHECK (( n_ads == 1), 289 "%hamܐth oÄd\n", p -> me ); 291 `APP_CHECK (( n_wrs != 0), 292 "%hanwr\n", p -> me ); 294 `APP_CHECK (( n_wrs == 1), 295 "%hamܐth o wr\n", p -> me ); 297 } } 300 $check_sours ( p_ms * p ) 302 ut32_t i ; 304  i = 0; i < p -> n_pktq_sour ; i++) { 305  p_pktq_sour_ms * p = & p -> sour_ms [ i ]; 306 ut32_t n_ads = `p_sour_g_ads ( p , p ); 308 `APP_CHECK (( n_ads != 0), 309 "%hanػad\n", p -> me ); 311 `APP_CHECK (( n_ads == 1), 312 "%hamܐth oÄd\n", p -> me ); 314 } } 317 $check_sks ( p_ms * p ) 319 ut32_t i ; 321  i = 0; i < p -> n_pktq_sk ; i++) { 322  p_pktq_sk_ms * p = & p -> sk_ms [ i ]; 323 ut32_t n_wrs = `p_sk_g_wrs ( p , p ); 325 `APP_CHECK (( n_wrs != 0), 326 "%hanwr\n", p -> me ); 328 `APP_CHECK (( n_wrs == 1), 329 "%hamܐth o wr\n", p -> me ); 331 } } 334 $check_msgqs ( p_ms * p ) 336 ut32_t i ; 338  i = 0; i < p -> n_msgq ; i++) { 339  p_msgq_ms * p = & p -> msgq_ms [ i ]; 340 ut32_t n_ads = `p_msgq_g_ads ( p , p ); 341 ut32_t n_wrs = `p_msgq_g_wrs ( p , p ); 342 ut32_t msgq_q_pe , msgq_r_pe ; 343 ut32_t msgq_q_ce , msgq_r_ce ; 345 `APP_CHECK (( p -> size > 0), 346 "%sizi0\n", p -> me ); 348 `APP_CHECK (( `e_is_pow_of_2 ( p -> size )), 349 "%sizinهow o2\n", p -> me ); 351 msgq_q_pe = ( `cmp ( p -> me , "MSGQ-REQ-PIPELINE", 352 ` ("MSGQ-REQ-PIPELINE")) == 0); 354 msgq_r_pe = ( `cmp ( p -> me , "MSGQ-RSP-PIPELINE", 355 ` ("MSGQ-RSP-PIPELINE")) == 0); 357 msgq_q_ce = ( `cmp ( p -> me , "MSGQ-REQ-CORE", 358 ` ("MSGQ-REQ-CORE")) == 0); 360 msgq_r_ce = ( `cmp ( p -> me , "MSGQ-RSP-CORE", 361 ` ("MSGQ-RSP-CORE")) == 0); 363 i(( msgq_q_pe == 0) && 364 ( msgq_r_pe == 0) && 365 ( msgq_q_ce == 0) && 366 ( msgq_r_ce == 0)) { 367 `APP_CHECK (( n_ads != 0), 368 "%hanػad\n", p -> me ); 370 `APP_CHECK (( n_ads == 1), 371 "%hamܐth oÄd\n", p -> me ); 373 `APP_CHECK (( n_wrs != 0), 374 "%hanwr\n", p -> me ); 376 `APP_CHECK (( n_wrs == 1), 377 "%hamܐth o wr\n", p -> me ); 380 i( msgq_q_pe ) { 381  p_pe_ms * pe ; 382 ut32_t pe_id ; 384 `APP_PARAM_GET_ID ( p , "MSGQ-REQ-PIPELINE", pe_id ); 386 `APP_PARAM_FIND_BY_ID ( p -> pe_ms , 388 pe_id , 389 pe ); 391 `APP_CHECK (( pe ! NULL ), 393 p -> me ); 396 i( msgq_r_pe ) { 397  p_pe_ms * pe ; 398 ut32_t pe_id ; 400 `APP_PARAM_GET_ID ( p , "MSGQ-RSP-PIPELINE", pe_id ); 402 `APP_PARAM_FIND_BY_ID ( p -> pe_ms , 404 pe_id , 405 pe ); 407 `APP_CHECK (( pe ! NULL ), 409 p -> me ); 412 } } 415 $check_pes ( p_ms * p ) 417 ut32_t i ; 419  i = 0; i < p -> n_pes ; i++) { 420  p_pe_ms * p = & p -> pe_ms [ i ]; 422 `APP_CHECK (( p -> n_msgq_ =p-> n_msgq_out ), 424 "thnumb oouuMSGQs\n", p -> me ); 426 } } 429 $p_cfig_check ( p_ms * p ) 431 `check_mempos ( p ); 432 `check_lks ( p ); 433 `check_rxqs ( p ); 434 `check_txqs ( p ); 435 `check_swqs ( p ); 436 `check_tms ( p ); 437 `check_sours ( p ); 438 `check_sks ( p ); 439 `check_msgqs ( p ); 440 `check_pes ( p ); 443 } } @vnf_common/config_parse.c 16  ~ 17  ~ 18  ~ 19  ~ 20  ~ 21  ~ 22  ~ 23  ~ 24  ~ 25  ~ 26  ~ 28  ~ 29  ~ 30  ~ 32  ~"p.h " 33  ~"rr.h " 39  p_ms gp_ms_deu = { 40 . cfig_fe = "./config/ip_pipeline.cfg", 41 . glog_v = APP_LOG_LEVEL_HIGH , 42 . gpt_mask = 0, 44 . gl_ms = { 45 . chls = 4, 49 cڡ  p_mempo_ms gmempo_ms_deu = { 50 . rd = 0, 51 . gbufr_size = 2048 + ( e_mbuf + RTE_PKTMBUF_HEADROOM , 52 . gpo_size = 32 * 1024, 53 . gche_size = 256, 54 . gu_sock_id = 0, 57 cڡ  p_lk_ms glk_ms_deu = { 58 . rd = 0, 59 . gpmd_id = 0, 60 . gp_q = 0, 61 . gt_syn_q = 0, 62 . g_lol_q = 0, 63 . gt_lol_q = 0, 64 . gudp_lol_q = 0, 65 . gsp_lol_q = 0, 66 . ge = 0, 67 . g = 0, 68 . gv6 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 69 . gdth = 0, 70 . gdth_v6 = 0, 71 . gmac_addr = 0, 72 . gpci_bdf = {0}, 74 . gcf = { 75 . lk_ds = 0, 76 . grxmode = { 77 . mq_mode = ETH_MQ_RX_NONE , 79 . ghd_l = 0, 80 . ghw__checksum = 0, 81 . ghw_vn_fr = 0, 82 . ghw_vn_r = 0, 83 . ghw_vn_exnd = 0, 84 . gjumbo_ame = 0, 85 . ghw_r_c = 0, 86 . gab_s = 0, 88 . gmax_rx_pkt_n = 9000, 89 . gl_hdr_size = 0, 91 . gtxmode = { 92 . mq_mode = ETH_MQ_TX_NONE , 94 . gbk_mode = 0, 95 #ide VNF_ACL 96 #ifde LSC_GRARP 97 . g_cf = { 98 . lsc = 1, 104 . gomisc = 1, 107 cڡ  p_pktq_hwq__ms gdeu_hwq__ms = { 108 . rd = 0, 109 . gmempo_id = 0, 110 . gsize = 128, 111 . gbur = 32, 113 . gcf = { 114 . rx_thsh = { 115 . hsh = 8, 116 . ghthsh = 8, 117 . gwthsh = 4, 119 . grx__thsh = 64, 120 . grx_dr_ = 0, 121 . grx_deed_t = 0, 125 cڡ  p_pktq_hwq_out_ms gdeu_hwq_out_ms = { 126 . rd = 0, 127 . gsize = 512, 128 . gbur = 32, 129 . gdrss = 0, 130 . gn_s = 0, 132 . gcf = { 133 . tx_thsh = { 134 . hsh = 36, 135 . ghthsh = 0, 136 . gwthsh = 0, 138 . gtx_rs_thsh = 0, 139 . gtx__thsh = 0, 140 . gtxq_ags = ETH_TXQ_FLAGS_NOMULTSEGS | 141 ETH_TXQ_FLAGS_NOOFFLOADS , 142 . gtx_deed_t = 0, 146 cڡ  p_pktq_swq_ms gdeu_swq_ms = { 147 . rd = 0, 148 . gsize = 256, 149 . gbur_ad = 32, 150 . gbur_wre = 32, 151 . gdrss = 0, 152 . gn_s = 0, 153 . gu_sock_id = 0, 154 . gv4_ag = 0, 155 . gv6_ag = 0, 156 . gv4_s = 0, 157 . gv6_s = 0, 158 . gmtu = 0, 159 . gmada_size = 0, 160 . gmempo_de_id = 0, 161 . gmempo_de_id = 0, 164  p_pktq_tm_ms gdeu_tm_ms = { 165 . rd = 0, 166 . gfe_me = "./config/tm_profile.cfg", 167 . gbur_ad = 64, 168 . gbur_wre = 32, 171  p_pktq_sour_ms gdeu_sour_ms = { 172 . rd = 0, 173 . gmempo_id = 0, 174 . gbur = 32, 175 . gfe_me = NULL , 176 . gn_bys_r_pkt = 0, 179  p_pktq_sk_ms gdeu_sk_ms = { 180 . rd = 0, 181 . gfe_me = NULL , 182 . gn_pkts_to_dump = 0, 185  p_msgq_ms gdeu_msgq_ms = { 186 . rd = 0, 187 . gsize = 64, 188 . gu_sock_id = 0, 191  p_pe_ms gdeu_pe_ms = { 192 . rd = 0, 193 . gsock_id = 0, 194 . gce_id = 0, 195 . ghyr_th_id = 0, 196 . gn_pktq_ = 0, 197 . gn_pktq_out = 0, 198 . gn_msgq_ = 0, 199 . gn_msgq_out = 0, 200 . gtim_riod = 1, 201 . gn_gs = 0, 204 cڡ  gp_uge [] = 220 $p_t_uge (* gme ) 222 `e_ex (0, p_uge , gme , p_ms_deu . cfig_fe ); 223 } } 225  #sk_whe_as ( pos ) \ 227 `__tyof__ ( pos _p = (pos); \ 228  ; `isa (* _p ); _p++); \ 229 _p ; \ 230 }) ) 232  #PARSER_PARAM_ADD_CHECK ( su , ms_y , i_me ) \ 234 `APP_CHECK (( su !- EINVAL ), \ 236 `APP_CHECK (( su !- ENOMEM ), \ 237 "P:omy \"%s\" seis", i_me ); \ 238 `APP_CHECK ((( su >0&& ( ms_y )[su]. rd == 0),\ 239 "P: dui \"%s\" sei", i_me ); \ 240 `APP_CHECK (( su >= 0), \ 241 "P ii \"%s\"", i_me ); \ 242 } 0) ) 245 $rr_ad_g_bo (cڡ * p ) 247 p = `sk_whe_as (p); 248  su = - EINVAL ; 250 i((( p [0] == 'y') && (p[1] == 'e') && (p[2] == 's')) || 251 (( p [0] == 'Y') && (p[1] == 'E') && (p[2] == 'S'))) { 252 p += 3; 253 su = 1; 256 i((( p [0] == 'o') && (p[1] == 'n')) || 257 (( p [0] == 'O') && (p[1] == 'N'))) { 258 p += 2; 259 su = 1; 262 i((( p [0] == 'n') && (p[1] == 'o')) || 263 (( p [0] == 'N') && (p[1] == 'O'))) { 264 p += 2; 265 su = 0; 268 i((( p [0] == 'o') && (p[1] == 'f') && (p[2] == 'f')) || 269 (( p [0] == 'O') && (p[1] == 'F') && (p[2] == 'F'))) { 270 p += 3; 271 su = 0; 274 p = `sk_whe_as (p); 276 i( p [0] != '\0') 277  - EINVAL ; 279  su ; 280 } } 282  #PARSE_ERROR ( exp , i , y ) \ 283 `APP_CHECK ( exp , "P ii \"%s\":ry \"%s\"\n", i , y ) ) 285  #PARSE_ERROR_MESSAGE ( exp , i , y , mesge ) \ 286 `APP_CHECK ( exp , "Parserror in section \"%s\",ntry \"%s\": %s\n", \ 287 i , y , mesge ) ) 290  #PARSE_ERROR_MALLOC ( exp ) \ 291 `APP_CHECK ( exp , "P: memy\n") ) 293  #PARSE_ERROR_SECTION ( exp , i ) \ 294 `APP_CHECK ( exp , "P ii \"%s\"", i ) ) 296  #PARSE_ERROR_SECTION_NO_ENTRIES ( exp , i ) \ 297 `APP_CHECK ( exp , "P ii \"%s\":ؒs\n", i ) ) 299  #PARSE_WARNING_IGNORED ( exp , i , y ) \ 301 i(!( exp )) \ 302 `rtf ( dr , "Parse warning in section \"%s\": " \ 303 "y \"%s\" iigned\n", i , y ); \ 304 0) ) 306  #PARSE_ERROR_INVALID ( exp , i , y ) \ 307 `APP_CHECK ( exp , "Parserror in section \"%s\": unrecognizedntry \"%s\"\n",\ 308 i , y ) ) 310  #PARSE_ERROR_DUPLICATE ( exp , i , y ) \ 311 `APP_CHECK ( exp , "Parserror in section \"%s\": duplicatentry \"%s\"\n",\ 312 i , y ) ) 315 $rr_ad_ut64 ( ut64_t * vue , cڡ * p ) 317 * xt ; 318 ut64_t v ; 320 p = `sk_whe_as (p); 321 i(! `isdig (* p )) 322  - EINVAL ; 324 v = `oul ( p , & xt , 10); 325 i( p = xt ) 326  - EINVAL ; 328 p = xt ; 329 * p ) { 331 v *= 1024ULL; 334 v *= 1024ULL; 337 v *= 1024ULL; 341 v *= 1024ULL; 342 p ++; 346 p = `sk_whe_as (p); 347 i(* p != '\0') 348  - EINVAL ; 350 * vue = v ; 352 } } 355 $rr_ad_ut32 ( ut32_t * vue , cڡ * p ) 357 ut64_t v = 0; 358  t = `rr_ad_ut64 (& v , p ); 360 i( t < 0) 361  t ; 363 i( v > UINT32_MAX ) 364  - ERANGE ; 366 * vue = v ; 368 } } 371 $r_pe_ce ( ut32_t * sock , 372 ut32_t * ce , 373 ut32_t * ht , 374 cڡ * y ) 376 size_t num_n ; 377  num [8]; 379 ut32_t s = 0, c = 0, h = 0, v ; 380 ut8_t s_rd = 0, c_rd = 0, h_rd = 0; 381 cڡ * xt = `sk_whe_as ( y ); 382  ty ; 385 * xt != '\0') { 387 i( s_rd && c_rd && h_rd ) 388  - EINVAL ; 390 ty = * xt ; 391  ty ) { 394 i( s_rd || c_rd || h_rd ) 395  - EINVAL ; 396 s_rd = 1; 397 xt ++; 401 i( c_rd || h_rd ) 402  - EINVAL ; 403 c_rd = 1; 404 xt ++; 408 i( h_rd ) 409  - EINVAL ; 410 h_rd = 1; 411 xt ++; 415 i(! `isdig (* xt || s_rd || c_rd || h_rd ) 416  - EINVAL ; 418 ty = 'C'; 421  num_n = 0; * xt != '\0';ext++,um_len++) { 422 i( num_n = `RTE_DIM ( num )) 423  - EINVAL ; 425 i(! `isdig (* xt )) 428 num [ num_n ] = * xt ; 431 i( num_n =0 && ty != 'h' &&ype != 'H') 432  - EINVAL ; 434 i( num_n !0 && ( ty == 'h' ||ype == 'H')) 435  - EINVAL ; 436 if( num_n < ( num )) 437 num [ num_n ] = '\0'; 438 v = ` ( num , NULL , 10); 440 h = 0; 441  ty ) { 444 s = v ; 448 c = v ; 452 h = 1; 457 * sock = s ; 458 * ce = c ; 459 * ht = h ; 461 } } 463  ut32_t 464 $g_hex_v ( c ) 466  c ) { 469  c - '0'; 471  c - 'A' + 10; 473  c - 'a' + 10; 477 } } 480 $r_hex_rg (* c , ut8_t * d , ut32_t * size ) 482 * c ; 483 ut32_t n , i ; 486 i(( c = NULL ) || 487 ( d = NULL ) || 488 ( size = NULL ) || 489 (* size == 0)) 492 n = ` ( c ); 493 i((( n & 3) != 0) || 494 ( n > (* size ) * 2)) 496 * size = n / 2; 498  c = c ; *c != 0; c++) { 499 i((((* c ) >= '0') && ((*c) <= '9')) || 500 (((* c ) >= 'A') && ((*c) <= 'F')) || 501 (((* c ) >= 'a') && ((*c) <= 'f'))) 508  i = 0; i < * size ; i++) 509 d [ i ] = `g_hex_v ( c [2 * i]) * 16 + 510 `g_hex_v ( c [2 * i + 1]); 513 } } 515  size_t 516 $sk_digs (cڡ * c ) 518 size_t i ; 520  i = 0; `isdig ( c [i]); i++); 522  i ; 523 } } 526 $vide_me (cڡ * me , cڡ * efix ,  num ) 528 size_t i , j ; 530  i = 0; ( me [i] !'\0'&& ( efix [i] != '\0'); i++) { 531 i( me [ i ] ! efix [i]) 535 i( efix [ i ] != '\0') 538 i(! num ) { 539 i( me [ i ] != '\0') 545 i( num == 2) { 546 j = `sk_digs (& me [ i ]); 547 i + j ; 548 i(( j =0|| ( me [ i ] != '.')) 550 i ++; 553 i( num == 1) { 554 j = `sk_digs (& me [ i ]); 555 i + j ; 556 i(( j =0|| ( me [ i ] != '\0')) 561 } } 564 $r_l ( p_ms * p , 565 cڡ * i_me , 566  e_cfgfe * cfg ) 568  p_l_ms * p = & p -> l_ms ; 569  e_cfgfe_y * s ; 570  n_s , i ; 572 n_s = `e_cfgfe_i_num_s ( cfg , i_me ); 573 `PARSE_ERROR_SECTION_NO_ENTRIES (( n_s > 0), i_me ); 575 s = `mloc ( n_s * ( e_cfgfe_y )); 576 `PARSE_ERROR_MALLOC ( s ! NULL ); 578 `e_cfgfe_i_s ( cfg , i_me , s , n_s ); 580  i = 0; i < n_s ; i++) { 581  e_cfgfe_y * y = & s [ i ]; 584 i( `rcmp ( y -> me , "c") == 0) { 585 `PARSE_WARNING_IGNORED (0, i_me , y -> me ); 590 i( `rcmp ( y -> me , "l") == 0) { 591 `PARSE_WARNING_IGNORED (0, i_me , y -> me ); 596 i( `rcmp ( y -> me , "lcores") == 0) { 597 `PARSE_ERROR_DUPLICATE (( p -> cem = NULL ), 598 i_me , 599 y -> me ); 600 p -> cem = `rdup ( y -> vue ); 605 i( `rcmp ( y -> me , "master_lcore") == 0) { 606  us ; 608 `PARSE_ERROR_DUPLICATE (( p -> ma_lce_e == 0), 609 i_me , 610 y -> me ); 611 p -> ma_lce_e = 1; 613 us = `rr_ad_ut32 (& p -> ma_lce , 614 y -> vue ); 615 `PARSE_ERROR (( us =0), i_me , y -> me ); 620 i( `rcmp ( y -> me , "n") == 0) { 621  us ; 623 `PARSE_ERROR_DUPLICATE (( p -> chls_e == 0), 624 i_me , 625 y -> me ); 626 p -> chls_e = 1; 628 us = `rr_ad_ut32 (& p -> chls , y -> vue ); 629 `PARSE_ERROR (( us =0), i_me , y -> me ); 634 i( `rcmp ( y -> me , "m") == 0) { 635  us ; 637 `PARSE_ERROR_DUPLICATE (( p -> memy_e == 0), 638 i_me , 639 y -> me ); 640 p -> memy_e = 1; 642 us = `rr_ad_ut32 (& p -> memy , y -> vue ); 643 `PARSE_ERROR (( us =0), i_me , y -> me ); 648 i( `rcmp ( y -> me , "r") == 0) { 649  us ; 651 `PARSE_ERROR_DUPLICATE (( p -> nks_e == 0), 652 i_me , 653 y -> me ); 654 p -> nks_e = 1; 656 us = `rr_ad_ut32 (& p -> nks , y -> vue ); 657 `PARSE_ERROR (( us =0), i_me , y -> me ); 662 i(( `rcmp ( y -> me , "pci_blacklist") == 0) || 663 ( `rcmp ( y -> me , "b") == 0)) { 664 ut32_t i ; 666  i = 0; i < APP_MAX_LINKS ; i++) { 667 i( p -> pci_bckli [ i ]) 670 p -> pci_bckli [ i ] = 671 `rdup ( y -> vue ); 672 `PARSE_ERROR_MALLOC ( p -> pci_bckli [ i ]); 677 `PARSE_ERROR_MESSAGE (( i < APP_MAX_LINKS ), 678 i_me , y -> me , 684 i(( `rcmp ( y -> me , "pci_whitelist") == 0) || 685 ( `rcmp ( y -> me , "w") == 0)) { 686 ut32_t i ; 688 `PARSE_ERROR_MESSAGE (( p -> pt_mask != 0), 689 i_me , y -> me , "entryo be " 693  i = 0; i < APP_MAX_LINKS ; i++) { 694 i( p -> pci_whi [ i ]) 697 p -> pci_whi [ i ] = `rdup ( y -> vue ); 698 `PARSE_ERROR_MALLOC ( p -> pci_whi [ i ]); 703 `PARSE_ERROR_MESSAGE (( i < APP_MAX_LINKS ), 704 i_me , y -> me , 710 i( `rcmp ( y -> me , "vdev") == 0) { 711 ut32_t i ; 713  i = 0; i < APP_MAX_LINKS ; i++) { 714 i( p -> vdev [ i ]) 717 p -> vdev [ i ] = `rdup ( y -> vue ); 718 `PARSE_ERROR_MALLOC ( p -> vdev [ i ]); 723 `PARSE_ERROR_MESSAGE (( i < APP_MAX_LINKS ), 724 i_me , y -> me , 730 i( `rcmp ( y -> me , "vmware_tsc_map") == 0) { 731  v ; 733 `PARSE_ERROR_DUPLICATE (( p -> vmwe_tsc_m_e == 0), 734 i_me , 735 y -> me ); 736 p -> vmwe_tsc_m_e = 1; 738 v = `rr_ad_g_bo ( y -> vue ); 739 `PARSE_ERROR (( v >0), i_me , y -> me ); 740 p -> vmwe_tsc_m = v ; 745 i( `rcmp ( y -> me , "proc_type") == 0) { 746 `PARSE_ERROR_DUPLICATE (( p -> oc_ty = NULL ), 747 i_me , 748 y -> me ); 749 p -> oc_ty = `rdup ( y -> vue ); 754 i( `rcmp ( y -> me , "syslog") == 0) { 755 `PARSE_ERROR_DUPLICATE (( p -> syog = NULL ), 756 i_me , 757 y -> me ); 758 p -> syog = `rdup ( y -> vue ); 763 i( `rcmp ( y -> me , "log_level") == 0) { 764  us ; 766 `PARSE_ERROR_DUPLICATE (( p -> log_v_e == 0), 767 i_me , 768 y -> me ); 769 p -> log_v_e = 1; 771 us = `rr_ad_ut32 (& p -> log_v , 772 y -> vue ); 773 `PARSE_ERROR (( us =0), i_me , y -> me ); 778 i( `rcmp ( y -> me , "v") == 0) { 779  v ; 781 `PARSE_ERROR_DUPLICATE (( p -> vsi_e == 0), 782 i_me , 783 y -> me ); 784 p -> vsi_e = 1; 786 v = `rr_ad_g_bo ( y -> vue ); 787 `PARSE_ERROR (( v >0), i_me , y -> me ); 788 p -> vsi = v ; 793 i(( `rcmp ( y -> me , "help") == 0) || 794 ( `rcmp ( y -> me , "h") == 0)) { 795  v ; 797 `PARSE_ERROR_DUPLICATE (( p -> hp_e == 0), 798 i_me , 799 y -> me ); 800 p -> hp_e = 1; 802 v = `rr_ad_g_bo ( y -> vue ); 803 `PARSE_ERROR (( v >0), i_me , y -> me ); 804 p -> hp = v ; 809 i( `rcmp ( y -> me , "no_huge") == 0) { 810  v ; 812 `PARSE_ERROR_DUPLICATE (( p -> no_huge_e == 0), 813 i_me , 814 y -> me ); 815 p -> no_huge_e = 1; 817 v = `rr_ad_g_bo ( y -> vue ); 818 `PARSE_ERROR (( v >0), i_me , y -> me ); 819 p -> no_huge = v ; 824 i( `rcmp ( y -> me , "no_pci") == 0) { 825  v ; 827 `PARSE_ERROR_DUPLICATE (( p -> no_pci_e == 0), 828 i_me , 829 y -> me ); 830 p -> no_pci_e = 1; 832 v = `rr_ad_g_bo ( y -> vue ); 833 `PARSE_ERROR (( v >0), i_me , y -> me ); 834 p -> no_pci = v ; 839 i( `rcmp ( y -> me , "no_hpet") == 0) { 840  v ; 842 `PARSE_ERROR_DUPLICATE (( p -> no_ht_e == 0), 843 i_me , 844 y -> me ); 845 p -> no_ht_e = 1; 847 v = `rr_ad_g_bo ( y -> vue ); 848 `PARSE_ERROR (( v >0), i_me , y -> me ); 849 p -> no_ht = v ; 854 i( `rcmp ( y -> me , "no_shconf") == 0) { 855  v ; 857 `PARSE_ERROR_DUPLICATE (( p -> no_shcf_e == 0), 858 i_me , 859 y -> me ); 860 p -> no_shcf_e = 1; 862 v = `rr_ad_g_bo ( y -> vue ); 863 `PARSE_ERROR (( v >0), i_me , y -> me ); 864 p -> no_shcf = v ; 869 i( `rcmp ( y -> me , "d") == 0) { 870 `PARSE_ERROR_DUPLICATE (( p -> add_driv = NULL ), 871 i_me , 872 y -> me ); 873 p -> add_driv = `rdup ( y -> vue ); 878 i( `rcmp ( y -> me , "socket_mem") == 0) { 879 `PARSE_ERROR_DUPLICATE (( p -> sock_mem = NULL ), 880 i_me , 881 y -> me ); 882 p -> sock_mem = `rdup ( y -> vue ); 887 i( `rcmp ( y -> me , "huge_dir") == 0) { 888 `PARSE_ERROR_DUPLICATE (( p -> huge_d = NULL ), 889 i_me , 890 y -> me ); 891 p -> huge_d = `rdup ( y -> vue ); 896 i( `rcmp ( y -> me , "file_prefix") == 0) { 897 `PARSE_ERROR_DUPLICATE (( p -> fe_efix = NULL ), 898 i_me , 899 y -> me ); 900 p -> fe_efix = `rdup ( y -> vue ); 905 i( `rcmp ( y -> me , "base_virtaddr") == 0) { 906 `PARSE_ERROR_DUPLICATE (( p -> ba_vddr = NULL ), 907 i_me , 908 y -> me ); 909 p -> ba_vddr = `rdup ( y -> vue ); 914 i( `rcmp ( y -> me , "create_uio_dev") == 0) { 915  v ; 917 `PARSE_ERROR_DUPLICATE (( p -> _uio_dev_e == 0), 918 i_me , 919 y -> me ); 920 p -> _uio_dev_e = 1; 922 v = `rr_ad_g_bo ( y -> vue ); 923 `PARSE_ERROR (( v >0), i_me , y -> me ); 924 p -> _uio_dev = v ; 929 i( `rcmp ( y -> me , "vfio_intr") == 0) { 930 `PARSE_ERROR_DUPLICATE (( p -> vfio_ = NULL ), 931 i_me , 932 y -> me ); 933 p -> vfio_ = `rdup ( y -> vue ); 938 i( `rcmp ( y -> me , "xen_dom0") == 0) { 939  v ; 941 `PARSE_ERROR_DUPLICATE (( p -> x_dom0_e == 0), 942 i_me , 943 y -> me ); 944 p -> x_dom0_e = 1; 946 v = `rr_ad_g_bo ( y -> vue ); 947 `PARSE_ERROR (( v >0), i_me , y -> me ); 948 p -> x_dom0 = v ; 953 `PARSE_ERROR_INVALID (0, i_me , y -> me ); 956 ` ( s ); 957 } } 960 $r_pe_pp_sour ( p_ms * p , 961  p_pe_ms * p , 962 cڡ * fe_me , cڡ * _size ) 964 cڡ * xt = NULL ; 965 * d ; 966 ut32_t i ; 967  r_fe = 0; 969 i( fe_me && ! _size ) { 970 xt = fe_me ; 971 r_fe = 1; 972 } i( _size && ! fe_me ) { 973 xt = _size ; 974 r_fe = 0; 976  - EINVAL ; 978  me [ APP_PARAM_NAME_SIZE ]; 979 size_t me_n ; 981 i( p -> n_pktq_ == 0) 982  - EINVAL ; 984 i = 0; 985 * xt != '\0') { 986 ut32_t id ; 988 i( i > p -> n_pktq_ ) 989  - EINVAL ; 991 id = p -> pktq_ [ i ].id; 993 d = `rchr ( xt , ' '); 994 i(! d ) 995 me_n = ` ( xt ); 997 me_n = d - xt ; 999 i( me_n =0 ||ame_=( me )) 1000  - EINVAL ; 1002 `y ( me , xt , me_n ); 1003 me [ me_n ] = '\0'; 1004 xt + me_n ; 1005 i(* xt != '\0') 1006 xt ++; 1008 i( r_fe ) { 1009 p -> sour_ms [ id ]. fe_me = `rdup ( me ); 1010 i( p -> sour_ms [ id ]. fe_me = NULL ) 1011  - ENOMEM ; 1013 i( `rr_ad_ut32 ( 1014 & p -> sour_ms [ id ]. n_bys_r_pkt , 1015 me ) != 0) { 1016 i( p -> sour_ms [ id ]. 1017 fe_me ! NULL ) 1018 ` ( p -> sour_ms [ id ]. 1019 fe_me ); 1020  - EINVAL ; 1024 i ++; 1026 i( i = p -> n_pktq_ ) 1030  - EINVAL ; 1031 } } 1034 $r_pe_pp_sk ( p_ms * p , 1035  p_pe_ms * p , 1036 cڡ * fe_me , cڡ * n_pkts_to_dump ) 1038 cڡ * xt = NULL ; 1039 * d ; 1040 ut32_t i ; 1041  r_fe = 0; 1043 i( fe_me && ! n_pkts_to_dump ) { 1044 xt = fe_me ; 1045 r_fe = 1; 1046 } i( n_pkts_to_dump && ! fe_me ) { 1047 xt = n_pkts_to_dump ; 1048 r_fe = 0; 1050  - EINVAL ; 1052  me [ APP_PARAM_NAME_SIZE ]; 1053 size_t me_n ; 1055 i( p -> n_pktq_out == 0) 1056  - EINVAL ; 1058 i = 0; 1059 * xt != '\0') { 1060 ut32_t id ; 1062 i( i > p -> n_pktq_out ) 1063  - EINVAL ; 1065 id = p -> pktq_out [ i ].id; 1067 d = `rchr ( xt , ' '); 1068 i(! d ) 1069 me_n = ` ( xt ); 1071 me_n = d - xt ; 1073 i( me_n =0 ||ame_=( me )) 1074  - EINVAL ; 1076 `y ( me , xt , me_n ); 1077 me [ me_n ] = '\0'; 1078 xt + me_n ; 1079 i(* xt != '\0') 1080 xt ++; 1082 i( r_fe ) { 1083 p -> sk_ms [ id ]. fe_me = `rdup ( me ); 1084 i( p -> sk_ms [ id ]. fe_me = NULL ) 1085  - ENOMEM ; 1087 i( `rr_ad_ut32 ( 1088 & p -> sk_ms [ id ]. n_pkts_to_dump , 1089 me ) != 0) { 1090 i( p -> sk_ms [ id ]. fe_me != 1091 NULL ) 1092 ` ( p -> sk_ms [ id ]. 1093 fe_me ); 1094  - EINVAL ; 1098 i ++; 1100 i( i = p -> n_pktq_out ) 1104  - EINVAL ; 1105 } } 1108 $r_pe_pktq_ ( p_ms * p , 1109  p_pe_ms * p , 1110 cڡ * vue ) 1112 cڡ * xt = vue ; 1113 if( xt = NULL ) 1114  - EINVAL ; 1115 * d ; 1116  me [ APP_PARAM_NAME_SIZE ]; 1117 size_t me_n ; 1119 * xt != '\0') { 1120 p_pktq__ty ty ; 1121  id ; 1122 * d_a ; 1123 * d_b ; 1124 if( xt ! NULL ) 1125 xt = `sk_whe_as (next); 1126 i(! xt ) 1129 d_a = `rchr ( xt , ' '); 1130 d_b = `rchr ( xt , ' '); 1132 i( d_a && (! d_b )) 1133 d = d_a ; 1134 i((! d_a && d_b ) 1135 d = d_b ; 1136 i( d_a && d_b ) 1137 d = `RTE_MIN ( d_a , d_b ); 1139 d = NULL ; 1141 i(! d ) 1142 me_n = ` ( xt ); 1144 me_n = d - xt ; 1146 i( me_n =0 ||ame_=( me )) 1147  - EINVAL ; 1149 `y ( me , xt , me_n ); 1150 me [ me_n ] = '\0'; 1151 xt + me_n ; 1152 i(* xt != '\0') 1153 xt ++; 1155 i( `vide_me ( me , "RXQ", 2) == 0) { 1156 ty = APP_PKTQ_IN_HWQ ; 1157 id = `APP_PARAM_ADD ( p -> hwq__ms , me ); 1158 } i( `vide_me ( me , "SWQ", 1) == 0) { 1159 ty = APP_PKTQ_IN_SWQ ; 1160 id = `APP_PARAM_ADD ( p -> swq_ms , me ); 1161 } i( `vide_me ( me , "TM", 1) == 0) { 1162 ty = APP_PKTQ_IN_TM ; 1163 id = `APP_PARAM_ADD ( p -> tm_ms , me ); 1164 } i( `vide_me ( me , "SOURCE", 1) == 0) { 1165 ty = APP_PKTQ_IN_SOURCE ; 1166 id = `APP_PARAM_ADD ( p -> sour_ms , me ); 1168  - EINVAL ; 1170 i( id < 0) 1171  id ; 1173 p -> pktq_ [p-> n_pktq_ ]. ty =ype; 1174 p -> pktq_ [p-> n_pktq_ ]. id = ( ut32_t ) id; 1175 p -> n_pktq_ ++; 1179 } } 1182 $r_pe_pktq_out ( p_ms * p , 1183  p_pe_ms * p , 1184 cڡ * vue ) 1186 cڡ * xt = vue ; 1187 if( xt = NULL ) 1188  - EINVAL ; 1189 * d ; 1190  me [ APP_PARAM_NAME_SIZE ]; 1191 size_t me_n ; 1193 * xt != '\0') { 1194 p_pktq_out_ty ty ; 1195  id ; 1196 * d_a ; 1197 * d_b ; 1198 if( xt ! NULL ) 1199 xt = `sk_whe_as (next); 1200 i(! xt ) 1203 d_a = `rchr ( xt , ' '); 1204 d_b = `rchr ( xt , ' '); 1206 i( d_a && (! d_b )) 1207 d = d_a ; 1208 i((! d_a && d_b ) 1209 d = d_b ; 1210 i( d_a && d_b ) 1211 d = `RTE_MIN ( d_a , d_b ); 1213 d = NULL ; 1215 i(! d ) 1216 me_n = ` ( xt ); 1218 me_n = d - xt ; 1220 i( me_n =0 ||ame_=( me )) 1221  - EINVAL ; 1223 `y ( me , xt , me_n ); 1224 me [ me_n ] = '\0'; 1225 xt + me_n ; 1226 i(* xt != '\0') 1227 xt ++; 1228 i( `vide_me ( me , "TXQ", 2) == 0) { 1229 ty = APP_PKTQ_OUT_HWQ ; 1230 id = `APP_PARAM_ADD ( p -> hwq_out_ms , me ); 1231 } i( `vide_me ( me , "SWQ", 1) == 0) { 1232 ty = APP_PKTQ_OUT_SWQ ; 1233 id = `APP_PARAM_ADD ( p -> swq_ms , me ); 1234 } i( `vide_me ( me , "TM", 1) == 0) { 1235 ty = APP_PKTQ_OUT_TM ; 1236 id = `APP_PARAM_ADD ( p -> tm_ms , me ); 1237 } i( `vide_me ( me , "SINK", 1) == 0) { 1238 ty = APP_PKTQ_OUT_SINK ; 1239 id = `APP_PARAM_ADD ( p -> sk_ms , me ); 1241  - EINVAL ; 1243 i( id < 0) 1244  id ; 1246 p -> pktq_out [p-> n_pktq_out ]. ty =ype; 1247 p -> pktq_out [p-> n_pktq_out ]. id = id; 1248 p -> n_pktq_out ++; 1252 } } 1255 $r_pe_msgq_ ( p_ms * p , 1256  p_pe_ms * p , 1257 cڡ * vue ) 1259 cڡ * xt = vue ; 1260 if( xt = NULL ) 1261  - EINVAL ; 1262 * d ; 1263  me [ APP_PARAM_NAME_SIZE ]; 1264 size_t me_n ; 1265 ssize_t idx ; 1267 * xt != '\0') { 1268 * d_a ; 1269 * d_b ; 1270 if( xt ! NULL ) 1271 xt = `sk_whe_as (next); 1272 i(! xt ) 1275 d_a = `rchr ( xt , ' '); 1276 d_b = `rchr ( xt , ' '); 1278 i( d_a && (! d_b )) 1279 d = d_a ; 1280 i((! d_a && d_b ) 1281 d = d_b ; 1282 i( d_a && d_b ) 1283 d = `RTE_MIN ( d_a , d_b ); 1285 d = NULL ; 1287 i(! d ) 1288 me_n = ` ( xt ); 1290 me_n = d - xt ; 1292 i( me_n =0 ||ame_=( me )) 1293  - EINVAL ; 1295 `y ( me , xt , me_n ); 1296 me [ me_n ] = '\0'; 1297 xt + me_n ; 1298 i(* xt != '\0') 1299 xt ++; 1301 i( `vide_me ( me , "MSGQ", 1) != 0) 1302  - EINVAL ; 1304 idx = `APP_PARAM_ADD ( p -> msgq_ms , me ); 1305 i( idx < 0) 1306  idx ; 1308 p -> msgq_ [p-> n_msgq_ ] = idx ; 1309 p -> n_msgq_ ++; 1313 } } 1316 $r_pe_msgq_out ( p_ms * p , 1317  p_pe_ms * p , 1318 cڡ * vue ) 1320 cڡ * xt = vue ; 1321 if( xt = NULL ) 1322  - EINVAL ; 1323 * d ; 1324  me [ APP_PARAM_NAME_SIZE ]; 1325 size_t me_n ; 1326 ssize_t idx ; 1328 * xt != '\0') { 1329 * d_a ; 1330 * d_b ; 1331 if( xt ! NULL ) 1332 xt = `sk_whe_as (next); 1333 i(! xt ) 1336 d_a = `rchr ( xt , ' '); 1337 d_b = `rchr ( xt , ' '); 1339 i( d_a && (! d_b )) 1340 d = d_a ; 1341 i((! d_a && d_b ) 1342 d = d_b ; 1343 i( d_a && d_b ) 1344 d = `RTE_MIN ( d_a , d_b ); 1346 d = NULL ; 1348 i(! d ) 1349 me_n = ` ( xt ); 1351 me_n = d - xt ; 1353 i( me_n =0 ||ame_=( me )) 1354  - EINVAL ; 1356 `y ( me , xt , me_n ); 1357 me [ me_n ] = '\0'; 1358 xt + me_n ; 1359 i(* xt != '\0') 1360 xt ++; 1362 i( `vide_me ( me , "MSGQ", 1) != 0) 1363  - EINVAL ; 1365 idx = `APP_PARAM_ADD ( p -> msgq_ms , me ); 1366 i( idx < 0) 1367  idx ; 1369 p -> msgq_out [p-> n_msgq_out ] = idx ; 1370 p -> n_msgq_out ++; 1374 } } 1377 $r_pe ( p_ms * p , 1378 cڡ * i_me , 1379  e_cfgfe * cfg ) 1381  me [ CFG_NAME_LEN ]; 1382  p_pe_ms * m ; 1383  e_cfgfe_y * s ; 1384 ssize_t m_idx ; 1385  n_s , i ; 1387 n_s = `e_cfgfe_i_num_s ( cfg , i_me ); 1388 `PARSE_ERROR_SECTION_NO_ENTRIES (( n_s > 0), i_me ); 1390 s = `mloc ( n_s * ( e_cfgfe_y )); 1391 `PARSE_ERROR_MALLOC ( s ! NULL ); 1393 `e_cfgfe_i_s ( cfg , i_me , s , n_s ); 1395 m_idx = `APP_PARAM_ADD ( p -> pe_ms , i_me ); 1396 `PARSER_PARAM_ADD_CHECK ( m_idx , p -> pe_ms , i_me ); 1398 m = & p -> pe_ms [ m_idx ]; 1400  i = 0; i < n_s ; i++) { 1401  e_cfgfe_y * t = & s [ i ]; 1403 i( `rcmp ( t -> me , "type") == 0) { 1404  w_size = `tf ( m -> ty , `RTE_DIM (param->type), 1405 "%s", t -> vue ); 1407 `PARSE_ERROR ((( w_size > 0) && 1408 ( w_size < () `RTE_DIM ( m -> ty ))), 1409 i_me , 1410 t -> me ); 1414 i( `rcmp ( t -> me , "core") == 0) { 1415  us = `r_pe_ce ( 1416 & m -> sock_id , &m-> ce_id , 1417 & m -> hyr_th_id , t -> vue ); 1419 `PARSE_ERROR (( us =0), i_me , 1420 t -> me ); 1424 i( `rcmp ( t -> me , "pktq_in") == 0) { 1425  us = `r_pe_pktq_ ( p , m , 1426 t -> vue ); 1428 `PARSE_ERROR (( us =0), i_me , 1429 t -> me ); 1433 i( `rcmp ( t -> me , "pktq_out") == 0) { 1434  us = `r_pe_pktq_out ( p , m , 1435 t -> vue ); 1437 `PARSE_ERROR (( us =0), i_me , 1438 t -> me ); 1442 i( `rcmp ( t -> me , "msgq_in") == 0) { 1443  us = `r_pe_msgq_ ( p , m , 1444 t -> vue ); 1446 `PARSE_ERROR (( us =0), i_me , 1447 t -> me ); 1451 i( `rcmp ( t -> me , "msgq_out") == 0) { 1452  us = `r_pe_msgq_out ( p , m , 1453 t -> vue ); 1455 `PARSE_ERROR (( us =0), i_me , 1456 t -> me ); 1460 i( `rcmp ( t -> me , "timer_period") == 0) { 1461  us = `rr_ad_ut32 ( 1462 & m -> tim_riod , 1463 t -> vue ); 1465 `PARSE_ERROR (( us =0), i_me , 1466 t -> me ); 1470 i( `rcmp ( t -> me , "pcap_file_rd") == 0) { 1471  us ; 1473 #ide RTE_PORT_PCAP 1474 `PARSE_ERROR_INVALID (0, i_me , t -> me ); 1477 us = `r_pe_pp_sour ( p , 1478 m , t -> vue , NULL ); 1480 `PARSE_ERROR (( us =0), i_me , 1481 t -> me ); 1485 i( `rcmp ( t -> me , "pcap_bytes_rd_per_pkt") == 0) { 1486  us ; 1488 #ide RTE_PORT_PCAP 1489 `PARSE_ERROR_INVALID (0, i_me , t -> me ); 1492 us = `r_pe_pp_sour ( p , 1493 m , NULL , t -> vue ); 1495 `PARSE_ERROR (( us =0), i_me , 1496 t -> me ); 1500 i( `rcmp ( t -> me , "pcap_file_wr") == 0) { 1501  us ; 1503 #ide RTE_PORT_PCAP 1504 `PARSE_ERROR_INVALID (0, i_me , t -> me ); 1507 us = `r_pe_pp_sk ( p , m , 1508 t -> vue , NULL ); 1510 `PARSE_ERROR (( us =0), i_me , 1511 t -> me ); 1515 i( `rcmp ( t -> me , "pcap_n_pkt_wr") == 0) { 1516  us ; 1518 #ide RTE_PORT_PCAP 1519 `PARSE_ERROR_INVALID (0, i_me , t -> me ); 1522 us = `r_pe_pp_sk ( p , m , 1523 NULL , t -> vue ); 1525 `PARSE_ERROR (( us =0), i_me , 1526 t -> me ); 1531 `APP_CHECK (( m -> n_gs < APP_MAX_PIPELINE_ARGS ), 1533 "pecifdams", i_me ); 1535 m -> gs_me [m-> n_gs ] = `rdup ( t -> me ); 1536 m -> gs_vue [m-> n_gs ] = `rdup ( t -> vue ); 1538 `APP_CHECK (( m -> gs_me [m-> n_gs ] ! NULL ) && 1539 ( m -> gs_vue [m-> n_gs ] ! NULL ), 1542 m -> n_gs ++; 1545 m -> rd = 1; 1547 `tf ( me , ame), "MSGQ-REQ-%s", i_me ); 1548 m_idx = `APP_PARAM_ADD ( p -> msgq_ms , me ); 1549 `PARSER_PARAM_ADD_CHECK ( m_idx , p -> msgq_ms , me ); 1550 p -> msgq_ms [ m_idx ]. u_sock_id = m -> sock_id ; 1551 m -> msgq_ [m-> n_msgq_ ++] = m_idx ; 1553 `tf ( me , ame), "MSGQ-RSP-%s", i_me ); 1554 m_idx = `APP_PARAM_ADD ( p -> msgq_ms , me ); 1555 `PARSER_PARAM_ADD_CHECK ( m_idx , p -> msgq_ms , me ); 1556 p -> msgq_ms [ m_idx ]. u_sock_id = m -> sock_id ; 1557 m -> msgq_out [m-> n_msgq_out ++] = m_idx ; 1559 `tf ( me , ame), "MSGQ-REQ-CORE-s%" PRIu32 "c%" PRIu32 "%s", 1560 m -> sock_id , 1561 m -> ce_id , 1562 ( m -> hyr_th_id ) ? "h" : ""); 1563 m_idx = `APP_PARAM_ADD ( p -> msgq_ms , me ); 1564 `PARSER_PARAM_ADD_CHECK ( m_idx , p -> msgq_ms , me ); 1565 p -> msgq_ms [ m_idx ]. u_sock_id = m -> sock_id ; 1567 `tf ( me , ame), "MSGQ-RSP-CORE-s%" PRIu32 "c%" PRIu32 "%s", 1568 m -> sock_id , 1569 m -> ce_id , 1570 ( m -> hyr_th_id ) ? "h" : ""); 1571 m_idx = `APP_PARAM_ADD ( p -> msgq_ms , me ); 1572 `PARSER_PARAM_ADD_CHECK ( m_idx , p -> msgq_ms , me ); 1573 p -> msgq_ms [ m_idx ]. u_sock_id = m -> sock_id ; 1575 ` ( s ); 1576 } } 1579 $r_mempo ( p_ms * p , 1580 cڡ * i_me , 1581  e_cfgfe * cfg ) 1583  p_mempo_ms * m ; 1584  e_cfgfe_y * s ; 1585 ssize_t m_idx ; 1586  n_s , i ; 1588 n_s = `e_cfgfe_i_num_s ( cfg , i_me ); 1589 `PARSE_ERROR_SECTION_NO_ENTRIES (( n_s > 0), i_me ); 1591 s = `mloc ( n_s * ( e_cfgfe_y )); 1592 `PARSE_ERROR_MALLOC ( s ! NULL ); 1594 `e_cfgfe_i_s ( cfg , i_me , s , n_s ); 1596 m_idx = `APP_PARAM_ADD ( p -> mempo_ms , i_me ); 1597 `PARSER_PARAM_ADD_CHECK ( m_idx , p -> mempo_ms , i_me ); 1599 m = & p -> mempo_ms [ m_idx ]; 1601  i = 0; i < n_s ; i++) { 1602  e_cfgfe_y * t = & s [ i ]; 1604 i( `rcmp ( t -> me , "buffer_size") == 0) { 1605  us = `rr_ad_ut32 ( 1606 & m -> bufr_size , t -> vue ); 1608 `PARSE_ERROR (( us =0), i_me , 1609 t -> me ); 1613 i( `rcmp ( t -> me , "pool_size") == 0) { 1614  us = `rr_ad_ut32 ( 1615 & m -> po_size , t -> vue ); 1617 `PARSE_ERROR (( us =0), i_me , 1618 t -> me ); 1622 i( `rcmp ( t -> me , "cache_size") == 0) { 1623  us = `rr_ad_ut32 ( 1624 & m -> che_size , t -> vue ); 1626 `PARSE_ERROR (( us =0), i_me , 1627 t -> me ); 1631 i( `rcmp ( t -> me , "cpu") == 0) { 1632  us = `rr_ad_ut32 ( 1633 & m -> u_sock_id , t -> vue ); 1635 `PARSE_ERROR (( us =0), i_me , 1636 t -> me ); 1641 `PARSE_ERROR_INVALID (0, i_me , t -> me ); 1644 m -> rd = 1; 1646 ` ( s ); 1647 } } 1650 $r_lk ( p_ms * p , 1651 cڡ * i_me , 1652  e_cfgfe * cfg ) 1654  p_lk_ms * m ; 1655  e_cfgfe_y * s ; 1656  n_s , i ; 1657  pci_bdf_e = 0; 1658 ssize_t m_idx ; 1660 n_s = `e_cfgfe_i_num_s ( cfg , i_me ); 1661 `PARSE_ERROR_SECTION_NO_ENTRIES (( n_s > 0), i_me ); 1663 s = `mloc ( n_s * ( e_cfgfe_y )); 1664 `PARSE_ERROR_MALLOC ( s ! NULL ); 1666 `e_cfgfe_i_s ( cfg , i_me , s , n_s ); 1668 m_idx = `APP_PARAM_ADD ( p -> lk_ms , i_me ); 1669 `PARSER_PARAM_ADD_CHECK ( m_idx , p -> lk_ms , i_me ); 1671 m = & p -> lk_ms [ m_idx ]; 1673  i = 0; i < n_s ; i++) { 1674  e_cfgfe_y * t = & s [ i ]; 1676 i( `rcmp ( t -> me , "promisc") == 0) { 1677  us = `rr_ad_g_bo ( t -> vue ); 1679 `PARSE_ERROR (( us !- EINVAL ), i_me , 1680 t -> me ); 1681 m -> omisc = us ; 1685 i( `rcmp ( t -> me , "arp_q") == 0) { 1686  us = `rr_ad_ut32 (& m -> p_q , 1687 t -> vue ); 1689 `PARSE_ERROR (( us =0), i_me , 1690 t -> me ); 1694 i( `rcmp ( t -> me , "tcp_syn_q") == 0) { 1695  us = `rr_ad_ut32 ( 1696 & m -> t_syn_q , t -> vue ); 1698 `PARSE_ERROR (( us =0), i_me , t -> me ); 1702 i( `rcmp ( t -> me , "ip_local_q") == 0) { 1703  us = `rr_ad_ut32 ( 1704 & m -> _lol_q , t -> vue ); 1706 `PARSE_ERROR (( us =0), i_me , 1707 t -> me ); 1712 i( `rcmp ( t -> me , "tcp_local_q") == 0) { 1713  us = `rr_ad_ut32 ( 1714 & m -> t_lol_q , t -> vue ); 1716 `PARSE_ERROR (( us =0), i_me , 1717 t -> me ); 1721 i( `rcmp ( t -> me , "udp_local_q") == 0) { 1722  us = `rr_ad_ut32 ( 1723 & m -> udp_lol_q , t -> vue ); 1725 `PARSE_ERROR (( us =0), i_me , 1726 t -> me ); 1730 i( `rcmp ( t -> me , "sctp_local_q") == 0) { 1731  us = `rr_ad_ut32 ( 1732 & m -> sp_lol_q , t -> vue ); 1734 `PARSE_ERROR (( us =0), i_me , 1735 t -> me ); 1739 i( `rcmp ( t -> me , "pci_bdf") == 0) { 1740 `PARSE_ERROR_DUPLICATE (( pci_bdf_e == 0), 1741 i_me , t -> me ); 1743 `tf ( m -> pci_bdf , APP_LINK_PCI_BDF_SIZE , 1744 "%s", t -> vue ); 1745 pci_bdf_e = 1; 1750 `PARSE_ERROR_INVALID (0, i_me , t -> me ); 1754 i( p -> pt_mask ) 1755 `PARSE_ERROR_MESSAGE (( pci_bdf_e == 0), 1756 i_me , "pci_bdf", 1759 `PARSE_ERROR_MESSAGE (( pci_bdf_e ), 1760 i_me , "pci_bdf", 1764 m -> rd = 1; 1766 ` ( s ); 1767 } } 1770 $r_rxq ( p_ms * p , 1771 cڡ * i_me , 1772  e_cfgfe * cfg ) 1774  p_pktq_hwq__ms * m ; 1775  e_cfgfe_y * s ; 1776  n_s , i ; 1777 ssize_t m_idx ; 1779 n_s = `e_cfgfe_i_num_s ( cfg , i_me ); 1780 `PARSE_ERROR_SECTION_NO_ENTRIES (( n_s > 0), i_me ); 1782 s = `mloc ( n_s * ( e_cfgfe_y )); 1783 `PARSE_ERROR_MALLOC ( s ! NULL ); 1785 `e_cfgfe_i_s ( cfg , i_me , s , n_s ); 1787 m_idx = `APP_PARAM_ADD ( p -> hwq__ms , i_me ); 1788 `PARSER_PARAM_ADD_CHECK ( m_idx , p -> hwq__ms , i_me ); 1790 m = & p -> hwq__ms [ m_idx ]; 1792  i = 0; i < n_s ; i++) { 1793  e_cfgfe_y * t = & s [ i ]; 1795 i( `rcmp ( t -> me , "mempool") == 0) { 1796  us = `vide_me ( t -> vue , 1798 ssize_t idx ; 1800 `PARSE_ERROR (( us =0), i_me , 1801 t -> me ); 1802 idx = `APP_PARAM_ADD ( p -> mempo_ms , 1803 t -> vue ); 1804 `PARSER_PARAM_ADD_CHECK ( idx , p -> mempo_ms , 1805 i_me ); 1806 m -> mempo_id = idx ; 1810 i( `rcmp ( t -> me , "size") == 0) { 1811  us = `rr_ad_ut32 (& m -> size , 1812 t -> vue ); 1814 `PARSE_ERROR (( us =0), i_me , 1815 t -> me ); 1819 i( `rcmp ( t -> me , "burst") == 0) { 1820  us = `rr_ad_ut32 (& m -> bur , 1821 t -> vue ); 1823 `PARSE_ERROR (( us =0), i_me , 1824 t -> me ); 1829 `PARSE_ERROR_INVALID (0, i_me , t -> me ); 1832 m -> rd = 1; 1834 ` ( s ); 1835 } } 1838 $r_txq ( p_ms * p , 1839 cڡ * i_me , 1840  e_cfgfe * cfg ) 1842  p_pktq_hwq_out_ms * m ; 1843  e_cfgfe_y * s ; 1844  n_s , i ; 1845 ssize_t m_idx ; 1847 n_s = `e_cfgfe_i_num_s ( cfg , i_me ); 1848 `PARSE_ERROR_SECTION_NO_ENTRIES (( n_s > 0), i_me ); 1850 s = `mloc ( n_s * ( e_cfgfe_y )); 1851 `PARSE_ERROR_MALLOC ( s ! NULL ); 1853 `e_cfgfe_i_s ( cfg , i_me , s , n_s ); 1855 m_idx = `APP_PARAM_ADD ( p -> hwq_out_ms , i_me ); 1856 `PARSER_PARAM_ADD_CHECK ( m_idx , p -> hwq_out_ms , i_me ); 1858 m = & p -> hwq_out_ms [ m_idx ]; 1860  i = 0; i < n_s ; i++) { 1861  e_cfgfe_y * t = & s [ i ]; 1863 i( `rcmp ( t -> me , "size") == 0) { 1864  us = `rr_ad_ut32 (& m -> size , 1865 t -> vue ); 1867 `PARSE_ERROR (( us =0), i_me , 1868 t -> me ); 1872 i( `rcmp ( t -> me , "burst") == 0) { 1873  us = `rr_ad_ut32 (& m -> bur , 1874 t -> vue ); 1876 `PARSE_ERROR (( us =0), i_me , 1877 t -> me ); 1881 i( `rcmp ( t -> me , "dropless") == 0) { 1882  us = `rr_ad_g_bo ( t -> vue ); 1885 `PARSE_ERROR (( us !- EINVAL ), i_me , 1886 t -> me ); 1887 m -> drss = us ; 1892 `PARSE_ERROR_INVALID (0, i_me , t -> me ); 1895 m -> rd = 1; 1897 ` ( s ); 1898 } } 1901 $r_swq ( p_ms * p , 1902 cڡ * i_me , 1903  e_cfgfe * cfg ) 1905  p_pktq_swq_ms * m ; 1906  e_cfgfe_y * s ; 1907  n_s , i ; 1908 ut32_t mtu_e = 0; 1909 ut32_t mada_size_e = 0; 1910 ut32_t mempo_de_e = 0; 1911 ut32_t mempo_de_e = 0; 1913 ssize_t m_idx ; 1915 n_s = `e_cfgfe_i_num_s ( cfg , i_me ); 1916 `PARSE_ERROR_SECTION_NO_ENTRIES (( n_s > 0), i_me ); 1918 s = `mloc ( n_s * ( e_cfgfe_y )); 1919 `PARSE_ERROR_MALLOC ( s ! NULL ); 1921 `e_cfgfe_i_s ( cfg , i_me , s , n_s ); 1923 m_idx = `APP_PARAM_ADD ( p -> swq_ms , i_me ); 1924 `PARSER_PARAM_ADD_CHECK ( m_idx , p -> swq_ms , i_me ); 1926 m = & p -> swq_ms [ m_idx ]; 1928  i = 0; i < n_s ; i++) { 1929  e_cfgfe_y * t = & s [ i ]; 1931 i( `rcmp ( t -> me , "size") == 0) { 1932  us = `rr_ad_ut32 (& m -> size , 1933 t -> vue ); 1935 `PARSE_ERROR (( us =0), i_me , 1936 t -> me ); 1940 i( `rcmp ( t -> me , "burst_read") == 0) { 1941  us = `rr_ad_ut32 (& 1942 m -> bur_ad , t -> vue ); 1944 `PARSE_ERROR (( us =0), i_me , 1945 t -> me ); 1949 i( `rcmp ( t -> me , "burst_write") == 0) { 1950  us = `rr_ad_ut32 ( 1951 & m -> bur_wre , t -> vue ); 1953 `PARSE_ERROR (( us =0), i_me , 1954 t -> me ); 1958 i( `rcmp ( t -> me , "dropless") == 0) { 1959  us = `rr_ad_g_bo ( t -> vue ); 1961 `PARSE_ERROR (( us !- EINVAL ), i_me , 1962 t -> me ); 1963 m -> drss = us ; 1967 i( `rcmp ( t -> me , "n_retries") == 0) { 1968  us = `rr_ad_ut64 (& m -> n_s , 1969 t -> vue ); 1971 `PARSE_ERROR (( us =0), i_me , 1972 t -> me ); 1976 i( `rcmp ( t -> me , "cpu") == 0) { 1977  us = `rr_ad_ut32 ( 1978 & m -> u_sock_id , t -> vue ); 1980 `PARSE_ERROR (( us =0), i_me , t -> me ); 1984 i( `rcmp ( t -> me , "ipv4_frag") == 0) { 1985  us = `rr_ad_g_bo ( t -> vue ); 1987 `PARSE_ERROR (( us !- EINVAL ), i_me , 1988 t -> me ); 1990 m -> v4_ag = us ; 1991 i( m -> mtu == 0) 1992 m -> mtu = 1500; 1997 i( `rcmp ( t -> me , "ipv6_frag") == 0) { 1998  us = `rr_ad_g_bo ( t -> vue ); 2000 `PARSE_ERROR (( us !- EINVAL ), i_me , 2001 t -> me ); 2002 m -> v6_ag = us ; 2003 i( m -> mtu == 0) 2004 m -> mtu = 1320; 2008 i( `rcmp ( t -> me , "ipv4_ras") == 0) { 2009  us = `rr_ad_g_bo ( t -> vue ); 2011 `PARSE_ERROR (( us !- EINVAL ), i_me , 2012 t -> me ); 2013 m -> v4_s = us ; 2017 i( `rcmp ( t -> me , "ipv6_ras") == 0) { 2018  us = `rr_ad_g_bo ( t -> vue ); 2020 `PARSE_ERROR (( us !- EINVAL ), i_me , 2021 t -> me ); 2022 m -> v6_s = us ; 2026 i( `rcmp ( t -> me , "mtu") == 0) { 2027  us = `rr_ad_ut32 (& m -> mtu , 2028 t -> vue ); 2030 `PARSE_ERROR (( us =0), i_me , 2031 t -> me ); 2032 mtu_e = 1; 2036 i( `rcmp ( t -> me , "metadata_size") == 0) { 2037  us = `rr_ad_ut32 ( 2038 & m -> mada_size , t -> vue ); 2040 `PARSE_ERROR (( us =0), i_me , 2041 t -> me ); 2042 mada_size_e = 1; 2046 i( `rcmp ( t -> me , "mempool_direct") == 0) { 2047  us = `vide_me ( t -> vue , 2049 ssize_t idx ; 2051 `PARSE_ERROR (( us =0), i_me , 2052 t -> me ); 2054 idx = `APP_PARAM_ADD ( p -> mempo_ms , 2055 t -> vue ); 2056 `PARSER_PARAM_ADD_CHECK ( idx , p -> mempo_ms , 2057 i_me ); 2058 m -> mempo_de_id = idx ; 2059 mempo_de_e = 1; 2063 i( `rcmp ( t -> me , "mempool_indirect") == 0) { 2064  us = `vide_me ( t -> vue , 2066 ssize_t idx ; 2068 `PARSE_ERROR (( us =0), i_me , 2069 t -> me ); 2070 idx = `APP_PARAM_ADD ( p -> mempo_ms , 2071 t -> vue ); 2072 `PARSER_PARAM_ADD_CHECK ( idx , p -> mempo_ms , 2073 i_me ); 2074 m -> mempo_de_id = idx ; 2075 mempo_de_e = 1; 2080 `PARSE_ERROR_INVALID (0, i_me , t -> me ); 2083 `APP_CHECK ((( mtu_e ) && 2084 (( m -> v4_ag =1|| (m-> v6_ag == 1))), 2087 i_me ); 2089 `APP_CHECK ((( mada_size_e ) && 2090 (( m -> v4_ag =1|| (m-> v6_ag == 1))), 2093 "nهowed", i_me ); 2095 `APP_CHECK ((( mempo_de_e ) && 2096 (( m -> v4_ag =1|| (m-> v6_ag == 1))), 2099 "nهowed", i_me ); 2101 `APP_CHECK ((( mempo_de_e ) && 2102 (( m -> v4_ag =1|| (m-> v6_ag == 1))), 2105 "nهowed", i_me ); 2107 m -> rd = 1; 2109 ` ( s ); 2110 } } 2113 $r_tm ( p_ms * p , 2114 cڡ * i_me , 2115  e_cfgfe * cfg ) 2117  p_pktq_tm_ms * m ; 2118  e_cfgfe_y * s ; 2119  n_s , i ; 2120 ssize_t m_idx ; 2122 n_s = `e_cfgfe_i_num_s ( cfg , i_me ); 2123 `PARSE_ERROR_SECTION_NO_ENTRIES (( n_s > 0), i_me ); 2125 s = `mloc ( n_s * ( e_cfgfe_y )); 2126 `PARSE_ERROR_MALLOC ( s ! NULL ); 2128 `e_cfgfe_i_s ( cfg , i_me , s , n_s ); 2130 m_idx = `APP_PARAM_ADD ( p -> tm_ms , i_me ); 2131 `PARSER_PARAM_ADD_CHECK ( m_idx , p -> tm_ms , i_me ); 2133 m = & p -> tm_ms [ m_idx ]; 2135  i = 0; i < n_s ; i++) { 2136  e_cfgfe_y * t = & s [ i ]; 2138 i( `rcmp ( t -> me , "cfg") == 0) { 2139 m -> fe_me = `rdup ( t -> vue ); 2140 `PARSE_ERROR_MALLOC ( m -> fe_me ! NULL ); 2144 i( `rcmp ( t -> me , "burst_read") == 0) { 2145  us = `rr_ad_ut32 ( 2146 & m -> bur_ad , t -> vue ); 2148 `PARSE_ERROR (( us =0), i_me , 2149 t -> me ); 2153 i( `rcmp ( t -> me , "burst_write") == 0) { 2154  us = `rr_ad_ut32 ( 2155 & m -> bur_wre , t -> vue ); 2157 `PARSE_ERROR (( us =0), i_me , 2158 t -> me ); 2163 `PARSE_ERROR_INVALID (0, i_me , t -> me ); 2166 m -> rd = 1; 2168 ` ( s ); 2169 } } 2172 $r_sour ( p_ms * p , 2173 cڡ * i_me , 2174  e_cfgfe * cfg ) 2176  p_pktq_sour_ms * m ; 2177  e_cfgfe_y * s ; 2178  n_s , i ; 2179 ssize_t m_idx ; 2180 ut32_t pp_fe_e = 0; 2181 ut32_t pp_size_e = 0; 2183 n_s = `e_cfgfe_i_num_s ( cfg , i_me ); 2184 `PARSE_ERROR_SECTION_NO_ENTRIES (( n_s > 0), i_me ); 2186 s = `mloc ( n_s * ( e_cfgfe_y )); 2187 `PARSE_ERROR_MALLOC ( s ! NULL ); 2189 `e_cfgfe_i_s ( cfg , i_me , s , n_s ); 2191 m_idx = `APP_PARAM_ADD ( p -> sour_ms , i_me ); 2192 `PARSER_PARAM_ADD_CHECK ( m_idx , p -> sour_ms , i_me ); 2194 m = & p -> sour_ms [ m_idx ]; 2196  i = 0; i < n_s ; i++) { 2197  e_cfgfe_y * t = & s [ i ]; 2199 i( `rcmp ( t -> me , "mempool") == 0) { 2200  us = `vide_me ( t -> vue , 2202 ssize_t idx ; 2204 `PARSE_ERROR (( us =0), i_me , 2205 t -> me ); 2206 idx = `APP_PARAM_ADD ( p -> mempo_ms , 2207 t -> vue ); 2208 `PARSER_PARAM_ADD_CHECK ( idx , p -> mempo_ms , 2209 i_me ); 2210 m -> mempo_id = idx ; 2214 i( `rcmp ( t -> me , "burst") == 0) { 2215  us = `rr_ad_ut32 (& m -> bur , 2216 t -> vue ); 2218 `PARSE_ERROR (( us =0), i_me , 2219 t -> me ); 2223 i( `rcmp ( t -> me , "pcap_file_rd")) { 2224 `PARSE_ERROR_DUPLICATE (( pp_fe_e == 0), 2225 i_me , t -> me ); 2227 m -> fe_me = `rdup ( t -> vue ); 2229 `PARSE_ERROR_MALLOC ( m -> fe_me ! NULL ); 2230 pp_fe_e = 1; 2235 i( `rcmp ( t -> me , "pcap_bytes_rd_per_pkt") == 0) { 2236  us ; 2238 `PARSE_ERROR_DUPLICATE (( pp_size_e == 0), 2239 i_me , t -> me ); 2241 us = `rr_ad_ut32 ( 2242 & m -> n_bys_r_pkt , t -> vue ); 2244 `PARSE_ERROR (( us =0), i_me , 2245 t -> me ); 2246 pp_size_e = 1; 2252 `PARSE_ERROR_INVALID (0, i_me , t -> me ); 2255 m -> rd = 1; 2257 ` ( s ); 2258 } } 2261 $r_sk ( p_ms * p , 2262 cڡ * i_me , 2263  e_cfgfe * cfg ) 2265  p_pktq_sk_ms * m ; 2266  e_cfgfe_y * s ; 2267  n_s , i ; 2268 ssize_t m_idx ; 2269 ut32_t pp_fe_e = 0; 2270 ut32_t pp_n_pkt_e = 0; 2272 n_s = `e_cfgfe_i_num_s ( cfg , i_me ); 2273 `PARSE_ERROR_SECTION_NO_ENTRIES (( n_s > 0), i_me ); 2275 s = `mloc ( n_s * ( e_cfgfe_y )); 2276 `PARSE_ERROR_MALLOC ( s ! NULL ); 2278 `e_cfgfe_i_s ( cfg , i_me , s , n_s ); 2280 m_idx = `APP_PARAM_ADD ( p -> sk_ms , i_me ); 2281 `PARSER_PARAM_ADD_CHECK ( m_idx , p -> sk_ms , i_me ); 2283 m = & p -> sk_ms [ m_idx ]; 2285  i = 0; i < n_s ; i++) { 2286  e_cfgfe_y * t = & s [ i ]; 2288 i( `rcmp ( t -> me , "pcap_file_wr")) { 2289 `PARSE_ERROR_DUPLICATE (( pp_fe_e == 0), 2290 i_me , t -> me ); 2292 m -> fe_me = `rdup ( t -> vue ); 2294 `PARSE_ERROR_MALLOC (( m -> fe_me ! NULL )); 2299 i( `rcmp ( t -> me , "pcap_n_pkt_wr")) { 2300  us ; 2302 `PARSE_ERROR_DUPLICATE (( pp_n_pkt_e == 0), 2303 i_me , t -> me ); 2305 us = `rr_ad_ut32 ( 2306 & m -> n_pkts_to_dump , t -> vue ); 2308 `PARSE_ERROR (( us =0), i_me , 2309 t -> me ); 2315 `PARSE_ERROR_INVALID (0, i_me , t -> me ); 2318 m -> rd = 1; 2320 ` ( s ); 2321 } } 2324 $r_msgq_q_pe ( p_ms * p , 2325 cڡ * i_me , 2326  e_cfgfe * cfg ) 2328  p_msgq_ms * m ; 2329  e_cfgfe_y * s ; 2330  n_s , i ; 2331 ssize_t m_idx ; 2333 n_s = `e_cfgfe_i_num_s ( cfg , i_me ); 2334 `PARSE_ERROR_SECTION_NO_ENTRIES (( n_s > 0), i_me ); 2336 s = `mloc ( n_s * ( e_cfgfe_y )); 2337 `PARSE_ERROR_MALLOC ( s ! NULL ); 2339 `e_cfgfe_i_s ( cfg , i_me , s , n_s ); 2341 m_idx = `APP_PARAM_ADD ( p -> msgq_ms , i_me ); 2342 `PARSER_PARAM_ADD_CHECK ( m_idx , p -> msgq_ms , i_me ); 2344 m = & p -> msgq_ms [ m_idx ]; 2346  i = 0; i < n_s ; i++) { 2347  e_cfgfe_y * t = & s [ i ]; 2349 i( `rcmp ( t -> me , "size") == 0) { 2350  us = `rr_ad_ut32 (& m -> size , 2351 t -> vue ); 2353 `PARSE_ERROR (( us =0), i_me , 2354 t -> me ); 2359 `PARSE_ERROR_INVALID (0, i_me , t -> me ); 2362 m -> rd = 1; 2363 ` ( s ); 2364 } } 2367 $r_msgq_r_pe ( p_ms * p , 2368 cڡ * i_me , 2369  e_cfgfe * cfg ) 2371  p_msgq_ms * m ; 2372  e_cfgfe_y * s ; 2373  n_s , i ; 2374 ssize_t m_idx ; 2376 n_s = `e_cfgfe_i_num_s ( cfg , i_me ); 2377 `PARSE_ERROR_SECTION_NO_ENTRIES (( n_s > 0), i_me ); 2379 s = `mloc ( n_s * ( e_cfgfe_y )); 2380 `PARSE_ERROR_MALLOC ( s ! NULL ); 2382 `e_cfgfe_i_s ( cfg , i_me , s , n_s ); 2384 m_idx = `APP_PARAM_ADD ( p -> msgq_ms , i_me ); 2385 `PARSER_PARAM_ADD_CHECK ( m_idx , p -> msgq_ms , i_me ); 2387 m = & p -> msgq_ms [ m_idx ]; 2389  i = 0; i < n_s ; i++) { 2390  e_cfgfe_y * t = & s [ i ]; 2392 i( `rcmp ( t -> me , "size") == 0) { 2393  us = `rr_ad_ut32 (& m -> size , 2394 t -> vue ); 2396 `PARSE_ERROR (( us =0), i_me , 2397 t -> me ); 2402 `PARSE_ERROR_INVALID (0, i_me , t -> me ); 2405 m -> rd = 1; 2407 ` ( s ); 2408 } } 2411 $r_msgq ( p_ms * p , 2412 cڡ * i_me , 2413  e_cfgfe * cfg ) 2415  p_msgq_ms * m ; 2416  e_cfgfe_y * s ; 2417  n_s , i ; 2418 ssize_t m_idx ; 2420 n_s = `e_cfgfe_i_num_s ( cfg , i_me ); 2421 `PARSE_ERROR_SECTION_NO_ENTRIES (( n_s > 0), i_me ); 2423 s = `mloc ( n_s * ( e_cfgfe_y )); 2424 `PARSE_ERROR_MALLOC ( s ! NULL ); 2426 `e_cfgfe_i_s ( cfg , i_me , s , n_s ); 2428 m_idx = `APP_PARAM_ADD ( p -> msgq_ms , i_me ); 2429 `PARSER_PARAM_ADD_CHECK ( m_idx , p -> msgq_ms , i_me ); 2431 m = & p -> msgq_ms [ m_idx ]; 2433  i = 0; i < n_s ; i++) { 2434  e_cfgfe_y * t = & s [ i ]; 2436 i( `rcmp ( t -> me , "size") == 0) { 2437  us = `rr_ad_ut32 (& m -> size , 2438 t -> vue ); 2440 `PARSE_ERROR (( us =0), i_me , 2441 t -> me ); 2445 i( `rcmp ( t -> me , "cpu") == 0) { 2446  us = `rr_ad_ut32 ( 2447 & m -> u_sock_id , t -> vue ); 2449 `PARSE_ERROR (( us =0), i_me , 2450 t -> me ); 2455 `PARSE_ERROR_INVALID (0, i_me , t -> me ); 2458 m -> rd = 1; 2460 ` ( s ); 2461 } } 2463 (* tcfig_i_ld )( tp_ms * tp , 2464 cڡ * ti_me , 2465  te_cfgfe * tcfg ); 2467  scfig_i { 2468 cڡ  efix [ CFG_NAME_LEN ]; 2469  numbs ; 2470 cfig_i_ld ld ; 2473 cڡ  cfig_i cfg_fe_scheme [] = { 2474 {"EAL", 0, r_l }, 2475 {"PIPELINE", 1, r_pe }, 2476 {"MEMPOOL", 1, r_mempo }, 2477 {"LINK", 1, r_lk }, 2478 {"RXQ", 2, r_rxq }, 2479 {"TXQ", 2, r_txq }, 2480 {"SWQ", 1, r_swq }, 2481 {"TM", 1, r_tm }, 2482 {"SOURCE", 1, r_sour }, 2483 {"SINK", 1, r_sk }, 2484 {"MSGQ-REQ-PIPELINE", 1, r_msgq_q_pe }, 2485 {"MSGQ-RSP-PIPELINE", 1, r_msgq_r_pe }, 2486 {"MSGQ", 1, r_msgq }, 2487 } }; 2490 $_imic_mempos ( p_ms * p ) 2492 ssize_t idx ; 2494 idx = `APP_PARAM_ADD ( p -> mempo_ms , "MEMPOOL0"); 2495 `PARSER_PARAM_ADD_CHECK ( idx , p -> mempo_ms , "start-up"); 2496 } } 2499 $_imic_lks_om_pt_mask ( p_ms * p , 2500 ut64_t pt_mask ) 2502 ut32_t pmd_id , lk_id ; 2504 lk_id = 0; 2505  pmd_id = 0;md_id < RTE_MAX_ETHPORTS ;md_id++) { 2506  me [ APP_PARAM_NAME_SIZE ]; 2507 ssize_t idx ; 2509 i(( pt_mask & (1LLU << pmd_id )) == 0) 2512 `tf ( me , ame), "LINK%" PRIu32 , lk_id ); 2513 idx = `APP_PARAM_ADD ( p -> lk_ms , me ); 2514 `PARSER_PARAM_ADD_CHECK ( idx , p -> lk_ms , me ); 2516 p -> lk_ms [ idx ]. pmd_id =md_id; 2517 lk_id ++; 2519 } } 2522 $assign_lk_pmd_id_om_pci_bdf ( p_ms * p ) 2524 ut32_t i ; 2526  i = 0; i < p -> n_lks ; i++) { 2527  p_lk_ms * lk = & p -> lk_ms [ i ]; 2529 lk -> pmd_id = i ; 2531 } } 2534 $p_cfig_r ( p_ms * p , cڡ * fe_me ) 2536  e_cfgfe * cfg ; 2537 ** i_mes ; 2538  i , j , _cou ; 2541 `_imic_mempos ( p ); 2544 i( p -> pt_mask ) 2545 `_imic_lks_om_pt_mask ( p ,-> pt_mask ); 2548 cfg = `e_cfgfe_ld ( fe_me , 0); 2549 `APP_CHECK (( cfg ! NULL ), "Parserror: Unableooad config " 2550 "f%s", fe_me ); 2552 _cou = `e_cfgfe_num_is ( cfg , NULL , 0); 2553 `APP_CHECK (( _cou > 0), "Parserror:umber of sections " 2554 " f\"%s\"u %d", fe_me , 2555 _cou ); 2557 i_mes = `mloc ( _cou * (*)); 2558 `PARSE_ERROR_MALLOC ( i_mes ! NULL ); 2560  i = 0; i < _cou ; i++) 2561 i_mes [ i ] = `mloc ( CFG_NAME_LEN ); 2563 `e_cfgfe_is ( cfg , i_mes , _cou ); 2565  i = 0; i < _cou ; i++) { 2566 cڡ  cfig_i * sch_s ; 2567  n , cfg_me_n ; 2569 cfg_me_n = ` ( i_mes [ i ]); 2572  j = 0; j < () `RTE_DIM ( cfg_fe_scheme ); j++) { 2573 sch_s = & cfg_fe_scheme [ j ]; 2574 n = ` ( sch_s -> efix ); 2576 i( cfg_me_n < n ) 2585 i(( i_mes [ i ][ n ] != '\0') && 2586 ! `isdig ( i_mes [ i ][ n ])) 2589 i( `cmp ( sch_s -> efix , i_mes [ i ], n ) == 0) 2593 `APP_CHECK ( j < () `RTE_DIM ( cfg_fe_scheme ), 2595 i_mes [ i ]); 2597 `APP_CHECK ( `vide_me ( i_mes [ i ], 2598 sch_s -> efix , 2599 sch_s -> numbs ) == 0, 2601 i_mes [ i ]); 2603 sch_s -> `ld ( p , i_mes [ i ], cfg ); 2606  i = 0; i < _cou ; i++) 2607 ` ( i_mes [ i ]); 2609 ` ( i_mes ); 2611 `e_cfgfe_o ( cfg ); 2613 `APP_PARAM_COUNT ( p -> mempo_ms ,-> n_mempos ); 2614 `APP_PARAM_COUNT ( p -> lk_ms ,-> n_lks ); 2615 `APP_PARAM_COUNT ( p -> hwq__ms ,-> n_pktq_hwq_ ); 2616 `APP_PARAM_COUNT ( p -> hwq_out_ms ,-> n_pktq_hwq_out ); 2617 `APP_PARAM_COUNT ( p -> swq_ms ,-> n_pktq_swq ); 2618 `APP_PARAM_COUNT ( p -> tm_ms ,-> n_pktq_tm ); 2619 `APP_PARAM_COUNT ( p -> sour_ms ,-> n_pktq_sour ); 2620 `APP_PARAM_COUNT ( p -> sk_ms ,-> n_pktq_sk ); 2621 `APP_PARAM_COUNT ( p -> msgq_ms ,-> n_msgq ); 2622 `APP_PARAM_COUNT ( p -> pe_ms ,-> n_pes ); 2624 #ifde RTE_PORT_PCAP 2625  i = 0; i < () p -> n_pktq_sour ; i++) { 2626  p_pktq_sour_ms * p = & p -> sour_ms [ i ]; 2628 `APP_CHECK (( p -> fe_me ), "Parserror: missing " 2630 p -> me ); 2633  i = 0; i < () p -> n_pktq_sour ; i++) { 2634  p_pktq_sour_ms * p = & p -> sour_ms [ i ]; 2636 `APP_CHECK ((! p -> fe_me ), "Parserror: invalid field " 2637 "\"pp_fe_rd\" f \"%s\"", p -> me ); 2641 i( p -> pt_mask == 0) 2642 `assign_lk_pmd_id_om_pci_bdf ( p ); 2645 `p_cfig_ve ( p ,-> ouut_fe ); 2648 `p_cfig_r_tm ( p ); 2651 } } 2654 $ve_l_ms ( p_ms * p , FILE * f ) 2656  p_l_ms * p = & p -> l_ms ; 2657 ut32_t i ; 2659 `rtf ( f , "[EAL]\n"); 2661 i( p -> cem ) 2662 `rtf ( f , "%%s\n", "lces", p -> cem ); 2664 i( p -> ma_lce_e ) 2665 `rtf ( f , "%%" PRIu32 "\n", 2666 "ma_lce", p -> ma_lce ); 2668 `rtf ( f , "%%" PRIu32 "\n", "n", p -> chls ); 2670 i( p -> memy_e ) 2671 `rtf ( f , "%%" PRIu32 "\n", "m", p -> memy ); 2673 i( p -> nks_e ) 2674 `rtf ( f , "%%" PRIu32 "\n", "r", p -> nks ); 2676  i = 0; i < APP_MAX_LINKS ; i++) { 2677 i( p -> pci_bckli [ i ] = NULL ) 2680 `rtf ( f , "%s = %s\n", "pci_blacklist", 2681 p -> pci_bckli [ i ]); 2684  i = 0; i < APP_MAX_LINKS ; i++) { 2685 i( p -> pci_whi [ i ] = NULL ) 2688 `rtf ( f , "%s = %s\n", "pci_whitelist", 2689 p -> pci_whi [ i ]); 2692  i = 0; i < APP_MAX_LINKS ; i++) { 2693 i( p -> vdev [ i ] = NULL ) 2696 `rtf ( f , "%s = %s\n", "vdev", 2697 p -> vdev [ i ]); 2700 i( p -> vmwe_tsc_m_e ) 2701 `rtf ( f , "%s = %s\n", "vmware_tsc_map", 2702 ( p -> vmwe_tsc_m ) ? "yes" : "no"); 2704 i( p -> oc_ty ) 2705 `rtf ( f , "%%s\n", "oc_ty", p -> oc_ty ); 2707 i( p -> syog ) 2708 `rtf ( f , "%%s\n", "syog", p -> syog ); 2710 i( p -> log_v_e ) 2711 `rtf ( f , "%%" PRIu32 "\n", "log_v", p -> log_v ); 2713 i( p -> vsi_e ) 2714 `rtf ( f , "%%s\n", "v", ( p -> vsi ) ? "yes" : "no"); 2716 i( p -> hp_e ) 2717 `rtf ( f , "%%s\n", "hp", ( p -> hp ) ? "yes" : "no"); 2719 i( p -> no_huge_e ) 2720 `rtf ( f , "%%s\n", "no_huge", ( p -> no_huge ) ? "yes" : "no"); 2722 i( p -> no_pci_e ) 2723 `rtf ( f , "%%s\n", "no_pci", ( p -> no_pci ) ? "yes" : "no"); 2725 i( p -> no_ht_e ) 2726 `rtf ( f , "%%s\n", "no_ht", ( p -> no_ht ) ? "yes" : "no"); 2728 i( p -> no_shcf_e ) 2729 `rtf ( f , "%s = %s\n", "no_shconf", 2730 ( p -> no_shcf ) ? "yes" : "no"); 2732 i( p -> add_driv ) 2733 `rtf ( f , "%%s\n", "d", p -> add_driv ); 2735 i( p -> sock_mem ) 2736 `rtf ( f , "%%s\n", "sock_mem", p -> sock_mem ); 2738 i( p -> huge_d ) 2739 `rtf ( f , "%%s\n", "huge_d", p -> huge_d ); 2741 i( p -> fe_efix ) 2742 `rtf ( f , "%%s\n", "fe_efix", p -> fe_efix ); 2744 i( p -> ba_vddr ) 2745 `rtf ( f , "%%s\n", "ba_vddr", p -> ba_vddr ); 2747 i( p -> _uio_dev_e ) 2748 `rtf ( f , "%s = %s\n", "create_uio_dev", 2749 ( p -> _uio_dev ) ? "yes" : "no"); 2751 i( p -> vfio_ ) 2752 `rtf ( f , "%%s\n", "vfio_", p -> vfio_ ); 2754 i( p -> x_dom0_e ) 2755 `rtf ( f , "%s = %s\n", "xen_dom0", 2756 ( p -> x_dom0 ) ? "yes" : "no"); 2758 `utc ('\n', f ); 2759 } } 2762 $ve_mempo_ms ( p_ms * p , FILE * f ) 2764  p_mempo_ms * p ; 2765 size_t i , cou ; 2767 cou = `RTE_DIM ( p -> mempo_ms ); 2768  i = 0; i < cou ; i++) { 2769 p = & p -> mempo_ms [ i ]; 2770 i(! `APP_PARAM_VALID ( p )) 2773 `rtf ( f , "[%s]\n", p -> me ); 2774 `rtf ( f , "%%" PRIu32 "\n", "bufr_size", p -> bufr_size ); 2775 `rtf ( f , "%%" PRIu32 "\n", "po_size", p -> po_size ); 2776 `rtf ( f , "%%" PRIu32 "\n", "che_size", p -> che_size ); 2777 `rtf ( f , "%%" PRIu32 "\n", "u", p -> u_sock_id ); 2779 `utc ('\n', f ); 2781 } } 2784 $ve_lks_ms ( p_ms * p , FILE * f ) 2786  p_lk_ms * p ; 2787 size_t i , cou ; 2789 cou = `RTE_DIM ( p -> lk_ms ); 2790  i = 0; i < cou ; i++) { 2791 p = & p -> lk_ms [ i ]; 2792 i(! `APP_PARAM_VALID ( p )) 2795 `rtf ( f , "[%s]\n", p -> me ); 2796 `rtf ( f , "; %%" PRIu32 "\n", "pmd_id", p -> pmd_id ); 2797 `rtf ( f , "%%s\n", "omisc", p -> omisc ? "yes" : "no"); 2798 `rtf ( f , "%%" PRIu32 "\n", "p_q", p -> p_q ); 2799 `rtf ( f , "%%" PRIu32 "\n", "tcp_syn_q", 2800 p -> t_syn_q ); 2801 `rtf ( f , "%%" PRIu32 "\n", "_lol_q", p -> _lol_q ); 2802 `rtf ( f , "%%" PRIu32 "\n", "t_lol_q", p -> t_lol_q ); 2803 `rtf ( f , "%%" PRIu32 "\n", "udp_lol_q", p -> udp_lol_q ); 2804 `rtf ( f , "%%" PRIu32 "\n", "sctp_local_q", 2805 p -> sp_lol_q ); 2807 i( ` ( p -> pci_bdf )) 2808 `rtf ( f , "%%s\n", "pci_bdf", p -> pci_bdf ); 2810 `utc ('\n', f ); 2812 } } 2815 $ve_rxq_ms ( p_ms * p , FILE * f ) 2817  p_pktq_hwq__ms * p ; 2818 size_t i , cou ; 2820 cou = `RTE_DIM ( p -> hwq__ms ); 2821  i = 0; i < cou ; i++) { 2822 p = & p -> hwq__ms [ i ]; 2823 i(! `APP_PARAM_VALID ( p )) 2826 `rtf ( f , "[%s]\n", p -> me ); 2827 `rtf ( f , "%s = %s\n", 2829 p -> mempo_ms [ p -> mempo_id ]. me ); 2830 `rtf ( f , "%%" PRIu32 "\n", "size", p -> size ); 2831 `rtf ( f , "%%" PRIu32 "\n", "bur", p -> bur ); 2833 `utc ('\n', f ); 2835 } } 2838 $ve_txq_ms ( p_ms * p , FILE * f ) 2840  p_pktq_hwq_out_ms * p ; 2841 size_t i , cou ; 2843 cou = `RTE_DIM ( p -> hwq_out_ms ); 2844  i = 0; i < cou ; i++) { 2845 p = & p -> hwq_out_ms [ i ]; 2846 i(! `APP_PARAM_VALID ( p )) 2849 `rtf ( f , "[%s]\n", p -> me ); 2850 `rtf ( f , "%%" PRIu32 "\n", "size", p -> size ); 2851 `rtf ( f , "%%" PRIu32 "\n", "bur", p -> bur ); 2852 `rtf ( f , "%s = %s\n", 2854 p -> drss ? "yes" : "no"); 2856 `utc ('\n', f ); 2858 } } 2861 $ve_swq_ms ( p_ms * p , FILE * f ) 2863  p_pktq_swq_ms * p ; 2864 size_t i , cou ; 2866 cou = `RTE_DIM ( p -> swq_ms ); 2867  i = 0; i < cou ; i++) { 2868 p = & p -> swq_ms [ i ]; 2869 i(! `APP_PARAM_VALID ( p )) 2872 `rtf ( f , "[%s]\n", p -> me ); 2873 `rtf ( f , "%%" PRIu32 "\n", "size", p -> size ); 2874 `rtf ( f , "%%" PRIu32 "\n", "bur_ad", p -> bur_ad ); 2875 `rtf ( f , "%%" PRIu32 "\n", "bur_wre", p -> bur_wre ); 2876 `rtf ( f , "%%s\n", "drss", p -> drss ? "yes" : "no"); 2877 `rtf ( f , "%%" PRIu64 "\n", "n_s", p -> n_s ); 2878 `rtf ( f , "%%" PRIu32 "\n", "u", p -> u_sock_id ); 2879 `rtf ( f , "%%s\n", "v4_ag", p -> v4_ag ? "yes" : "no"); 2880 `rtf ( f , "%%s\n", "v6_ag", p -> v6_ag ? "yes" : "no"); 2881 `rtf ( f , "%%s\n", "v4_s", p -> v4_s ? "yes" : "no"); 2882 `rtf ( f , "%%s\n", "v6_s", p -> v6_s ? "yes" : "no"); 2883 i(( p -> v4_ag =1|| (p-> v6_ag == 1)) { 2884 `rtf ( f , "%%" PRIu32 "\n", "mtu", p -> mtu ); 2885 `rtf ( f , "%%" PRIu32 "\n", "mada_size", p -> mada_size ); 2886 `rtf ( f , "%s = %s\n", 2888 p -> mempo_ms [ p -> mempo_de_id ]. me ); 2889 `rtf ( f , "%s = %s\n", 2891 p -> mempo_ms [ p -> mempo_de_id ]. me ); 2894 `utc ('\n', f ); 2896 } } 2899 $ve_tm_ms ( p_ms * p , FILE * f ) 2901  p_pktq_tm_ms * p ; 2902 size_t i , cou ; 2904 cou = `RTE_DIM ( p -> tm_ms ); 2905  i = 0; i < cou ; i++) { 2906 p = & p -> tm_ms [ i ]; 2907 i(! `APP_PARAM_VALID ( p )) 2910 `rtf ( f , "[%s]\n", p -> me ); 2911 `rtf ( f , "%%s\n", "cfg", p -> fe_me ); 2912 `rtf ( f , "%%" PRIu32 "\n", "bur_ad", p -> bur_ad ); 2913 `rtf ( f , "%%" PRIu32 "\n", "bur_wre", p -> bur_wre ); 2915 `utc ('\n', f ); 2917 } } 2920 $ve_sour_ms ( p_ms * p , FILE * f ) 2922  p_pktq_sour_ms * p ; 2923 size_t i , cou ; 2925 cou = `RTE_DIM ( p -> sour_ms ); 2926  i = 0; i < cou ; i++) { 2927 p = & p -> sour_ms [ i ]; 2928 i(! `APP_PARAM_VALID ( p )) 2931 `rtf ( f , "[%s]\n", p -> me ); 2932 `rtf ( f , "%s = %s\n", 2934 p -> mempo_ms [ p -> mempo_id ]. me ); 2935 `rtf ( f , "%%" PRIu32 "\n", "bur", p -> bur ); 2936 `rtf ( f , "%%s\n", "pp_fe_rd", p -> fe_me ); 2937 `rtf ( f , "%%" PRIu32 "\n", "pcap_bytes_rd_per_pkt", 2938 p -> n_bys_r_pkt ); 2939 `utc ('\n', f ); 2941 } } 2944 $ve_sk_ms ( p_ms * p , FILE * f ) 2946  p_pktq_sk_ms * p ; 2947 size_t i , cou ; 2949 cou = `RTE_DIM ( p -> sk_ms ); 2950  i = 0; i < cou ; i++) { 2951 p = & p -> sk_ms [ i ]; 2952 i(! `APP_PARAM_VALID ( p )) 2955 `rtf ( f , "[%s]\n", p -> me ); 2956 `rtf ( f , "%%s\n", "pp_fe_wr", p -> fe_me ); 2957 `rtf ( f , "%%" PRIu32 "\n", 2958 "pp_n_pkt_wr", p -> n_pkts_to_dump ); 2959 `utc ('\n', f ); 2961 } } 2964 $ve_msgq_ms ( p_ms * p , FILE * f ) 2966  p_msgq_ms * p ; 2967 size_t i , cou ; 2969 cou = `RTE_DIM ( p -> msgq_ms ); 2970  i = 0; i < cou ; i++) { 2971 p = & p -> msgq_ms [ i ]; 2972 i(! `APP_PARAM_VALID ( p )) 2975 `rtf ( f , "[%s]\n", p -> me ); 2976 `rtf ( f , "%%" PRIu32 "\n", "size", p -> size ); 2977 `rtf ( f , "%%" PRIu32 "\n", "u", p -> u_sock_id ); 2979 `utc ('\n', f ); 2981 } } 2984 $ve_pe_ms ( p_ms * p , FILE * f ) 2986 size_t i , cou ; 2988 cou = `RTE_DIM ( p -> pe_ms ); 2989  i = 0; i < cou ; i++) { 2990  p_pe_ms * p = & p -> pe_ms [ i ]; 2992 i(! `APP_PARAM_VALID ( p )) 2996 `rtf ( f , "[%s]\n", p -> me ); 2999 `rtf ( f , "ty = %s\n", p -> ty ); 3002 `rtf ( f , "cܐs%" PRIu32 "c%" PRIu32 "%s\n", 3003 p -> sock_id , 3004 p -> ce_id , 3005 ( p -> hyr_th_id ) ? "h" : ""); 3008 i( p -> n_pktq_ ) { 3009 ut32_t j ; 3011 `rtf ( f , "pktq_in ="); 3012  j = 0; j < p -> n_pktq_ ; j++) { 3013  p_pktq__ms * = & p -> pktq_ [ j ]; 3014 * me ; 3016  -> ty ) { 3017  APP_PKTQ_IN_HWQ : 3018 me = p -> hwq__ms [ -> id ].name; 3020  APP_PKTQ_IN_SWQ : 3021 me = p -> swq_ms [ -> id ].name; 3023  APP_PKTQ_IN_TM : 3024 me = p -> tm_ms [ -> id ].name; 3026  APP_PKTQ_IN_SOURCE : 3027 me = p -> sour_ms [ -> id ].name; 3030 `APP_CHECK (0, "Systemrror " 3035 `rtf ( f , " %s", me ); 3037 `rtf ( f , "\n"); 3041 i( p -> n_pktq_out ) { 3042 ut32_t j ; 3044 `rtf ( f , "pktq_out ="); 3045  j = 0; j < p -> n_pktq_out ; j++) { 3046  p_pktq_out_ms * = 3047 & p -> pktq_out [ j ]; 3048 * me ; 3050  -> ty ) { 3051  APP_PKTQ_OUT_HWQ : 3052 me = p -> hwq_out_ms [ -> id ].name; 3054  APP_PKTQ_OUT_SWQ : 3055 me = p -> swq_ms [ -> id ].name; 3057  APP_PKTQ_OUT_TM : 3058 me = p -> tm_ms [ -> id ].name; 3060  APP_PKTQ_OUT_SINK : 3061 me = p -> sk_ms [ -> id ].name; 3064 `APP_CHECK (0, "Systemrror " 3069 `rtf ( f , " %s", me ); 3071 `rtf ( f , "\n"); 3075 i( p -> n_msgq_ ) { 3076 ut32_t j ; 3078 `rtf ( f , "msgq_in ="); 3079  j = 0; j < p -> n_msgq_ ; j++) { 3080 ut32_t id = p -> msgq_ [ j ]; 3081 * me = p -> msgq_ms [ id ].name; 3083 `rtf ( f , " %s", me ); 3085 `rtf ( f , "\n"); 3089 i( p -> n_msgq_out ) { 3090 ut32_t j ; 3092 `rtf ( f , "msgq_out ="); 3093  j = 0; j < p -> n_msgq_out ; j++) { 3094 ut32_t id = p -> msgq_out [ j ]; 3095 * me = p -> msgq_ms [ id ].name; 3097 `rtf ( f , " %s", me ); 3099 `rtf ( f , "\n"); 3103 `rtf ( f , "tim_riod = %" PRIu32 "\n", p -> tim_riod ); 3106 i( p -> n_gs ) { 3107 ut32_t j ; 3109  j = 0; j < p -> n_gs ; j++) 3110 `rtf ( f , "%%s\n", p -> gs_me [ j ], 3111 p -> gs_vue [ j ]); 3114 `rtf ( f , "\n"); 3116 } } 3119 $p_cfig_ve ( p_ms * p , cڡ * fe_me ) 3121 FILE * fe ; 3122 * me , * d_me ; 3123  us ; 3125 me = `rdup ( fe_me ); 3126 d_me = `dme ( me ); 3127 us = `acss ( d_me , W_OK ); 3128 `APP_CHECK (( us == 0), 3130 "\"%s\"اvcfiguti\n", d_me ); 3132 fe = `fݒ ( fe_me , "w"); 3133 `APP_CHECK (( fe ! NULL ), 3135 fe_me ); 3137 `ve_l_ms ( p , fe ); 3138 `ve_pe_ms ( p , fe ); 3139 `ve_mempo_ms ( p , fe ); 3140 `ve_lks_ms ( p , fe ); 3141 `ve_rxq_ms ( p , fe ); 3142 `ve_txq_ms ( p , fe ); 3143 `ve_swq_ms ( p , fe ); 3144 `ve_tm_ms ( p , fe ); 3145 `ve_sour_ms ( p , fe ); 3146 `ve_sk_ms ( p , fe ); 3147 `ve_msgq_ms ( p , fe ); 3149 `fo ( fe ); 3150 ` ( me ); 3151 } } 3154 $p_cfig_ ( p_ms * p ) 3156 size_t i ; 3158 `memy ( p , & p_ms_deu , ( p_ms )); 3160  i = 0; i < `RTE_DIM ( p -> mempo_ms ); i++) 3161 `memy (& p -> mempo_ms [ i ], 3162 & mempo_ms_deu , 3163 ( p_mempo_ms )); 3165  i = 0; i < `RTE_DIM ( p -> lk_ms ); i++) 3166 `memy (& p -> lk_ms [ i ], 3167 & lk_ms_deu , 3168 ( p_lk_ms )); 3170  i = 0; i < `RTE_DIM ( p -> hwq__ms ); i++) 3171 `memy (& p -> hwq__ms [ i ], 3172 & deu_hwq__ms , 3173 ( deu_hwq__ms )); 3175  i = 0; i < `RTE_DIM ( p -> hwq_out_ms ); i++) 3176 `memy (& p -> hwq_out_ms [ i ], 3177 & deu_hwq_out_ms , 3178 ( deu_hwq_out_ms )); 3180  i = 0; i < `RTE_DIM ( p -> swq_ms ); i++) 3181 `memy (& p -> swq_ms [ i ], 3182 & deu_swq_ms , 3183 ( deu_swq_ms )); 3185  i = 0; i < `RTE_DIM ( p -> tm_ms ); i++) 3186 `memy (& p -> tm_ms [ i ], 3187 & deu_tm_ms , 3188 ( deu_tm_ms )); 3190  i = 0; i < `RTE_DIM ( p -> sour_ms ); i++) 3191 `memy (& p -> sour_ms [ i ], 3192 & deu_sour_ms , 3193 ( deu_sour_ms )); 3195  i = 0; i < `RTE_DIM ( p -> sk_ms ); i++) 3196 `memy (& p -> sk_ms [ i ], 3197 & deu_sk_ms , 3198 ( deu_sk_ms )); 3200  i = 0; i < `RTE_DIM ( p -> msgq_ms ); i++) 3201 `memy (& p -> msgq_ms [ i ], 3202 & deu_msgq_ms , 3203 ( deu_msgq_ms )); 3205  i = 0; i < `RTE_DIM ( p -> pe_ms ); i++) 3206 `memy (& p -> pe_ms [ i ], 3207 & deu_pe_ms , 3208 ( deu_pe_ms )); 3211 } } 3214 $famedup (cڡ * fame , cڡ * suffix ) 3216 * s = `mloc ( ` ( fame + sn( suffix ) + 1); 3218 i(! s ) 3219  NULL ; 3221 `rtf ( s , "%s%s", fame , suffix ); 3222  s ; 3223 } } 3226 $p_cfig_gs ( p_ms * p ,  gc , ** gv ) 3228 cڡ * ݊ame ; 3229  t , ti_dex ; 3230  f_e , s_e , p_e , l_e ; 3231  roc_e , roc_ms_e , dib_csum_e ; 3232  hwlb_e ; 3233  ow_d_e ; 3234  sd = 0; 3236  ti lgts [] = { 3242 { NULL , 0, 0, 0 } 3246 `y ( p -> p_me , gv [0], APP_APPNAME_SIZE - 1); 3248 f_e = 0; 3249 s_e = 0; 3250 p_e = 0; 3251 l_e = 0; 3252 dib_csum_e = 0; 3253 roc_e = 0; 3254 roc_ms_e = 0; 3255 p -> hd_csum_q =1; 3256 hwlb_e = 0; 3257 ow_d_e = 0; 3260 ( t = `gt_lg ( gc , gv , "f:s:p:l:", lgts , 3261 & ti_dex )! EOF ) 3262  t ) { 3264 i( f_e ) 3265 `e_nic ("Error: Config file isrovided " 3267 f_e = 1; 3269 i(! ` ( ݏrg )) 3270 `e_nic ("Error: Config fileame isull\n"); 3272 p -> cfig_fe = `rdup ( ݏrg ); 3273 i( p -> cfig_fe = NULL ) 3274 `e_nic ("Error: Memoryllocation failure\n"); 3279 i( s_e ) 3280 `e_nic ("Error: Script file isrovided " 3282 s_e = 1; 3284 i(! ` ( ݏrg )) 3285 `e_nic ("Error: Script fileame isull\n"); 3287 p -> st_fe = `rdup ( ݏrg ); 3288 i( p -> st_fe = NULL ) 3289 `e_nic ("Error: Memoryllocation failure\n"); 3294 i( p_e ) 3295 `e_nic ("Error: PORT_MASK isrovided " 3297 p_e = 1; 3299 i(( `ssnf ( ݏrg , "%" SCNx64 "%n", & p -> pt_mask , 3300 & sd ) != 1) || 3301 (( size_t sd ! ` ( ݏrg ))) 3302 `e_nic ("Error: PORT_MASK isot " 3305 i( p -> pt_mask == 0) 3306 `e_nic ("Error: PORT_MASK isull\n"); 3311 i( l_e ) 3312 `e_nic ("Error: LOG_LEVEL isrovided " 3314 l_e = 1; 3316 i(( `ssnf ( ݏrg , "%" SCNu32 "%n", & p -> log_v , 3317 & sd ) != 1) || 3318 (( size_t sd ! ` ( ݏrg )) || 3319 ( p -> log_v > APP_LOG_LEVELS )) 3320 `e_nic ("Error: LOG_LEVEL invalid value\n"); 3325 ݊ame = lgts [ ti_dex ]. me ; 3327 i( `rcmp ( ݊ame , "hwlb") == 0) { 3328 i( hwlb_e ) 3329 `e_nic ("Error: hwlbrgument " 3331 hwlb_e = 1; 3332 `tf (" HWLB is configured\n"); 3334 p -> n_hwlb_q = `oi ( ݏrg ); 3336 if(! p -> n_hwlb_q ) 3337 `e_nic ("HWQs for HWLB must betleast 1\n"); 3339 `tf ("NoHWQf HWLB %d\n", p -> n_hwlb_q ); 3340 ab_hwlb = 1; 3344 i( `rcmp ( ݊ame , "flow_dir") == 0) { 3345 i( ow_d_e ) 3346 `e_nic ("Error: flow_dirrgument " 3348 ow_d_e = 1; 3349 `tf (" FLOW DIR is configured\n"); 3351 ab_ow_d = 1; 3356 i( `rcmp ( ݊ame , "disable-hw-csum") == 0) { 3357 i( dib_csum_e ) 3358 `e_nic ("Error: disable-hw-csumrgument " 3361 `tf ("Disable TCP/UDP HW checksumi\n"); 3362 p -> hd_csum_q = 0; 3363 dib_csum_e = 1; 3367 i( `rcmp ( ݊ame , "preproc") == 0) { 3368 i( roc_e ) 3369 `e_nic ("Error: Preprocessorrgument " 3371 roc_e = 1; 3373 p -> roc = `rdup ( ݏrg ); 3377 i( `rcmp ( ݊ame , "preproc-args") == 0) { 3378 i( roc_ms_e ) 3379 `e_nic ("Error: Preprocessorrgs " 3381 roc_ms_e = 1; 3383 p -> roc_gs = `rdup ( ݏrg ); 3387 `p_t_uge ( gv [0]); 3391 `p_t_uge ( gv [0]); 3394 td = 0; 3397 i( roc_ms_e && ( roc_e == 0)) 3398 `e_nic ("Error: Preprocessorrgs specified while " 3401 p -> rr_fe = roc_e ? 3402 `famedup ( p -> cfig_fe , ".preproc") : 3403 `rdup ( p -> cfig_fe ); 3404 p -> ouut_fe = `famedup ׵-> cfig_fe , ".out"); 3407 } } 3410 $p_cfig_roc ( p_ms * p ) 3412  bufr [256]; 3413  us ; 3415 i( p -> roc = NULL ) 3418 us = `acss ( p -> cfig_fe , F_OK | R_OK ); 3419 `APP_CHECK (( us == 0), "Error: Unableo open file %s", 3420 p -> cfig_fe ); 3422 `tf ( bufr , (buffer), "%s %s %s > %s", 3423 p -> roc , 3424 p -> roc_gs ?pp->preproc_args : "", 3425 p -> cfig_fe , 3426 p -> rr_fe ); 3428 us = `syem ( bufr ); 3429 `APP_CHECK (( `WIFEXITED ( us && ( `WEXITSTATUS (status) == 0)), 3431 p -> cfig_fe ); 3433  us ; 3434 } } @vnf_common/config_parse_tm.c 16  ~ 17  ~ 18  ~ 19  ~ 20  ~ 21  ~ 22  ~ 23  ~ 24  ~ 25  ~ 27  ~ 28  ~ 29  ~ 31  ~"p.h " 34 $tm_cfgfe_ld_sched_pt ( 35  e_cfgfe * fe , 36  e_sched_pt_ms * pt_ms ) 38 cڡ * y ; 39  j ; 41 y = `e_cfgfe_g_y ( fe , "port", "frame overhead"); 42 i( y ) 43 pt_ms -> ame_ovhd = ( ut32_t ) `oi ( y ); 45 y = `e_cfgfe_g_y ( fe , "port", "mtu"); 46 i( y ) 47 pt_ms -> mtu = ( ut32_t ) `oi ( y ); 49 y = `e_cfgfe_g_y ( fe , 52 i( y ) 53 pt_ms -> n_subpts_r_pt = ( ut32_t `oi ( y ); 55 y = `e_cfgfe_g_y ( fe , 58 i( y ) 59 pt_ms -> n_pes_r_subpt = ( ut32_t `oi ( y ); 61 y = `e_cfgfe_g_y ( fe , "port", "queue sizes"); 62 i( y ) { 63 * xt ; 65  j = 0; j < RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE ; j++) { 66 pt_ms -> qsize [ j ] = ( ut16_t ) 67 ` ( y , & xt , 10); 68 i( xt = NULL ) 70 y = xt ; 74 #ifde RTE_SCHED_RED 75  j = 0; j < RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE ; j++) { 76  r [32]; 79 `tf ( r , (r), "t%" PRId32 " wd m", j ); 80 y = `e_cfgfe_g_y ( fe , "d", r ); 81 i( y ) { 82 * xt ; 83  k ; 86  k = 0; k < e_RTE_METER_COLORS ; k++) { 87 pt_ms -> d_ms [ j ][ k ]. m_th 88 ( ut16_t ) ` ( y , & xt , 10); 89 i( xt = NULL ) 91 y = xt ; 96 `tf ( r , (r), "t%" PRId32 " wd max", j ); 97 y = `e_cfgfe_g_y ( fe , "d", r ); 98 i( y ) { 99 * xt ; 100  k ; 103  k = 0; k < e_RTE_METER_COLORS ; k++) { 104 pt_ms -> d_ms [ j ][ k ]. max_th 105 ( ut16_t ) ` ( y , & xt , 10); 106 i( xt = NULL ) 108 y = xt ; 113 `tf ( r , (r), "t%" PRId32 " wd invrob", j ); 114 y = `e_cfgfe_g_y ( fe , "d", r ); 115 i( y ) { 116 * xt ; 117  k ; 120  k = 0; k < e_RTE_METER_COLORS ; k++) { 121 pt_ms -> d_ms [ j ][ k ]. maxp_v 122 ( ut8_t ) ` ( y , & xt , 10); 124 i( xt = NULL ) 126 y = xt ; 131 `tf ( r , (r), "t%" PRId32 " wd weight", j ); 132 y = `e_cfgfe_g_y ( fe , "d", r ); 133 i( y ) { 134 * xt ; 135  k ; 138  k = 0; k < e_RTE_METER_COLORS ; k++) { 139 pt_ms -> d_ms [ j ][ k ]. wq_log2 140 ( ut8_t ) ` ( y , & xt , 10); 141 i( xt = NULL ) 143 y = xt ; 150 } } 153 $tm_cfgfe_ld_sched_pe ( 154  e_cfgfe * fe , 155  e_sched_pt_ms * pt_ms , 156  e_sched_pe_ms * pe_ms ) 158  i , j ; 159 * xt ; 160 cڡ * y ; 161  ofes ; 163 ofes = `e_cfgfe_num_is ( fe , 165 pt_ms -> n_pe_ofes = ofes ; 167  j = 0; j < ofes ; j++) { 168  pe_me [32]; 170 `tf ( pe_me , (pipe_name), 171 "pof%" PRId32 , j ); 173 y = `e_cfgfe_g_y ( fe , pe_me , "tbate"); 174 i( y ) 175 pe_ms [ j ]. tb_ = ( ut32_t `oi ( y ); 177 y = `e_cfgfe_g_y ( fe , pe_me , "tb size"); 178 i( y ) 179 pe_ms [ j ]. tb_size = ( ut32_t `oi ( y ); 181 y = `e_cfgfe_g_y ( fe , pe_me , "tceriod"); 182 i( y ) 183 pe_ms [ j ]. tc_riod = ( ut32_t `oi ( y ); 185 y = `e_cfgfe_g_y ( fe , pe_me , "tc 0ate"); 186 i( y ) 187 pe_ms [ j ]. tc_ [0] = ( ut32_t `oi ( y ); 189 y = `e_cfgfe_g_y ( fe , pe_me , "tc 1ate"); 190 i( y ) 191 pe_ms [ j ]. tc_ [1] = ( ut32_t `oi ( y ); 193 y = `e_cfgfe_g_y ( fe , pe_me , "tc 2ate"); 194 i( y ) 195 pe_ms [ j ]. tc_ [2] = ( ut32_t `oi ( y ); 197 y = `e_cfgfe_g_y ( fe , pe_me , "tc 3ate"); 198 i( y ) 199 pe_ms [ j ]. tc_ [3] = ( ut32_t `oi ( y ); 201 #ifde RTE_SCHED_SUBPORT_TC_OV 202 y = `e_cfgfe_g_y ( fe , pe_me , 204 i( y ) 205 pe_ms [ j ]. tc_ov_weight = ( ut8_t ) `oi ( y ); 208 y = `e_cfgfe_g_y ( fe , 209 pe_me , 211 i( y ) 212  i = 0; i < RTE_SCHED_QUEUES_PER_TRAFFIC_CLASS ; i++) { 213 pe_ms [ j ]. w_weights [ RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE *0 + i ] = 214 ( ut8_t ` ( y , & xt , 10); 215 i( xt = NULL ) 217 y = xt ; 220 y = `e_cfgfe_g_y ( fe , pe_me , "tc 1 wrr weights"); 221 i( y ) 222  i = 0; i < RTE_SCHED_QUEUES_PER_TRAFFIC_CLASS ; i++) { 223 pe_ms [ j ]. w_weights [ RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE *1 + i ] = 224 ( ut8_t ` ( y , & xt , 10); 225 i( xt = NULL ) 227 y = xt ; 230 y = `e_cfgfe_g_y ( fe , pe_me , "tc 2 wrr weights"); 231 i( y ) 232  i = 0; i < RTE_SCHED_QUEUES_PER_TRAFFIC_CLASS ; i++) { 233 pe_ms [ j ]. w_weights [ RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE *2 + i ] = 234 ( ut8_t ` ( y , & xt , 10); 235 i( xt = NULL ) 237 y = xt ; 240 y = `e_cfgfe_g_y ( fe , pe_me , "tc 3 wrr weights"); 241 i( y ) 242  i = 0; i < RTE_SCHED_QUEUES_PER_TRAFFIC_CLASS ; i++) { 243 pe_ms [ j ]. w_weights [ RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE *3 + i ] = 244 ( ut8_t ` ( y , & xt , 10); 245 i( xt = NULL ) 247 y = xt ; 251 } } 254 $tm_cfgfe_ld_sched_subpt ( 255  e_cfgfe * fe , 256  e_sched_subpt_ms * subpt_ms , 257 * pe_to_ofe ) 259 cڡ * y ; 260  i , j , k ; 262  i = 0; i < APP_MAX_SCHED_SUBPORTS ; i++) { 263  c_me [ CFG_NAME_LEN ]; 265 `tf ( c_me , (sec_name), 266 "subp܈%" PRId32 , i ); 268 i( `e_cfgfe_has_i ( fe , c_me )) { 269 y = `e_cfgfe_g_y ( fe , 270 c_me , 272 i( y ) 273 subpt_ms [ i ]. tb_ = 274 ( ut32_t `oi ( y ); 276 y = `e_cfgfe_g_y ( fe , 277 c_me , 279 i( y ) 280 subpt_ms [ i ]. tb_size = 281 ( ut32_t `oi ( y ); 283 y = `e_cfgfe_g_y ( fe , 284 c_me , 286 i( y ) 287 subpt_ms [ i ]. tc_riod = 288 ( ut32_t `oi ( y ); 290 y = `e_cfgfe_g_y ( fe , 291 c_me , 293 i( y ) 294 subpt_ms [ i ]. tc_ [0] = 295 ( ut32_t `oi ( y ); 297 y = `e_cfgfe_g_y ( fe , 298 c_me , 300 i( y ) 301 subpt_ms [ i ]. tc_ [1] = 302 ( ut32_t `oi ( y ); 304 y = `e_cfgfe_g_y ( fe , 305 c_me , 307 i( y ) 308 subpt_ms [ i ]. tc_ [2] = 309 ( ut32_t `oi ( y ); 311 y = `e_cfgfe_g_y ( fe , 312 c_me , 314 i( y ) 315 subpt_ms [ i ]. tc_ [3] = 316 ( ut32_t `oi ( y ); 318  n_s = `e_cfgfe_i_num_s ( fe , 319 c_me ); 320  e_cfgfe_y s [ n_s ]; 322 `e_cfgfe_i_s ( fe , 323 c_me , 324 s , 325 n_s ); 327  j = 0; j < n_s ; j++) 328 i( `cmp ("pipe", 329 s [ j ]. me , 331  ofe ; 332 * toks [2] = { NULL , NULL}; 333  n_toks ; 334  beg , d ; 335  me [ CFG_NAME_LEN + 1]; 337 ofe = `oi ( s [ j ]. vue ); 338 `y ( me , 339 s [ j ]. me , 340 ( me )); 341 n_toks = `e_rl ( 342 & me [("pipe")], 343 `n ( me , CFG_NAME_LEN ), 344 toks , 2, '-'); 346 beg = `oi ( toks [0]); 347 i( n_toks == 2) 348 d = `oi ( toks [1]); 350 d = beg ; 352 i(( d > APP_MAX_SCHED_PIPES ) || 353 ( beg > d )) 356  k = beg ; k < d ; k++) { 357  ofe_me [ CFG_NAME_LEN ]; 359 `tf ( ofe_me , 360 ( ofe_me ), 361 "pof%" PRId32 , 362 ofe ); 363 i( `e_cfgfe_has_i ( fe , ofe_me )) 364 pe_to_ofe [ i * APP_MAX_SCHED_PIPES + k ] = ofe ; 366 `e_ex ( EXIT_FAILURE , 368 s [ j ]. vue ); 375 } } 378 $tm_cfgfe_ld ( p_pktq_tm_ms * tm ) 380  e_cfgfe * fe ; 381 ut32_t i ; 383 `memt ( tm -> sched_subpt_ms , 0, (tm->sched_subport_params)); 384 `memt ( tm -> sched_pe_ofes , 0, (tm->sched_pipe_profiles)); 385 `memt (& tm -> sched_pt_ms , 0, (tm->sched_port_params)); 386  i = 0; i < APP_MAX_SCHED_SUBPORTS * APP_MAX_SCHED_PIPES ; i++) 387 tm -> sched_pe_to_ofe [ i ] = -1; 389 tm -> sched_pt_ms . pe_ofes = &tm-> sched_pe_ofes [0]; 391 i( tm -> fe_me [0] == '\0') 394 fe = `e_cfgfe_ld ( tm -> fe_me , 0); 395 i( fe = NULL ) 398 `tm_cfgfe_ld_sched_pt ( fe , 399 & tm -> sched_pt_ms ); 400 `tm_cfgfe_ld_sched_subpt ( fe , 401 tm -> sched_subpt_ms , 402 tm -> sched_pe_to_ofe ); 403 `tm_cfgfe_ld_sched_pe ( fe , 404 & tm -> sched_pt_ms , 405 tm -> sched_pe_ofes ); 407 `e_cfgfe_o ( fe ); 409 } } 412 $p_cfig_r_tm ( p_ms * p ) 414 ut32_t i ; 416  i = 0; i < `RTE_DIM ( p -> tm_ms ); i++) { 417  p_pktq_tm_ms * p = & p -> tm_ms [ i ]; 418  us ; 420 i(! `APP_PARAM_VALID ( p )) 423 us = `tm_cfgfe_ld ( p ); 424 `APP_CHECK ( us == 0, 426 p -> me , 427 p -> fe_me ); 431 } } @vnf_common/cpu_core_map.c 17  ~ 18  ~ 19  ~ 20  ~ 22  ~ 24  ~"u_ce_m.h " 26  su_ce_m { 27 ut32_t mn_max_socks ; 28 ut32_t mn_max_ces_r_sock ; 29 ut32_t mn_max_ht_r_ce ; 30 ut32_t mn_socks ; 31 ut32_t mn_ces_r_sock ; 32 ut32_t mn_ht_r_ce ; 33  mm [0]; 36  le ut32_t 37 $u_ce_m_pos ( u_ce_m * m , 38 ut32_t sock_id , 39 ut32_t ce_id , 40 ut32_t ht_id ) 42  ( sock_id * m -> n_max_ces_r_sock + ce_id ) * 43 m -> n_max_ht_r_ce + ht_id ; 44 } } 47 u_ce_m_compu_l ( u_ce_m * m ); 50 u_ce_m_compu_lux ( u_ce_m * m ); 53 u_ce_m_compu_d_check ( u_ce_m * m ); 55  u_ce_m * 56 $u_ce_m_ ( ut32_t n_max_socks , 57 ut32_t n_max_ces_r_sock , 58 ut32_t n_max_ht_r_ce , 59 ut32_t l_lized ) 61 ut32_t m_size , m_mem_size , i ; 62  u_ce_m * m ; 63  us ; 66 i(( n_max_socks == 0) || 67 ( n_max_ces_r_sock == 0) || 68 ( n_max_ht_r_ce == 0)) 69  NULL ; 72 m_size = n_max_socks * n_max_ces_r_sock * n_max_ht_r_ce ; 73 m_mem_size = ( u_ce_m + m_size * (); 74 m = ( u_ce_m * `mloc ( m_mem_size ); 75 i( m = NULL ) 76  NULL ; 79 m -> n_max_socks =_max_sockets; 80 m -> n_max_ces_r_sock =_max_cores_per_socket; 81 m -> n_max_ht_r_ce =_max_ht_per_core; 82 m -> n_socks = 0; 83 m -> n_ces_r_sock = 0; 84 m -> n_ht_r_ce = 0; 86  i = 0; i < m_size ; i++) 87 m ->m[ i ] = -1; 89 us = ( l_lized ) ? 90 `u_ce_m_compu_l ( m ) : 91 `u_ce_m_compu_lux ( m ); 93 i( us ) { 94 ` ( m ); 95  NULL ; 98 us = `u_ce_m_compu_d_check ( m ); 99 i( us ) { 100 ` ( m ); 101  NULL ; 104  m ; 105 } } 108 $u_ce_m_compu_l ( u_ce_m * m ) 110 ut32_t sock_id , ce_id , ht_id ; 113  sock_id = 0; sock_id < m -> n_max_socks ; socket_id++) { 114 ut32_t n_deed , ce_id_ctig ; 115  lce_id ; 117 n_deed = 0; 118  lce_id = 0;ce_id < RTE_MAX_LCORE ;core_id++) { 119  lce_cfig * p = &lce_cfig[ lce_id ]; 121 i(( p -> deed && (p-> sock_id == socket_id)) 122 n_deed ++; 125 ce_id_ctig = 0; 127  ce_id = 0; n_deed ; core_id++) { 128 ht_id = 0; 130  lce_id = 0; 131 lce_id < RTE_MAX_LCORE ; 132 lce_id ++) { 133  lce_cfig * p = 134 & lce_cfig [ lce_id ]; 136 i(( p -> deed ) && 137 ( p -> sock_id == socket_id) && 138 ( p -> ce_id == core_id)) { 139 ut32_t pos = `u_ce_m_pos ( m , 140 sock_id , 141 ce_id_ctig , 142 ht_id ); 144 m ->m[ pos ] = lce_id ; 145 ht_id ++; 146 n_deed --; 150 i( ht_id ) { 151 ce_id_ctig ++; 152 i( ce_id_ctig == 153 m -> n_max_ces_r_sock ) 160 } } 163 $u_ce_m_compu_d_check ( u_ce_m * m ) 165 ut32_t sock_id , ce_id , ht_id ; 168  ht_id = 0; ht_id < m -> n_max_ht_r_ce ; ht_id++) { 169 i( m ->m[ ht_id ] == -1) 172 m -> n_ht_r_ce ++; 175 i( m -> n_ht_r_ce == 0) 178  ce_id = 0; ce_id < m -> n_max_ces_r_sock ; core_id++) { 179 ut32_t pos = ce_id * m -> n_max_ht_r_ce ; 181 i( m ->m[ pos ] == -1) 184 m -> n_ces_r_sock ++; 187 i( m -> n_ces_r_sock == 0) 190  sock_id = 0; sock_id < m -> n_max_socks ; socket_id++) { 191 ut32_t pos = sock_id * m -> n_max_ces_r_sock * 192 m -> n_max_ht_r_ce ; 194 i( m ->m[ pos ] == -1) 197 m -> n_socks ++; 200 i( m -> n_socks == 0) 205  sock_id = 0; sock_id < m -> n_socks ; socket_id++) { 206  ce_id = 0; ce_id < m -> n_ces_r_sock ; core_id++) 207  ht_id = 0; 208 ht_id < m -> n_max_ht_r_ce ; 209 ht_id ++) { 210 ut32_t pos = ( sock_id * 211 m -> n_max_ces_r_sock + ce_id ) * 212 m -> n_max_ht_r_ce + ht_id ; 214 i((( ht_id < m -> n_ht_r_ce ) && 215 ( m ->m[ pos ] == -1)) || 216 (( ht_id > m -> n_ht_r_ce ) && 217 ( m ->m[ pos ] != -1))) 221  ; ce_id < m -> n_max_ces_r_sock ; core_id++) 222  ht_id = 0; 223 ht_id < m -> n_max_ht_r_ce ; 224 ht_id ++) { 225 ut32_t pos = `u_ce_m_pos ( m , 226 sock_id , 227 ce_id , 228 ht_id ); 230 i( m ->m[ pos ] != -1) 236 } } 238  #FILE_LINUX_CPU_N_LCORES \ 239 "/sys/devis/syem/u/e" ) 242 $u_ce_m_g_n_lces_lux () 244  bufr [64], * rg ; 245 FILE * fd ; 247 fd = `fݒ ( FILE_LINUX_CPU_N_LCORES , "r"); 248 i( fd = NULL ) 251 i( `fgs ( bufr , (bufr), fd = NULL ) { 252 `fo ( fd ); 256 `fo ( fd ); 258 rg = `dex ( bufr , '-'); 259 i( rg = NULL ) 262  `oi (++ rg ) + 1; 263 } } 265  #FILE_LINUX_CPU_CORE_ID \ 266 "/sys/devis/syem/u/u%" PRIu32 "/togy/ce_id" ) 269 $u_ce_m_g_ce_id_lux ( lce_id ) 271  bufr [64]; 272 FILE * fd ; 273  ce_id ; 275 `tf ( bufr , (bufr), FILE_LINUX_CPU_CORE_ID , lce_id ); 276 fd = `fݒ ( bufr , "r"); 277 i( fd = NULL ) 280 i( `fgs ( bufr , (bufr), fd = NULL ) { 281 `fo ( fd ); 285 `fo ( fd ); 287 ce_id = `oi ( bufr ); 288  ce_id ; 289 } } 291  #FILE_LINUX_CPU_SOCKET_ID \ 292 "/sys/devis/syem/u/u%" PRIu32 "/togy/physil_ckage_id" ) 295 $u_ce_m_g_sock_id_lux ( lce_id ) 297  bufr [64]; 298 FILE * fd ; 299  sock_id ; 301 `tf ( bufr , (bufr), FILE_LINUX_CPU_SOCKET_ID , lce_id ); 302 fd = `fݒ ( bufr , "r"); 303 i( fd = NULL ) 306 i( `fgs ( bufr , (bufr), fd = NULL ) { 307 `fo ( fd ); 311 `fo ( fd ); 313 sock_id = `oi ( bufr ); 314  sock_id ; 315 } } 318 $u_ce_m_compu_lux ( u_ce_m * m ) 320 ut32_t sock_id , ce_id , ht_id ; 321  n_lces ; 323 n_lces = `u_ce_m_g_n_lces_lux (); 324 i( n_lces <= 0) 328  sock_id = 0; sock_id < m -> n_max_socks ; socket_id++) { 329 ut32_t n_deed , ce_id_ctig ; 330  lce_id ; 332 n_deed = 0; 333  lce_id = 0;ce_id < n_lces ;core_id++) { 334  lce_sock_id = 335 `u_ce_m_g_sock_id_lux ( lce_id ); 337 i( lce_sock_id < 0) 340 i((( ut32_t lce_sock_id = sock_id ) 341 n_deed ++; 344 ce_id_ctig = 0; 346  ce_id = 0; n_deed ; core_id++) { 347 ht_id = 0; 349  lce_id = 0;ce_id < n_lces ;core_id++) { 350  lce_sock_id = 351 `u_ce_m_g_sock_id_lux ( 352 lce_id ); 354 i( lce_sock_id < 0) 357  lce_ce_id = 358 `u_ce_m_g_ce_id_lux ( 359 lce_id ); 361 i( lce_ce_id < 0) 364 i((( ut32_t lce_sock_id = sock_id ) && 365 (( ut32_t lce_ce_id = ce_id )) { 366 ut32_t pos = `u_ce_m_pos ( m , 367 sock_id , 368 ce_id_ctig , 369 ht_id ); 371 m ->m[ pos ] = lce_id ; 372 ht_id ++; 373 n_deed --; 377 i( ht_id ) { 378 ce_id_ctig ++; 379 i( ce_id_ctig == 380 m -> n_max_ces_r_sock ) 387 } } 390 $u_ce_m_t ( u_ce_m * m ) 392 ut32_t sock_id , ce_id , ht_id ; 394 i( m = NULL ) 397  sock_id = 0; sock_id < m -> n_socks ; socket_id++) { 398 `tf ("Sock %" PRIu32 ":\n", sock_id ); 400  ce_id = 0; 401 ce_id < m -> n_ces_r_sock ; 402 ce_id ++) { 403 `tf ("[%" PRIu32 "] = [", ce_id ); 405  ht_id = 0; ht_id < m -> n_ht_r_ce ; ht_id++) { 406  lce_id = `u_ce_m_g_lce_id ( m , 407 sock_id , 408 ce_id , 409 ht_id ); 411 ut32_t ce_id_nctig = 412 `u_ce_m_g_ce_id_lux ( 413 lce_id ); 415 `tf (" %" PRId32 " (%" PRIu32 ") ", 416 lce_id , 417 ce_id_nctig ); 420 `tf ("]\n"); 423 } } 425 ut32_t 426 $u_ce_m_g_n_socks ( u_ce_m * m ) 428 i( m = NULL ) 431  m -> n_socks ; 432 } } 434 ut32_t 435 $u_ce_m_g_n_ces_r_sock ( u_ce_m * m ) 437 i( m = NULL ) 440  m -> n_ces_r_sock ; 441 } } 443 ut32_t 444 $u_ce_m_g_n_ht_r_ce ( u_ce_m * m ) 446 i( m = NULL ) 449  m -> n_ht_r_ce ; 450 } } 453 $u_ce_m_g_lce_id ( u_ce_m * m , 454 ut32_t sock_id , 455 ut32_t ce_id , 456 ut32_t ht_id ) 458 ut32_t pos ; 460 i(( m = NULL ) || 461 ( sock_id > m -> n_socks ) || 462 ( ce_id > m -> n_ces_r_sock ) || 463 ( ht_id > m -> n_ht_r_ce )) 466 pos = `u_ce_m_pos ( m , sock_id , ce_id , ht_id ); 468  m ->m[ pos ]; 469 } } 472 $u_ce_m_ ( u_ce_m * m ) 474 ` ( m ); 475 } } @vnf_common/cpu_core_map.h 17 #ide __INCLUDE_CPU_CORE_MAP_H__ 18  #__INCLUDE_CPU_CORE_MAP_H__ ) 20  ~ 22  ~ 24  gu_ce_m ; 26  u_ce_m * 27 u_ce_m_ ( ut32_t n_max_socks , 28 ut32_t n_max_ces_r_sock , 29 ut32_t n_max_ht_r_ce , 30 ut32_t l_lized ); 32 ut32_t 33 u_ce_m_g_n_socks ( u_ce_m * m ); 35 ut32_t 36 u_ce_m_g_n_ces_r_sock ( u_ce_m * m ); 38 ut32_t 39 u_ce_m_g_n_ht_r_ce ( u_ce_m * m ); 42 u_ce_m_g_lce_id ( u_ce_m * m , 43 ut32_t sock_id , 44 ut32_t ce_id , 45 ut32_t ht_id ); 47  u_ce_m_t ( u_ce_m * m ); 50 u_ce_m_ ( u_ce_m * m ); @vnf_common/hash_func.h 16 #ide __INCLUDE_HASH_FUNC_H__ 17  #__INCLUDE_HASH_FUNC_H__ ) 19  le ut64_t 20 $hash_x_key8 (* key , __e_unud ut32_t key_size , ut64_t ed ) 22 ut64_t * k = key ; 23 ut64_t x0 ; 25 x0 = ed ^ k [0]; 27  ( x0 >> 32) ^ xor0; 28 } } 30  le ut64_t 31 $hash_x_key16 (* key , __e_unud ut32_t key_size , ut64_t ed ) 33 ut64_t * k = key ; 34 ut64_t x0 ; 36 x0 = ( k [0] ^ ed ) ^ k[1]; 38  ( x0 >> 32) ^ xor0; 39 } } 41  le ut64_t 42 $hash_x_key24 (* key , __e_unud ut32_t key_size , ut64_t ed ) 44 ut64_t * k = key ; 45 ut64_t x0 ; 47 x0 = ( k [0] ^ ed ) ^ k[1]; 49 x0 ^ k [2]; 51  ( x0 >> 32) ^ xor0; 52 } } 54  le ut64_t 55 $hash_x_key32 (* key , __e_unud ut32_t key_size , ut64_t ed ) 57 ut64_t * k = key ; 58 ut64_t x0 , x1 ; 60 x0 = ( k [0] ^ ed ) ^ k[1]; 61 x1 = k [2] ^ k[3]; 63 x0 ^ x1 ; 65  ( x0 >> 32) ^ xor0; 66 } } 68  le ut64_t 69 $hash_x_key40 (* key , __e_unud ut32_t key_size , ut64_t ed ) 71 ut64_t * k = key ; 72 ut64_t x0 , x1 ; 74 x0 = ( k [0] ^ ed ) ^ k[1]; 75 x1 = k [2] ^ k[3]; 77 x0 ^ x1 ; 79 x0 ^ k [4]; 81  ( x0 >> 32) ^ xor0; 82 } } 84  le ut64_t 85 $hash_x_key48 (* key , __e_unud ut32_t key_size , ut64_t ed ) 87 ut64_t * k = key ; 88 ut64_t x0 , x1 , x2 ; 90 x0 = ( k [0] ^ ed ) ^ k[1]; 91 x1 = k [2] ^ k[3]; 92 x2 = k [4] ^ k[5]; 94 x0 ^ x1 ; 96 x0 ^ x2 ; 98  ( x0 >> 32) ^ xor0; 99 } } 101  le ut64_t 102 $hash_x_key56 (* key , __e_unud ut32_t key_size , ut64_t ed ) 104 ut64_t * k = key ; 105 ut64_t x0 , x1 , x2 ; 107 x0 = ( k [0] ^ ed ) ^ k[1]; 108 x1 = k [2] ^ k[3]; 109 x2 = k [4] ^ k[5]; 111 x0 ^ x1 ; 112 x2 ^ k [6]; 114 x0 ^ x2 ; 116  ( x0 >> 32) ^ xor0; 117 } } 119  le ut64_t 120 $hash_x_key64 (* key , __e_unud ut32_t key_size , ut64_t ed ) 122 ut64_t * k = key ; 123 ut64_t x0 , x1 , x2 , x3 ; 125 x0 = ( k [0] ^ ed ) ^ k[1]; 126 x1 = k [2] ^ k[3]; 127 x2 = k [4] ^ k[5]; 128 x3 = k [6] ^ k[7]; 130 x0 ^ x1 ; 131 x2 ^ x3 ; 133 x0 ^ x2 ; 135  ( x0 >> 32) ^ xor0; 136 } } 138 #i defed ( RTE_ARCH_X86_64 && defed( RTE_MACHINE_CPUFLAG_SSE4_2 ) 140  ~ 142  le ut64_t 143 $hash_c_key8 (* key , __e_unud ut32_t key_size , ut64_t ed ) 145 ut64_t * k = key ; 146 ut64_t c0 ; 148 c0 = `_mm_c32_u64 ( ed , k [0]); 150  c0 ; 151 } } 153  le ut64_t 154 $hash_c_key16 (* key , __e_unud ut32_t key_size , ut64_t ed ) 156 ut64_t * k = key ; 157 ut64_t k0 , c0 , c1 ; 159 k0 = k [0]; 161 c0 = `_mm_c32_u64 ( k0 , ed ); 162 c1 = `_mm_c32_u64 ( k0 >> 32, k [1]); 164 c0 ^ c1 ; 166  c0 ; 167 } } 169  le ut64_t 170 $hash_c_key24 (* key , __e_unud ut32_t key_size , ut64_t ed ) 172 ut64_t * k = key ; 173 ut64_t k0 , k2 , c0 , c1 ; 175 k0 = k [0]; 176 k2 = k [2]; 178 c0 = `_mm_c32_u64 ( k0 , ed ); 179 c1 = `_mm_c32_u64 ( k0 >> 32, k [1]); 181 c0 = `_mm_c32_u64 (c0, k2 ); 183 c0 ^ c1 ; 185  c0 ; 186 } } 188  le ut64_t 189 $hash_c_key32 (* key , __e_unud ut32_t key_size , ut64_t ed ) 191 ut64_t * k = key ; 192 ut64_t k0 , k2 , c0 , c1 , c2 , c3 ; 194 k0 = k [0]; 195 k2 = k [2]; 197 c0 = `_mm_c32_u64 ( k0 , ed ); 198 c1 = `_mm_c32_u64 ( k0 >> 32, k [1]); 200 c2 = `_mm_c32_u64 ( k2 , k [3]); 201 c3 = k2 >> 32; 203 c0 = `_mm_c32_u64 (c0, c1 ); 204 c1 = `_mm_c32_u64 ( c2 , c3 ); 206 c0 ^ c1 ; 208  c0 ; 209 } } 211  le ut64_t 212 $hash_c_key40 (* key , __e_unud ut32_t key_size , ut64_t ed ) 214 ut64_t * k = key ; 215 ut64_t k0 , k2 , c0 , c1 , c2 , c3 ; 217 k0 = k [0]; 218 k2 = k [2]; 220 c0 = `_mm_c32_u64 ( k0 , ed ); 221 c1 = `_mm_c32_u64 ( k0 >> 32, k [1]); 223 c2 = `_mm_c32_u64 ( k2 , k [3]); 224 c3 = `_mm_c32_u64 ( k2 >> 32, k [4]); 226 c0 = `_mm_c32_u64 (c0, c1 ); 227 c1 = `_mm_c32_u64 ( c2 , c3 ); 229 c0 ^ c1 ; 231  c0 ; 232 } } 234  le ut64_t 235 $hash_c_key48 (* key , __e_unud ut32_t key_size , ut64_t ed ) 237 ut64_t * k = key ; 238 ut64_t k0 , k2 , k5 , c0 , c1 , c2 , c3 ; 240 k0 = k [0]; 241 k2 = k [2]; 242 k5 = k [5]; 244 c0 = `_mm_c32_u64 ( k0 , ed ); 245 c1 = `_mm_c32_u64 ( k0 >> 32, k [1]); 247 c2 = `_mm_c32_u64 ( k2 , k [3]); 248 c3 = `_mm_c32_u64 ( k2 >> 32, k [4]); 250 c0 = `_mm_c32_u64 (c0, ( c1 << 32^ c2 ); 251 c1 = `_mm_c32_u64 ( c3 , k5 ); 253 c0 ^ c1 ; 255  c0 ; 256 } } 258  le ut64_t 259 $hash_c_key56 (* key , __e_unud ut32_t key_size , ut64_t ed ) 261 ut64_t * k = key ; 262 ut64_t k0 , k2 , k5 , c0 , c1 , c2 , c3 , c4 , c5 ; 264 k0 = k [0]; 265 k2 = k [2]; 266 k5 = k [5]; 268 c0 = `_mm_c32_u64 ( k0 , ed ); 269 c1 = `_mm_c32_u64 ( k0 >> 32, k [1]); 271 c2 = `_mm_c32_u64 ( k2 , k [3]); 272 c3 = `_mm_c32_u64 ( k2 >> 32, k [4]); 274 c4 = `_mm_c32_u64 ( k5 , k [6]); 275 c5 = k5 >> 32; 277 c0 = `_mm_c32_u64 (c0, ( c1 << 32^ c2 ); 278 c1 = `_mm_c32_u64 ( c3 , ( c4 << 32^ c5 ); 280 c0 ^ c1 ; 282  c0 ; 283 } } 285  le ut64_t 286 $hash_c_key64 (* key , __e_unud ut32_t key_size , ut64_t ed ) 288 ut64_t * k = key ; 289 ut64_t k0 , k2 , k5 , c0 , c1 , c2 , c3 , c4 , c5 ; 291 k0 = k [0]; 292 k2 = k [2]; 293 k5 = k [5]; 295 c0 = `_mm_c32_u64 ( k0 , ed ); 296 c1 = `_mm_c32_u64 ( k0 >> 32, k [1]); 298 c2 = `_mm_c32_u64 ( k2 , k [3]); 299 c3 = `_mm_c32_u64 ( k2 >> 32, k [4]); 301 c4 = `_mm_c32_u64 ( k5 , k [6]); 302 c5 = `_mm_c32_u64 ( k5 >> 32, k [7]); 304 c0 = `_mm_c32_u64 (c0, ( c1 << 32^ c2 ); 305 c1 = `_mm_c32_u64 ( c3 , ( c4 << 32^ c5 ); 307 c0 ^ c1 ; 309  c0 ; 310 } } 312  #hash_deu_key8 hash_c_key8 ) 313  #hash_deu_key16 hash_c_key16 ) 314  #hash_deu_key24 hash_c_key24 ) 315  #hash_deu_key32 hash_c_key32 ) 316  #hash_deu_key40 hash_c_key40 ) 317  #hash_deu_key48 hash_c_key48 ) 318  #hash_deu_key56 hash_c_key56 ) 319  #hash_deu_key64 hash_c_key64 ) 323  #hash_deu_key8 hash_x_key8 ) 324  #hash_deu_key16 hash_x_key16 ) 325  #hash_deu_key24 hash_x_key24 ) 326  #hash_deu_key32 hash_x_key32 ) 327  #hash_deu_key40 hash_x_key40 ) 328  #hash_deu_key48 hash_x_key48 ) 329  #hash_deu_key56 hash_x_key56 ) 330  #hash_deu_key64 hash_x_key64 ) @vnf_common/parser.h 17 #ide __INCLUDE_PARSER_H__ 18  #__INCLUDE_PARSER_H__ ) 21 rr_ad_g_bo (cڡ * p ); 24 rr_ad_ut64 ( ut64_t * vue , cڡ * p ); 27 rr_ad_ut32 ( ut32_t * vue , cڡ * p ); 30 r_hex_rg (* c , ut8_t * d , ut32_t * size ); @vnf_common/pipeline.h 17 #ide __INCLUDE_PIPELINE_H__ 18  #__INCLUDE_PIPELINE_H__ ) 20  ~ 22  ~"pe_be.h " 28 * (* tpe___ )( tpe_ms * tms , * tg ); 30 (* tpe___ )(* tpe ); 32  spe__s { 33 pe___ f_ ; 34 pe___ f_ ; 35 cmdle_r_x_t * cmds ; 42  spe_ty { 43 cڡ * me ; 46  pe_be_s * be_s ; 49  pe__s * _s ; 52  le ut32_t 53 $pe_ty_cmds_cou ( pe_ty * y ) 55 cmdle_r_x_t * cmds ; 56 ut32_t n_cmds ; 58 i( y -> _s = NULL ) 61 cmds = y -> _s ->cmds; 62 i( cmds = NULL ) 65  n_cmds = 0; cmds [n_cmds];_cmds++); 67  n_cmds ; 68 } } 71 r_pe_ce ( ut32_t * sock , 72 ut32_t * ce , 73 ut32_t * ht , 74 cڡ * y ); @vnf_common/pipeline_actions_common.h 16 #ide __INCLUDE_PIPELINE_ACTIONS_COMMON_H__ 17  #__INCLUDE_PIPELINE_ACTIONS_COMMON_H__ ) 19  ~ 21  ~ 22  ~ 23  ~ 24  ~ 26  #PIPELINE_PORT_IN_AH ( f_ah , f_pkt_wk , f_pkt4_wk ) \ 28 `f_ah ( \ 29 __e_unud  e_pe * p , \ 30  e_mbuf ** pkts , \ 31 ut32_t n_pkts , \ 32 * g ) \ 34 ut32_t i ; \ 36  i = 0; i < ( n_pkts & (~0x3LLU)); i += 4) \ 37 `f_pkt4_wk (& pkts [ i ], g ); \ 39  ; i < n_pkts ; i++) \ 40 `f_pkt_wk ( pkts [ i ], g ); \ 43 } ) 45  #PIPELINE_PORT_IN_AH_HIJACK_ALL ( f_ah , f_pkt_wk , f_pkt4_wk ) \ 47 `f_ah ( \ 48  e_pe * p , \ 49  e_mbuf ** pkts , \ 50 ut32_t n_pkts , \ 51 * g ) \ 53 ut64_t pkt_mask = `RTE_LEN2MASK ( n_pkts , uint64_t); \ 54 ut32_t i ; \ 56 `e_pe_ah_ck_hijack ( p , pkt_mask ); \ 58  i = 0; i < ( n_pkts & (~0x3LLU)); i += 4) \ 59 `f_pkt4_wk (& pkts [ i ], g ); \ 61  ; i < n_pkts ; i++) \ 62 `f_pkt_wk ( pkts [ i ], g ); \ 65 } ) 67  #PIPELINE_TABLE_AH_HIT ( f_ah , f_pkt_wk , f_pkt4_wk ) \ 69 `f_ah ( \ 70 __e_unud  e_pe * p , \ 71  e_mbuf ** pkts , \ 72 ut64_t pkts__mask , \ 73  e_pe_b_y ** s , \ 74 * g ) \ 76 i(( pkts__mask & (pkts_in_mask + 1)) == 0) { \ 77 ut64_t n_pkts = `__but_pcou ( pkts__mask ); \ 78 ut32_t i ; \ 80  i = 0; i < ( n_pkts & (~0x3LLU)); i += 4) \ 81 `f_pkt4_wk (& pkts [ i ], & s [i], g ); \ 83  ; i < n_pkts ; i++) \ 84 `f_pkt_wk ( pkts [ i ], s [i], g ); \ 86  ; pkts__mask ; ) { \ 87 ut32_t pos = `__but_z ( pkts__mask ); \ 88 ut64_t pkt_mask = 1LLU << pos ; \ 90 pkts__mask &~ pkt_mask ; \ 91 `f_pkt_wk ( pkts [ pos ], s [pos], g ); \ 95 } ) 97  #PIPELINE_TABLE_AH_MISS ( f_ah , f_pkt_wk , f_pkt4_wk ) \ 99 `f_ah ( \ 100 __e_unud  e_pe * p , \ 101  e_mbuf ** pkts , \ 102 ut64_t pkts__mask , \ 103  e_pe_b_y * y , \ 104 * g ) \ 106 i(( pkts__mask & (pkts_in_mask + 1)) == 0) { \ 107 ut64_t n_pkts = `__but_pcou ( pkts__mask ); \ 108 ut32_t i ; \ 110  i = 0; i < ( n_pkts & (~0x3LLU)); i += 4) \ 111 `f_pkt4_wk (& pkts [ i ], y , g ); \ 113  ; i < n_pkts ; i++) \ 114 `f_pkt_wk ( pkts [ i ], y , g ); \ 116  ; pkts__mask ; ) { \ 117 ut32_t pos = `__but_z ( pkts__mask ); \ 118 ut64_t pkt_mask = 1LLU << pos ; \ 120 pkts__mask &~ pkt_mask ; \ 121 `f_pkt_wk ( pkts [ pos ], y , g ); \ 125 } ) 127  #PIPELINE_TABLE_AH_HIT_DROP_TIME ( f_ah , f_pkt_wk , f_pkt4_wk ) \ 129 `f_ah ( \ 130  e_pe * p , \ 131  e_mbuf ** pkts , \ 132 ut64_t pkts_mask , \ 133  e_pe_b_y ** s , \ 134 * g ) \ 136 ut64_t pkts__mask = pkts_mask ; \ 137 ut64_t pkts_out_mask = pkts_mask ; \ 138 ut64_t time = `e_rdtsc (); \ 140 i(( pkts__mask & (pkts_in_mask + 1)) == 0) { \ 141 ut64_t n_pkts = `__but_pcou ( pkts__mask ); \ 142 ut32_t i ; \ 144  i = 0; i < ( n_pkts & (~0x3LLU)); i += 4) { \ 145 ut64_t mask = `f_pkt4_wk (& pkts [ i ], \ 146 & s [ i ], g , time ); \ 147 pkts_out_mask ^ mask << i ; \ 150  ; i < n_pkts ; i++) { \ 151 ut64_t mask = `f_pkt_wk ( pkts [ i ], \ 152 s [ i ], g , time ); \ 153 pkts_out_mask ^ mask << i ; \ 156  ; pkts__mask ; ) { \ 157 ut32_t pos = `__but_z ( pkts__mask ); \ 158 ut64_t pkt_mask = 1LLU << pos ; \ 159 ut64_t mask = `f_pkt_wk ( pkts [ pos ], \ 160 s [ pos ], g , time ); \ 162 pkts__mask &~ pkt_mask ; \ 163 pkts_out_mask ^ mask << pos ; \ 166 `e_pe_ah_ck_dr ( p , pkts_out_mask ^ pkts_mask ); \ 169 } ) 171  #PIPELINE_TABLE_AH_MISS_DROP_TIME ( f_ah , f_pkt_wk , f_pkt4_wk ) \ 173 `f_ah ( \ 174  e_pe * p , \ 175  e_mbuf ** pkts , \ 176 ut64_t pkts_mask , \ 177  e_pe_b_y * y , \ 178 * g ) \ 180 ut64_t pkts__mask = pkts_mask ; \ 181 ut64_t pkts_out_mask = pkts_mask ; \ 182 ut64_t time = `e_rdtsc (); \ 184 i(( pkts__mask & (pkts_in_mask + 1)) == 0) { \ 185 ut64_t n_pkts = `__but_pcou ( pkts__mask ); \ 186 ut32_t i ; \ 188  i = 0; i < ( n_pkts & (~0x3LLU)); i += 4) { \ 189 ut64_t mask = `f_pkt4_wk (& pkts [ i ], \ 190 y , g , time ); \ 191 pkts_out_mask ^ mask << i ; \ 194  ; i < n_pkts ; i++) { \ 195 ut64_t mask = `f_pkt_wk ( pkts [ i ], y , g , time );\ 196 pkts_out_mask ^ mask << i ; \ 199  ; pkts__mask ; ) { \ 200 ut32_t pos = `__but_z ( pkts__mask ); \ 201 ut64_t pkt_mask = 1LLU << pos ; \ 202 ut64_t mask = `f_pkt_wk ( pkts [ pos ], \ 203 y , g , time ); \ 205 pkts__mask &~ pkt_mask ; \ 206 pkts_out_mask ^ mask << pos ; \ 209 `e_pe_ah_ck_dr ( p , pkts_out_mask ^ pkts_mask ); \ 212 } ) @vnf_common/pipeline_be.h 17 #ide __INCLUDE_PIPELINE_BE_H__ 18  #__INCLUDE_PIPELINE_BE_H__ ) 20  ~ 21  ~ 22  ~ 23  ~ 24  ~ 25  ~ 26  ~ 28 epe_pt__ty { 29 mPIPELINE_PORT_IN_ETHDEV_READER , 30 mPIPELINE_PORT_IN_RING_READER , 31 mPIPELINE_PORT_IN_RING_MULTI_READER , 32 mPIPELINE_PORT_IN_RING_READER_IPV4_FRAG , 33 mPIPELINE_PORT_IN_RING_READER_IPV6_FRAG , 34 mPIPELINE_PORT_IN_SCHED_READER , 35 mPIPELINE_PORT_IN_SOURCE , 38  spe_pt__ms { 39 pe_pt__ty mty ; 41  e_pt_hdev_ad_ms mhdev ; 42  e_pt_rg_ad_ms mrg ; 43  e_pt_rg_mui_ad_ms mrg_mui ; 44  e_pt_rg_ad_v4_ag_ms mrg_v4_ag ; 45  e_pt_rg_ad_v6_ag_ms mrg_v6_ag ; 46  e_pt_sched_ad_ms msched ; 47  e_pt_sour_ms msour ; 48 } mms ; 49 ut32_t mbur_size ; 52  le * 53 $pe_pt__ms_cvt ( pe_pt__ms * p ) 55  p -> ty ) { 56  PIPELINE_PORT_IN_ETHDEV_READER : 57  (*& p -> ms . hdev ; 58  PIPELINE_PORT_IN_RING_READER : 59  (*& p -> ms . rg ; 60  PIPELINE_PORT_IN_RING_MULTI_READER : 61  (*& p -> ms . rg_mui ; 62  PIPELINE_PORT_IN_RING_READER_IPV4_FRAG : 63  (*& p -> ms . rg_v4_ag ; 64  PIPELINE_PORT_IN_RING_READER_IPV6_FRAG : 65  (*& p -> ms . rg_v6_ag ; 66  PIPELINE_PORT_IN_SCHED_READER : 67  (*& p -> ms . sched ; 68  PIPELINE_PORT_IN_SOURCE : 69  (*& p -> ms . sour ; 71  NULL ; 73 } } 75  le  e_pt__s * 76 $pe_pt__ms_g_s ( pe_pt__ms * p ) 78  p -> ty ) { 79  PIPELINE_PORT_IN_ETHDEV_READER : 80  & e_pt_hdev_ad_s ; 81  PIPELINE_PORT_IN_RING_READER : 82  & e_pt_rg_ad_s ; 83  PIPELINE_PORT_IN_RING_MULTI_READER : 84  & e_pt_rg_mui_ad_s ; 85  PIPELINE_PORT_IN_RING_READER_IPV4_FRAG : 86  & e_pt_rg_ad_v4_ag_s ; 87  PIPELINE_PORT_IN_RING_READER_IPV6_FRAG : 88  & e_pt_rg_ad_v6_ag_s ; 89  PIPELINE_PORT_IN_SCHED_READER : 90  & e_pt_sched_ad_s ; 91  PIPELINE_PORT_IN_SOURCE : 92  & e_pt_sour_s ; 94  NULL ; 96 } } 98 epe_pt_out_ty { 99 mPIPELINE_PORT_OUT_ETHDEV_WRITER , 100 mPIPELINE_PORT_OUT_ETHDEV_WRITER_NODROP , 101 mPIPELINE_PORT_OUT_RING_WRITER , 102 mPIPELINE_PORT_OUT_RING_MULTI_WRITER , 103 mPIPELINE_PORT_OUT_RING_WRITER_NODROP , 104 mPIPELINE_PORT_OUT_RING_MULTI_WRITER_NODROP , 105 mPIPELINE_PORT_OUT_RING_WRITER_IPV4_RAS , 106 mPIPELINE_PORT_OUT_RING_WRITER_IPV6_RAS , 107 mPIPELINE_PORT_OUT_SCHED_WRITER , 108 mPIPELINE_PORT_OUT_SINK , 111  spe_pt_out_ms { 112 pe_pt_out_ty mty ; 114  e_pt_hdev_wr_ms mhdev ; 115  e_pt_hdev_wr_nodr_ms mhdev_nodr ; 116  e_pt_rg_wr_ms mrg ; 117  e_pt_rg_mui_wr_ms mrg_mui ; 118  e_pt_rg_wr_nodr_ms mrg_nodr ; 119  e_pt_rg_mui_wr_nodr_ms mrg_mui_nodr ; 120  e_pt_rg_wr_v4_s_ms mrg_v4_s ; 121  e_pt_rg_wr_v6_s_ms mrg_v6_s ; 122  e_pt_sched_wr_ms msched ; 123  e_pt_sk_ms msk ; 124 } mms ; 127  le * 128 $pe_pt_out_ms_cvt ( pe_pt_out_ms * p ) 130  p -> ty ) { 131  PIPELINE_PORT_OUT_ETHDEV_WRITER : 132  (*& p -> ms . hdev ; 133  PIPELINE_PORT_OUT_ETHDEV_WRITER_NODROP : 134  (*& p -> ms . hdev_nodr ; 135  PIPELINE_PORT_OUT_RING_WRITER : 136  (*& p -> ms . rg ; 137  PIPELINE_PORT_OUT_RING_MULTI_WRITER : 138  (*& p -> ms . rg_mui ; 139  PIPELINE_PORT_OUT_RING_WRITER_NODROP : 140  (*& p -> ms . rg_nodr ; 141  PIPELINE_PORT_OUT_RING_MULTI_WRITER_NODROP : 142  (*& p -> ms . rg_mui_nodr ; 143  PIPELINE_PORT_OUT_RING_WRITER_IPV4_RAS : 144  (*& p -> ms . rg_v4_s ; 145  PIPELINE_PORT_OUT_RING_WRITER_IPV6_RAS : 146  (*& p -> ms . rg_v6_s ; 147  PIPELINE_PORT_OUT_SCHED_WRITER : 148  (*& p -> ms . sched ; 149  PIPELINE_PORT_OUT_SINK : 150  (*& p -> ms . sk ; 152  NULL ; 154 } } 156  le * 157 $pe_pt_out_ms_g_s ( pe_pt_out_ms * p ) 159  p -> ty ) { 160  PIPELINE_PORT_OUT_ETHDEV_WRITER : 161  & e_pt_hdev_wr_s ; 162  PIPELINE_PORT_OUT_ETHDEV_WRITER_NODROP : 163  & e_pt_hdev_wr_nodr_s ; 164  PIPELINE_PORT_OUT_RING_WRITER : 165  & e_pt_rg_wr_s ; 166  PIPELINE_PORT_OUT_RING_MULTI_WRITER : 167  & e_pt_rg_mui_wr_s ; 168  PIPELINE_PORT_OUT_RING_WRITER_NODROP : 169  & e_pt_rg_wr_nodr_s ; 170  PIPELINE_PORT_OUT_RING_MULTI_WRITER_NODROP : 171  & e_pt_rg_mui_wr_nodr_s ; 172  PIPELINE_PORT_OUT_RING_WRITER_IPV4_RAS : 173  & e_pt_rg_wr_v4_s_s ; 174  PIPELINE_PORT_OUT_RING_WRITER_IPV6_RAS : 175  & e_pt_rg_wr_v6_s_s ; 176  PIPELINE_PORT_OUT_SCHED_WRITER : 177  & e_pt_sched_wr_s ; 178  PIPELINE_PORT_OUT_SINK : 179  & e_pt_sk_s ; 181  NULL ; 183 } } 185 #ide PIPELINE_NAME_SIZE 186  #PIPELINE_NAME_SIZE 64 ) 189 #ide PIPELINE_MAX_PORT_IN 190  #PIPELINE_MAX_PORT_IN 64 ) 193 #ide PIPELINE_MAX_PORT_OUT 194  #PIPELINE_MAX_PORT_OUT 64 ) 197 #ide PIPELINE_MAX_TABLES 198  #PIPELINE_MAX_TABLES 64 ) 201 #ide PIPELINE_MAX_MSGQ_IN 202  #PIPELINE_MAX_MSGQ_IN 64 ) 205 #ide PIPELINE_MAX_MSGQ_OUT 206  #PIPELINE_MAX_MSGQ_OUT 64 ) 209 #ide PIPELINE_MAX_ARGS 210  #PIPELINE_MAX_ARGS 64 ) 213  spe_ms { 214  mme [ PIPELINE_NAME_SIZE ]; 216  pe_pt__ms mpt_ [ PIPELINE_MAX_PORT_IN ]; 217  pe_pt_out_ms mpt_out [ PIPELINE_MAX_PORT_OUT ]; 218  e_rg * mmsgq_ [ PIPELINE_MAX_MSGQ_IN ]; 219  e_rg * mmsgq_out [ PIPELINE_MAX_MSGQ_OUT ]; 221 ut32_t mn_pts_ ; 222 ut32_t mn_pts_out ; 223 ut32_t mn_msgq ; 225  msock_id ; 227 * mgs_me [ PIPELINE_MAX_ARGS ]; 228 * mgs_vue [ PIPELINE_MAX_ARGS ]; 229 ut32_t mn_gs ; 231 ut32_t mlog_v ; 238 * (* tpe_be__ )( tpe_ms * tms , 239 * tg ); 241 (* tpe_be__ )(* tpe ); 243 (* tpe_be__run )(* tpe ); 245 (* tpe_be__tim )(* tpe ); 247 (* tpe_be__ack )(* tpe , 248 tut32_t tpt_ , 249 tut32_t * tpt_out ); 251  spe_be_s { 252 pe_be__ f_ ; 253 pe_be__ f_ ; 254 pe_be__run f_run ; 255 pe_be__tim f_tim ; 256 pe_be__ack f_ack ; 260  #PIPELINE_ARG_CHECK ( exp , fmt , ...) \ 262 i(!( exp )) { \ 263 `rtf ( dr , fmt "\n", ## __VA_ARGS__ ); \ 266 } } 0) ) 268  #PIPELINE_PARSE_ERR_INV_VAL ( exp , i , y , v ) \ 269 `PIPELINE_ARG_CHECK ( exp , "Parserror in section \"%s\":ntry \"%s\" " \ 270 "havid vu(\"%s\")", i , y , v ) ) 272  #PIPELINE_PARSE_ERR_OUT_RNG ( exp , i , y , v ) \ 273 `PIPELINE_ARG_CHECK ( exp , "Parserror in section \"%s\":ntry \"%s\" " \ 274 "vuiouong(\"%s\")", i , y , v ) ) 276  #PIPELINE_PARSE_ERR_DUPLICATE ( exp , i , y ) \ 277 `PIPELINE_ARG_CHECK ( exp , "Parserror in section \"%s\": duplicated " \ 278 "y \"%s\"", i , y ) ) 280  #PIPELINE_PARSE_ERR_INV_ENT ( exp , i , y ) \ 281 `PIPELINE_ARG_CHECK ( exp , "Parserror in section \"%s\": invalidntry " \ 282 "\"%s\"", i , y ) ) 284  #PIPELINE_PARSE_ERR_MANDATORY ( exp , i , y ) \ 285 `PIPELINE_ARG_CHECK ( exp , "Parserror in section \"%s\": mandatory " \ 286 "y \"%s\" imissg", i , y ) ) @vnf_common/thread.c 17  ~ 18  ~ 19  ~ 21  ~"pe_comm_be.h " 22  ~"p.h " 23  ~"thad.h " 25 #i APP_THREAD_HEADROOM_STATS_COLLECT 27  #PIPELINE_RUN_REGULAR ( thad , pe ) \ 29 ut64_t t0 = `e_rdtsc_eci (); \ 30  n_pkts = `e_pe_run ( pe -> p ); \ 32 i( n_pkts == 0) { \ 33 ut64_t t1 = `e_rdtsc_eci (); \ 35 thad -> hdroom_cyes + t1 - t0 ; \ 37 } 0) ) 40  #PIPELINE_RUN_CUSTOM ( thad , da ) \ 42 ut64_t t0 = `e_rdtsc_eci (); \ 43  n_pkts = da -> `f_run (da-> be ); \ 45 i( n_pkts == 0) { \ 46 ut64_t t1 = `e_rdtsc_eci (); \ 48 thad -> hdroom_cyes + t1 - t0 ; \ 50 } 0) ) 54  #PIPELINE_RUN_REGULAR ( thad , pe ) \ 55 `e_pe_run ( pe -> p ) ) 57  #PIPELINE_RUN_CUSTOM ( thad , da ) \ 58 da -> `f_run (da-> be ) ) 62  le * 63 $thad_msg_cv ( e_rg * r ) 65 * msg ; 66  us = `e_rg_sc_dequeue ( r , & msg ); 68 i( us != 0) 69  NULL ; 71  msg ; 72 } } 74  le  75 $thad_msg_nd ( e_rg * r , 76 * msg ) 78  us ; 81 us = `e_rg__queue ( r , msg ); 82 }  us =- ENOBUFS ); 83 } } 86 $thad_pe_ab ( p_thad_da * t , 87  thad_pe_ab_msg_q * q ) 89  p_thad_pe_da * p ; 91 i( q -> f_run = NULL ) { 92 i( t -> n_gur > APP_MAX_THREAD_PIPELINES ) 95 i( t -> n_cuom > APP_MAX_THREAD_PIPELINES ) 99 p = ( q -> f_run = NULL ) ? 100 & t -> gur [t-> n_gur ] : 101 & t -> cuom [t-> n_cuom ]; 103 p -> pe_id = q ->pipeline_id; 104 p -> be = q ->be; 105 p -> f_run = q ->f_run; 106 p -> f_tim = q ->f_timer; 107 p -> tim_riod = q ->timer_period; 108 p -> ddle = 0; 110 i( q -> f_run = NULL ) 111 t -> n_gur ++; 113 t -> n_cuom ++; 116 } } 119 $thad_pe_dib ( p_thad_da * t , 120  thad_pe_dib_msg_q * q ) 122 ut32_t n_gur = `RTE_MIN ( t ->n_gur, `RTE_DIM -> gur )); 123 ut32_t n_cuom = `RTE_MIN ( t ->n_cuom, `RTE_DIM -> cuom )); 124 ut32_t i ; 127  i = 0; i < n_gur ; i++) { 128 i( t -> gur [ i ]. pe_id ! q ->pipeline_id) 131 i( i < n_gur - 1) 132 `memy (& t -> gur [ i ], 133 & t -> gur [ i +1], 134 ( n_gur - 1 - i * ( p_thad_pe_da )); 136 n_gur --; 137 t -> n_gur =_regular; 143  i = 0; i < n_cuom ; i++) { 144 i( t -> cuom [ i ]. pe_id ! q ->pipeline_id) 147 i( i < n_cuom - 1) 148 `memy (& t -> cuom [ i ], 149 & t -> cuom [ i +1], 150 ( n_cuom - 1 - i * ( p_thad_pe_da )); 152 n_cuom --; 153 t -> n_cuom =_custom; 160 } } 163 $thad_msg_q_hd ( p_thad_da * t ) 165 * msg_r ; 166  thad_msg_q * q ; 167  thad_msg_r * r ; 169 msg_r = `thad_msg_cv ( t -> msgq_ ); 170 q = msg_r ; 171 r = msg_r ; 173 i( q ! NULL ) 174  q -> ty ) { 175  THREAD_MSG_REQ_PIPELINE_ENABLE : { 176 r -> us = `thad_pe_ab ( t , 177 ( thad_pe_ab_msg_q * q ); 178 `thad_msg_nd ( t -> msgq_out , r ); 182  THREAD_MSG_REQ_PIPELINE_DISABLE : { 183 r -> us = `thad_pe_dib ( t , 184 ( thad_pe_dib_msg_q * q ); 185 `thad_msg_nd ( t -> msgq_out , r ); 189  THREAD_MSG_REQ_HEADROOM_READ : { 190  thad_hdroom_ad_msg_r * r = 191 ( thad_hdroom_ad_msg_r *) 192 q ; 194 r -> hdroom_tio = t ->headroom_ratio; 195 r -> us = 0; 196 `thad_msg_nd ( t -> msgq_out , r ); 204 } } 207 $thad_hdroom_upde ( p_thad_da * t , ut64_t time ) 209 ut64_t time_diff = time - t -> hdroom_time ; 211 t -> hdroom_tio = 212 (( t -> hdroom_cyes / (( time_diff ); 214 t -> hdroom_cyes = 0; 215 t -> hdroom_time = `e_rdtsc_eci (); 216 } } 219 $p_thad (* g ) 221  p_ms * p = (p_m* g ; 222 ut32_t ce_id = `e_lce_id (), i , j ; 223  p_thad_da * t = & p -> thad_da [ ce_id ]; 225  i = 0; ; i++) { 226 ut32_t n_gur = `RTE_MIN ( t ->n_gur, `RTE_DIM -> gur )); 227 ut32_t n_cuom = `RTE_MIN ( t ->n_cuom, `RTE_DIM -> cuom )); 230  j = 0; j < n_gur ; j++) { 231  p_thad_pe_da * da = & t -> gur [ j ]; 232  pe * p = da -> be ; 234 `PIPELINE_RUN_REGULAR ( t , p ); 238  j = 0; j < n_cuom ; j++) { 239  p_thad_pe_da * da = & t -> cuom [ j ]; 241 `PIPELINE_RUN_CUSTOM ( t , da ); 245 i(( i & 0xF) == 0) { 246 ut64_t time = `e_g_tsc_cyes (); 247 ut64_t t_ddle = UINT64_MAX ; 249 i( time < t -> ddle ) 253  j = 0; j < n_gur ; j++) { 254  p_thad_pe_da * da = 255 & t -> gur [ j ]; 256 ut64_t p_ddle = da -> ddle ; 258 i( p_ddle < time ) { 259 da -> `f_tim (da-> be ); 260 p_ddle = time + da -> tim_riod ; 261 da -> ddle = p_ddle ; 264 i( p_ddle < t_ddle ) 265 t_ddle = p_ddle ; 269  j = 0; j < n_cuom ; j++) { 270  p_thad_pe_da * da = 271 & t -> cuom [ j ]; 272 ut64_t p_ddle = da -> ddle ; 274 i( p_ddle < time ) { 275 da -> `f_tim (da-> be ); 276 p_ddle = time + da -> tim_riod ; 277 da -> ddle = p_ddle ; 280 i( p_ddle < t_ddle ) 281 t_ddle = p_ddle ; 286 ut64_t ddle = t -> thad_q_ddle ; 288 i( ddle < time ) { 289 `thad_msg_q_hd ( t ); 290 `thad_hdroom_upde ( t , time ); 291 ddle = time + t -> tim_riod ; 292 t -> thad_q_ddle = ddle ; 295 i( ddle < t_ddle ) 296 t_ddle = ddle ; 300 t -> ddle = t_ddle ; 305 } } @vnf_common/thread.h 17 #ide THREAD_H_ 18  #THREAD_H_ ) 20  ~"p.h " 21  ~"pe_be.h " 23 ethad_msg_q_ty { 24 mTHREAD_MSG_REQ_PIPELINE_ENABLE = 0, 25 mTHREAD_MSG_REQ_PIPELINE_DISABLE , 26 mTHREAD_MSG_REQ_HEADROOM_READ , 27 mTHREAD_MSG_REQS 30  sthad_msg_q { 31 thad_msg_q_ty mty ; 34  sthad_msg_r { 35  mus ; 41  sthad_pe_ab_msg_q { 42 thad_msg_q_ty mty ; 44 ut32_t mpe_id ; 45 * mbe ; 46 pe_be__run mf_run ; 47 pe_be__tim mf_tim ; 48 ut64_t mtim_riod ; 51  sthad_pe_ab_msg_r { 52  mus ; 58  sthad_pe_dib_msg_q { 59 thad_msg_q_ty mty ; 61 ut32_t mpe_id ; 64  sthad_pe_dib_msg_r { 65  mus ; 71  sthad_hdroom_ad_msg_q { 72 thad_msg_q_ty mty ; 75  sthad_hdroom_ad_msg_r { 76  mus ; 78  mhdroom_tio ; @vnf_common/thread_fe.c 17  ~ 18  ~ 19  ~ 20  ~ 21  ~ 22  ~ 23  ~ 24  ~ 25  ~ 26  ~ 27  ~ 29  ~"thad.h " 30  ~"thad_.h " 31  ~"pe.h " 32  ~"pe_comm_.h " 33  ~"p.h " 35  le * 36 $thad_msg_nd_cv ( p_ms * p , 37 ut32_t sock_id , ut32_ ce_id , ut32_ ht_id , 38 * msg , 39 ut32_t timeout_ms ) 41  e_rg * r_q = `p_thad_msgq__g ( p , 42 sock_id , ce_id , ht_id ); 43 if( r_q = NULL ) 44  NULL ; 45  e_rg * r_r = `p_thad_msgq_out_g ( p , 46 sock_id , ce_id , ht_id ); 47 if( r_r = NULL ) 48  NULL ; 49 ut64_t hz = `e_g_tsc_hz (); 50 * msg_cv ; 51 ut64_t ddle ; 52  us ; 56 us = `e_rg__queue ( r_q , (* msg ); 57 }  us =- ENOBUFS ); 60 ddle = ( timeout_ms ) ? 61 ( `e_rdtsc (+ (( hz * timeout_ms ) / 1000)) : 62 UINT64_MAX ; 65 i( `e_rdtsc (> ddle ) 66  NULL ; 68 us = `e_rg_sc_dequeue ( r_r , & msg_cv ); 69 }  us != 0); 71  msg_cv ; 72 } } 75 $p_pe_ab ( p_ms * p , 76 ut32_t sock_id , 77 ut32_t ce_id , 78 ut32_t hyr_th_id , 79 ut32_t pe_id ) 81  thad_pe_ab_msg_q * q ; 82  thad_pe_ab_msg_r * r ; 83  thad_id ; 84  p_pe_da * p ; 85  p_pe_ms * p_ms ; 86  pe_ty * p_ty ; 87  us ; 89 i( p = NULL ) 92 thad_id = `u_ce_m_g_lce_id ( p -> ce_m , 93 sock_id , 94 ce_id , 95 hyr_th_id ); 97 i(( thad_id < 0|| ! `p_ce_is_abd ( p ,hread_id)) 100 i( `p_pe_da ( p , pe_id = NULL ) 103 p = & p -> pe_da [ pe_id ]; 104 p_ms = & p -> pe_ms [ pe_id ]; 105 p_ty = `p_pe_ty_fd ( p , p_ms -> ty ); 106 i( p_ty = NULL ) 109 i( p -> abd == 1) 112 q = `p_msg_loc ( p ); 113 i( q = NULL ) 116 q -> ty = THREAD_MSG_REQ_PIPELINE_ENABLE ; 117 q -> pe_id =ipeline_id; 118 q -> be = p ->be; 119 q -> f_run = p_ty -> be_s ->f_run; 120 q -> f_tim = p_ty -> be_s ->f_timer; 121 q -> tim_riod = p ->timer_period; 123 r = `thad_msg_nd_cv ( p , 124 sock_id , ce_id , hyr_th_id , q , MSG_TIMEOUT_DEFAULT ); 125 i( r = NULL ) 128 us = r ->status; 129 `p_msg_ ( p , r ); 131 i( us != 0) 134 p -> abd = 1; 136 } } 139 $p_pe_dib ( p_ms * p , 140 ut32_t sock_id , 141 ut32_t ce_id , 142 ut32_t hyr_th_id , 143 ut32_t pe_id ) 145  thad_pe_dib_msg_q * q ; 146  thad_pe_dib_msg_r * r ; 147  thad_id ; 148  p_pe_da * p ; 149  us ; 151 i( p = NULL ) 154 thad_id = `u_ce_m_g_lce_id ( p -> ce_m , 155 sock_id , 156 ce_id , 157 hyr_th_id ); 159 i(( thad_id < 0|| ! `p_ce_is_abd ( p ,hread_id)) 162 i( `p_pe_da ( p , pe_id = NULL ) 165 p = & p -> pe_da [ pe_id ]; 167 i( p -> abd == 0) 170 q = `p_msg_loc ( p ); 171 i( q = NULL ) 174 q -> ty = THREAD_MSG_REQ_PIPELINE_DISABLE ; 175 q -> pe_id =ipeline_id; 177 r = `thad_msg_nd_cv ( p , 178 sock_id , ce_id , hyr_th_id , q , MSG_TIMEOUT_DEFAULT ); 180 i( r = NULL ) 183 us = r ->status; 184 `p_msg_ ( p , r ); 186 i( us != 0) 189 p -> abd = 0; 191 } } 194 $p_thad_hdroom ( p_ms * p , 195 ut32_t sock_id , 196 ut32_t ce_id , 197 ut32_t hyr_th_id ) 199  thad_hdroom_ad_msg_q * q ; 200  thad_hdroom_ad_msg_r * r ; 201  thad_id ; 202  us ; 204 i( p = NULL ) 207 thad_id = `u_ce_m_g_lce_id ( p -> ce_m , 208 sock_id , 209 ce_id , 210 hyr_th_id ); 212 i(( thad_id < 0|| ! `p_ce_is_abd ( p ,hread_id)) 215 q = `p_msg_loc ( p ); 216 i( q = NULL ) 219 q -> ty = THREAD_MSG_REQ_HEADROOM_READ ; 221 r = `thad_msg_nd_cv ( p , 222 sock_id , ce_id , hyr_th_id , q , MSG_TIMEOUT_DEFAULT ); 224 i( r = NULL ) 227 us = r ->status; 229 i( us != 0) 232 `tf ("%.3f%%\n", r -> hdroom_tio * 100); 235 `p_msg_ ( p , r ); 238 } } 244  scmd_pe_ab_su { 245 cmdle_fixed_rg_t mt_rg ; 246 cmdle_fixed_rg_t mt_id_rg ; 247 cmdle_fixed_rg_t mpe_rg ; 248 ut32_t mpe_id ; 249 cmdle_fixed_rg_t mab_rg ; 253 $cmd_pe_ab_rd ( 254 * rd_su , 255 __e_unud  cmdle * , 256 * da ) 258  cmd_pe_ab_su * ms = rd_su ; 259  p_ms * p = da ; 260  us ; 261 ut32_t ce_id , sock_id , hyr_th_id ; 263 i( `r_pe_ce (& sock_id , 264 & ce_id , 265 & hyr_th_id , 266 ms -> t_id_rg ) != 0) { 267 `tf ("Command failed\n"); 271 us = `p_pe_ab ( p , 272 sock_id , 273 ce_id , 274 hyr_th_id , 275 ms -> pe_id ); 277 i( us != 0) 278 `tf ("Command failed\n"); 279 } } 281 cmdle_r_tok_rg_t gcmd_pe_ab_t_rg = 282 TOKEN_STRING_INITIALIZER ( cmd_pe_ab_su , t_rg , "t"); 284 cmdle_r_tok_rg_t gcmd_pe_ab_t_id_rg = 285 TOKEN_STRING_INITIALIZER ( cmd_pe_ab_su , t_id_rg , 286 NULL ); 288 cmdle_r_tok_rg_t gcmd_pe_ab_pe_rg = 289 TOKEN_STRING_INITIALIZER ( cmd_pe_ab_su , pe_rg , 292 cmdle_r_tok_num_t gcmd_pe_ab_pe_id = 293 TOKEN_NUM_INITIALIZER ( cmd_pe_ab_su , pe_id , 294 UINT32 ); 296 cmdle_r_tok_rg_t gcmd_pe_ab_ab_rg = 297 TOKEN_STRING_INITIALIZER ( cmd_pe_ab_su , ab_rg , 300 cmdle_r__t gcmd_pe_ab = { 301 . f = cmd_pe_ab_rd , 302 . gda = NULL , 303 . ghp_r = "Enableipeline on specified core", 304 . gtoks = { 305 (*)& cmd_pe_ab_t_rg , 306 (*)& cmd_pe_ab_t_id_rg , 307 (*)& cmd_pe_ab_pe_rg , 308 (*)& cmd_pe_ab_pe_id , 309 (*)& cmd_pe_ab_ab_rg , 310 NULL , 318  scmd_pe_dib_su { 319 cmdle_fixed_rg_t mt_rg ; 320 cmdle_fixed_rg_t mt_id_rg ; 321 cmdle_fixed_rg_t mpe_rg ; 322 ut32_t mpe_id ; 323 cmdle_fixed_rg_t mdib_rg ; 327 $cmd_pe_dib_rd ( 328 * rd_su , 329 __e_unud  cmdle * , 330 * da ) 332  cmd_pe_dib_su * ms = rd_su ; 333  p_ms * p = da ; 334  us ; 335 ut32_t ce_id , sock_id , hyr_th_id ; 337 i( `r_pe_ce (& sock_id , 338 & ce_id , 339 & hyr_th_id , 340 ms -> t_id_rg ) != 0) { 341 `tf ("Command failed\n"); 345 us = `p_pe_dib ( p , 346 sock_id , 347 ce_id , 348 hyr_th_id , 349 ms -> pe_id ); 351 i( us != 0) 352 `tf ("Command failed\n"); 353 } } 355 cmdle_r_tok_rg_t gcmd_pe_dib_t_rg = 356 TOKEN_STRING_INITIALIZER ( cmd_pe_dib_su , t_rg , "t"); 358 cmdle_r_tok_rg_t gcmd_pe_dib_t_id_rg = 359 TOKEN_STRING_INITIALIZER ( cmd_pe_dib_su , t_id_rg , 360 NULL ); 362 cmdle_r_tok_rg_t gcmd_pe_dib_pe_rg = 363 TOKEN_STRING_INITIALIZER ( cmd_pe_dib_su , 364 pe_rg , "pipeline"); 366 cmdle_r_tok_num_t gcmd_pe_dib_pe_id = 367 TOKEN_NUM_INITIALIZER ( cmd_pe_dib_su , pe_id , 368 UINT32 ); 370 cmdle_r_tok_rg_t gcmd_pe_dib_dib_rg = 371 TOKEN_STRING_INITIALIZER ( cmd_pe_dib_su , dib_rg , 374 cmdle_r__t gcmd_pe_dib = { 375 . f = cmd_pe_dib_rd , 376 . gda = NULL , 377 . ghp_r = "Disableipeline on specified core", 378 . gtoks = { 379 (*)& cmd_pe_dib_t_rg , 380 (*)& cmd_pe_dib_t_id_rg , 381 (*)& cmd_pe_dib_pe_rg , 382 (*)& cmd_pe_dib_pe_id , 383 (*)& cmd_pe_dib_dib_rg , 384 NULL , 393  scmd_thad_hdroom_su { 394 cmdle_fixed_rg_t mt_rg ; 395 cmdle_fixed_rg_t mt_id_rg ; 396 cmdle_fixed_rg_t mhdroom_rg ; 400 $cmd_thad_hdroom_rd ( 401 * rd_su , 402 __e_unud  cmdle * , 403 * da ) 405  cmd_thad_hdroom_su * ms = rd_su ; 406  p_ms * p = da ; 407  us ; 408 ut32_t ce_id , sock_id , hyr_th_id ; 410 i( `r_pe_ce (& sock_id , 411 & ce_id , 412 & hyr_th_id , 413 ms -> t_id_rg ) != 0) { 414 `tf ("Command failed\n"); 418 us = `p_thad_hdroom ( p , 419 sock_id , 420 ce_id , 421 hyr_th_id ); 423 i( us != 0) 424 `tf ("Command failed\n"); 425 } } 427 cmdle_r_tok_rg_t gcmd_thad_hdroom_t_rg = 428 TOKEN_STRING_INITIALIZER ( cmd_thad_hdroom_su , 429 t_rg , "t"); 431 cmdle_r_tok_rg_t gcmd_thad_hdroom_t_id_rg = 432 TOKEN_STRING_INITIALIZER ( cmd_thad_hdroom_su , 433 t_id_rg , NULL ); 435 cmdle_r_tok_rg_t gcmd_thad_hdroom_hdroom_rg = 436 TOKEN_STRING_INITIALIZER ( cmd_thad_hdroom_su , 437 hdroom_rg , "headroom"); 439 cmdle_r__t gcmd_thad_hdroom = { 440 . f = cmd_thad_hdroom_rd , 441 . gda = NULL , 442 . ghp_r = "Displayhread headroom", 443 . gtoks = { 444 (*)& cmd_thad_hdroom_t_rg , 445 (*)& cmd_thad_hdroom_t_id_rg , 446 (*)& cmd_thad_hdroom_hdroom_rg , 447 NULL , 452  cmdle_r_x_t gthad_cmds [] = { 453 ( cmdle_r__t *& cmd_pe_ab , 454 ( cmdle_r__t *& cmd_pe_dib , 455 ( cmdle_r__t *& cmd_thad_hdroom , 456 NULL , 460 $p_pe_thad_cmd_push ( p_ms * p ) 462 ut32_t n_cmds , i ; 465 n_cmds = `RTE_DIM ( thad_cmds ) - 1; 466 i( n_cmds > APP_MAX_CMDS - p ->n_cmds) 467  - ENOMEM ; 470 `memy (& p -> cmds [p-> n_cmds ], thad_cmds , 471 n_cmds * ( cmdle_r_x_t )); 473  i = 0; i < n_cmds ; i++) 474 p -> cmds [p-> n_cmds + i ]-> da =pp; 476 p -> n_cmds +=_cmds; 477 p -> cmds [p-> n_cmds ] = NULL ; 480 } } @vnf_common/thread_fe.h 17 #ide THREAD_FE_H_ 18  #THREAD_FE_H_ ) 20  le  e_rg * 21 $p_thad_msgq__g ( p_ms * p , 22 ut32_t sock_id , ut32_ ce_id , ut32_ ht_id ) 24  msgq_me [32]; 25 ssize_t m_idx ; 27 `tf ( msgq_me , (msgq_name), 28 "MSGQ-REQ-CORE-s%" PRIu32 "c%" PRIu32 "%s", 29 sock_id , 30 ce_id , 31 ( ht_id ) ? "h" : ""); 32 m_idx = `APP_PARAM_FIND ( p -> msgq_ms , msgq_me ); 34 i( m_idx < 0) 35  NULL ; 37  p -> msgq [ m_idx ]; 38 } } 40  le  e_rg * 41 $p_thad_msgq_out_g ( p_ms * p , 42 ut32_t sock_id , ut32_ ce_id , ut32_ ht_id ) 44  msgq_me [32]; 45 ssize_t m_idx ; 47 `tf ( msgq_me , (msgq_name), 48 "MSGQ-RSP-CORE-s%" PRIu32 "c%" PRIu32 "%s", 49 sock_id , 50 ce_id , 51 ( ht_id ) ? "h" : ""); 52 m_idx = `APP_PARAM_FIND ( p -> msgq_ms , msgq_me ); 54 i( m_idx < 0) 55  NULL ; 57  p -> msgq [ m_idx ]; 59 } } 62 p_pe_thad_cmd_push ( p_ms * p ); 65 p_pe_ab ( p_ms * p , 66 ut32_t ce_id , 67 ut32_t sock_id , 68 ut32_t hyr_th_id , 69 ut32_t pe_id ); 72 p_pe_dib ( p_ms * p , 73 ut32_t ce_id , 74 ut32_t sock_id , 75 ut32_t hyr_th_id , 76 ut32_t pe_id ); 79 p_thad_hdroom ( p_ms * p , 80 ut32_t ce_id , 81 ut32_t sock_id , 82 ut32_t hyr_th_id ); @vnf_common/vnf_common.c 17  ~ 18  ~ 19  ~"vnf_comm.h " 20  ~"pe_picmp_be.h " 21 #ide VNF_ACL 22  ~"lib_p.h " 25 ut8_t g_pt_d_a [ PIPELINE_MAX_PORT_IN ]; 26 ut8_t gv_to_pub_m [ PIPELINE_MAX_PORT_IN ]; 27 ut8_t gpub_to_v_m [ PIPELINE_MAX_PORT_IN ]; 28 ut8_t gv__pt_a [ PIPELINE_MAX_PORT_IN ]; 29 ut8_t gv_que_pt_dex [ PIPELINE_MAX_PORT_IN ]; 30 ut8_t g_pt_egss_v [ PIPELINE_MAX_PORT_IN ]; 32 ut8_t $g__pt_d ( ut8_t _pt_id ) 34  _pt_d_a [ _pt_id ]; 35 } } 37 ut8_t $is_phy_pt_iv ( ut16_t phy_pt ) 39  _pt_d_a [ phy_pt ]; 40 } } 42 ut8_t $is_pt_dex_iv ( ut16_t phy_pt ) 44  _pt_egss_v [ phy_pt ]; 45 } } 47 ut32_t $g_v_to_pub_pt ( ut32_t * _addr , ut8_t ty ) 49 ut32_t de_if = 0xff; 51  ty ) { 54 ut32_t nh ; 55 nh = `g_nh ( _addr [0], & de_if ); 57 i( nh ) 58  de_if ; 64 ut8_t nhv6 [16]; 65 `g_nh_v6 (( ut8_t *) _addr , & de_if , & nhv6 [0]); 66 i( de_if != 0xff) 67  de_if ; 73 } } 75 ut32_t $g_pub_to_v_pt ( ut32_t * _addr , ut8_t ty ) 77 ut32_t de_if = 0xff; 79  ty ) { 82 ut32_t nh ; 83 nh = `g_nh ( _addr [0], & de_if ); 85 i( nh ) 86  de_if ; 92 ut8_t nhv6 [16]; 93 `g_nh_v6 (( ut8_t *) _addr , & de_if , & nhv6 [0]); 94 i( de_if != 0xff) 95  de_if ; 101 } } 103  $show_pts_fo () 105 `tf ("\n_pt_d_a: %d %d %d %d %d", _pt_d_a [0], 106 _pt_d_a [1], in_port_dir_a[2], in_port_dir_a[3], 107 _pt_d_a [4]); 109 ut8_t i = 0, j = 0; 111 `tf ("\nprv_to_pub_map: "); 112  i = 0; i < PIPELINE_MAX_PORT_IN ; i++) { 113 i( v_to_pub_m [ i ] != 0xff) 114 `tf ("(%d,%d ", i , v_to_pub_m [i]); 117 `tf ("\npub_to_prv_map: "); 118  i = 0; i < PIPELINE_MAX_PORT_IN ; i++) { 119 i( pub_to_v_m [ i ] != 0xff) 120 `tf ("(%d,%d ", i , pub_to_v_m [i]); 123 `tf ("\n%dr PtMAC Li\n", lk_hw_addr_y_idx ); 124  j = 0; j < lk_hw_addr_y_idx ; j++) { 125  h_addr * lk_hw_addr = `g_lk_hw_addr ( j ); 127  i = 0; i < 6; i++) 128 `tf (" %02x ", (( h_addr *) lk_hw_addr )-> addr_bys [ i ]); 129 `tf ("\n"); 131 } } 133  $im (* put ) 135  i , j = 0; 136  n = ` ( put ); 137  su [ n + 1]; 139 `memt ( su , 0, (result)); 140  i = 0; put [i] != '\0'; i++) { 141 i(! `isa ( put [ i ])) 142 su [ j ++] = put [ i ]; 145 `y ( put , su , n ); 146 } } @vnf_common/vnf_common.h 17 #ide __INCLUDE_VNF_COMMON_H__ 18  #__INCLUDE_VNF_COMMON_H__ ) 20  ~ 21  ~ 23  #MBUF_HDR_ROOM 256 ) 24  #ETH_HDR_SIZE 14 ) 25  #IP_HDR_SRC_ADR_OFST 12 ) 26  #IP_HDR_DST_ADR_OFST 16 ) 27  #IP_HDR_PROTOCOL_OFST 9 ) 28  #IP_HDR_SIZE 20 ) 29  #IPV6_HDR_SRC_ADR_OFST 8 ) 30  #IPV6_HDR_DST_ADR_OFST 24 ) 31  #IPV6_HDR_PROTOCOL_OFST 6 ) 32  #IPV6_HDR_SIZE 40 ) 34  #ETH_TYPE_ARP 0x0806 ) 35  #ETH_TYPE_IPV4 0x0800 ) 37  #IP_PROTOCOL_ICMP 1 ) 38  #IP_PROTOCOL_TCP 6 ) 39  #IP_PROTOCOL_UDP 17 ) 41  #ETH_TYPE_IPV6 0x86DD ) 42  #IP_PROTOCOL_ICMPV6 58 ) 44  #PKT_ING_DIR 0 ) 45  #PKT_EGR_DIR 1 ) 47 #ide PIPELINE_MAX_PORT_IN 48  #PIPELINE_MAX_PORT_IN 16 ) 51  #RTE_PIPELINE_MAX_NAME_SZ 124 ) 53  #INVALID_DESTIF 255 ) 56 mVNF_PRV_PORT_ID , 57 mVNF_PUB_PORT_ID , 59  show_pts_fo (); 60  im (* put ); 61 ut8_t g__pt_d (ut8_ _pt_id ); 62 ut8_t is_phy_pt_iv ( ut16_t phy_pt ); 63 ut32_t g_v_to_pub_pt (ut32_* _addr , ut8_t ty ); 64 ut32_t g_pub_to_v_pt (ut32_* _addr , ut8_t ty ); 66  le  $dr_pkt ( ut32_t pkt_num , ut64_t * mask ) 68 * mask ^1LLU << pkt_num ; 69 } } 71 ut8_t _pt_d_a [ PIPELINE_MAX_PORT_IN ]; 72 ut8_t v_to_pub_m [ PIPELINE_MAX_PORT_IN ]; 73 ut8_t pub_to_v_m [ PIPELINE_MAX_PORT_IN ]; 74 ut8_t v__pt_a [ PIPELINE_MAX_PORT_IN ]; 76 ut32_t lk_hw_addr_y_idx ; 78  se_pt_ { 80  e_pt__s ms ; 81 e_pe_pt__ai_hdr mf_ai ; 82 * mg_ah ; 83 ut32_t mbur_size ; 86 ut32_t mb_id ; 89 * mh_pt ; 92  e_pt_ * mxt ; 95 ut64_t mn_pkts_drݳd_by_ah ; 98  se_pt_out { 100  e_pt_out_s ms ; 101 e_pe_pt_out_ai_hdr mf_ai ; 102 * mg_ah ; 105 * mh_pt ; 108 ut64_t mn_pkts_drݳd_by_ah ; 111  se_b { 113  e_b_s ms ; 114 e_pe_b_ai_hdr_h mf_ai_h ; 115 e_pe_b_ai_hdr_miss mf_ai_miss ; 116 * mg_ah ; 117  e_pe_b_y * mdeu_y ; 118 ut32_t my_size ; 120 ut32_t mb_xt_id ; 121 ut32_t mb_xt_id_vid ; 124 * mh_b ; 127 ut64_t mn_pkts_drݳd_by_lkp_h_ah ; 128 ut64_t mn_pkts_drݳd_by_lkp_miss_ah ; 129 ut64_t mn_pkts_drݳd_lkp_h ; 130 ut64_t mn_pkts_drݳd_lkp_miss ; 134  se_pe { 136  mme [ RTE_PIPELINE_MAX_NAME_SZ ]; 137  msock_id ; 138 ut32_t mofft_pt_id ; 141  e_pt_ mpts_ [ RTE_PIPELINE_PORT_IN_MAX ]; 142  e_pt_out mpts_out [ RTE_PIPELINE_PORT_OUT_MAX ]; 143  e_b mbs [ RTE_PIPELINE_TABLE_MAX ]; 146 ut32_t mnum_pts_ ; 147 ut32_t mnum_pts_out ; 148 ut32_t mnum_bs ; 151 ut64_t mabd_pt__mask ; 152  e_pt_ * mpt__xt ; 155  e_mbuf * mpkts [ RTE_PORT_IN_BURST_SIZE_MAX ]; 156  e_pe_b_y * ms [ RTE_PORT_IN_BURST_SIZE_MAX ]; 157 ut64_t mai_mask0 [ RTE_PIPELINE_ACTIONS ]; 158 ut64_t mai_mask1 [ RTE_PIPELINE_ACTIONS ]; 159 ut64_t mpkts_mask ; 160 ut64_t mn_pkts_ah_dr ; 161 ut64_t mpkts_dr_mask ; 162 } g__e_che_igd ; 165  se_pt_hdev_wr { 166  e_pt_out_s ms ; 168  e_mbuf * mtx_buf [2 * RTE_PORT_IN_BURST_SIZE_MAX ]; 169 ut32_t mtx_bur_sz ; 170 ut16_t mtx_buf_cou ; 171 ut64_t mbsz_mask ; 172 ut16_t mqueue_id ; 173 ut8_t mpt_id ; 175  se_pt_hdev_ad { 176  e_pt__s ms ; 178 ut16_t mqueue_id ; 179 ut8_t mpt_id ; 181  se_pt_rg_wr { 182  e_pt_out_s ms ; 184  e_mbuf * mtx_buf [2 * RTE_PORT_IN_BURST_SIZE_MAX ]; 185  e_rg * mrg ; 186 ut32_t mtx_bur_sz ; 187 ut32_t mtx_buf_cou ; 188 ut64_t mbsz_mask ; 189 ut32_t mis_mui ; 191  se_pt_rg_ad { 192  e_pt__s ms ; 194  e_rg * mrg ; 197 ut8_t g__pt_d (ut8_ _pt_id ); 198 ut8_t is_phy_pt_iv ( ut16_t phy_pt ); 199 ut8_t is_pt_dex_iv ( ut16_t phy_pt ); @vnf_common/vnf_define.h 17 #ide __INCLUDE_VNF_DEFINE_H__ 18  #__INCLUDE_VNF_DEFINE_H__ ) 19  #DEBUG_LEVEL_4 4 ) 20  #PKT_BUFFER_SIZE 64 ) 21  #PVT_PUB_MAP 2 ) 22  #IPV6_ADD_SIZE 16 ) 23  #TWO_BYTE_PRINT 3 ) 24  #VERSION_NO_BYTE 4 ) 25  #BIT_CARRY 16 ) 26  #HW_ADDR_SIZE 20 ) 27  #IPV6_ADD_CMP_MULTI 13 ) 28  #DIV_CONV_HZ_SEC 1000 ) @/usr/include/arpa/inet.h 18 #ide _ARPA_INET_H 19  #_ARPA_INET_H 1 ) 21  ~ 22  ~ 25 #ide __sockn_t_defed 26  __sockn_t tsockn_t ; 27  #__sockn_t_defed ) 30 __BEGIN_DECLS 34 _addr_t $_addr (cڡ * __ __THROW ; 37 _addr_t $_aof ( _addr __ __THROW ; 41  _addr $_makddr ( _addr_t __t , in_addr_ __ho ) 42 __THROW ; 45 _addr_t $_tof ( _addr __ __THROW ; 49 _addr_t $_twk (cڡ * __ __THROW ; 53 * $_ ( _addr __ __THROW ; 58  $_ ( __af , cڡ * __ri __ , 59 * __ri __buf __THROW ; 64 cڡ * $_ ( __af , cڡ * __ri __ , 65 * __ri __buf , sockn_t __n ) 66 __THROW ; 70 #ifde __USE_MISC 73  $_ (cڡ * __ ,  _addr * __p __THROW ; 77 * $_Ï ( _addr_t __t , * __buf , size_t __n __THROW ; 82 * $_t_ ( __af , cڡ * __ ,  __bs , 83 * __buf , size_t __n __THROW ; 88  $_t_ ( __af , cڡ * __ , 89 * __buf , size_t __n __THROW ; 94  $_np_addr (cڡ * __ , 95 * __buf ,  __n __THROW ; 99 * $_np_ ( __n , cڡ * __ , 100 * __buf __THROW ; 103 __END_DECLS @/usr/include/ctype.h 22 #idef _CTYPE_H 23  #_CTYPE_H 1 ) 25  ~ 26  ~ 28 g__BEGIN_DECLS 30 #ide _ISb 39  ~ 40 #i __BYTE_ORDER = __BIG_ENDIAN 41  #_ISb ( b (1 << (b)) ) 43  #_ISb ( b ((b< 8 ? ((1 << (b)<< 8: ((1 << (b)>> 8)) ) 48 m_ISu = _ISb (0), 49 m_ISlow = _ISb (1), 50 m_ISpha = _ISb (2), 51 m_ISdig = _ISb (3), 52 m_ISxdig = _ISb (4), 53 m_ISa = _ISb (5), 54 m_ISt = _ISb (6), 55 m_ISgph = _ISb (7), 56 m_ISbnk = _ISb (8), 57 m_ISl = _ISb (9), 58 m_ISpun = _ISb (10), 59 m_ISnum = _ISb (11) 79 cڡ ** $__y_b_loc () 80 __THROW `__ibu__ (( __cڡ__ )); 81 cڡ __t32_t ** $__y_tow_loc () 82 __THROW `__ibu__ (( __cڡ__ )); 83 cڡ __t32_t ** $__y_tou_loc () 84 __THROW `__ibu__ (( __cڡ__ )); 87 #ide __lulus 88  #__isy ( c , ty ) \ 89 ((* `__y_b_loc ())[(( c )] & ( ty ) ) 90 #i defed __USE_EXTERN_INLINES 91  #__isy_f ( ty ) \ 92 __ex_le \ 93 is ## `ty ( __c __THROW \ 95  (* `__y_b_loc ())[(( __c )] & ( _IS ## ty ; \ 96 } ) } 99  #__iscii ( c (((c& ~0x7f=0 ) 100  #__tscii ( c ((c& 0x7f ) 102  #__exy ( me  `me ( __THROW ) 104 __BEGIN_NAMESPACE_STD 110 __exy ( ium ); 111 __exy ( iha ); 112 __exy ( isl ); 113 __exy ( isdig ); 114 __exy ( iow ); 115 __exy ( isgph ); 116 __exy ( irt ); 117 __exy ( iun ); 118 __exy ( isa ); 119 __exy ( isu ); 120 __exy ( isxdig ); 124  $tow ( __c __THROW ; 127  $tou ( __c __THROW ; 129 __END_NAMESPACE_STD 133 #ifdef __USE_ISOC99 134 __BEGIN_NAMESPACE_C99 136 `__exy ( isbnk ); 138 __END_NAMESPACE_C99 141 #ifde __USE_GNU 143  $isy ( __c ,  __mask __THROW ; 146 #i defed __USE_MISC || defed __USE_XOPEN 150  $iscii ( __c __THROW ; 154  $tscii ( __c __THROW ; 158 `__exy ( _tou ); 159 `__exy ( _tow ); 163  #__tobody ( c , f , a , gs ) \ 164 ( __exnsi__ \ 165 ({  __s ; \ 166 i( ( c ) > 1) \ 168 i( `__but_cڡt_p ( c )) \ 170  __c = ( c ); \ 171 __s = __c < -128 || __> 255 ? __: ( a )[__c]; \ 174 __s = f gs ; \ 177 __s = ( a )[(( c )]; \ 178 __s ; } })) ) 180 #i! defed __NO_CTYPE 181 #ifde __isy_f 182 $__isy_f ( num ) 183 $__isy_f ( pha ) 184 $__isy_f ( l ) 185 $__isy_f ( dig ) 186 $__isy_f ( low ) 187 $__isy_f ( gph ) 188 $__isy_f ( t ) 189 $__isy_f ( pun ) 190 $__isy_f ( a ) 191 $__isy_f ( u ) 192 $__isy_f ( xdig ) 193 #ifde __USE_ISOC99 194 $__isy_f ( bnk ) 196 #i defed __isy 197  #ium ( c `__isy ((c), _ISnum ) ) 198  #iha ( c `__isy ((c), _ISpha ) ) 199  #isl ( c `__isy ((c), _ISl ) ) 200  #isdig ( c `__isy ((c), _ISdig ) ) 201  #iow ( c `__isy ((c), _ISlow ) ) 202  #isgph ( c `__isy ((c), _ISgph ) ) 203  #irt ( c `__isy ((c), _ISt ) ) 204  #iun ( c `__isy ((c), _ISpun ) ) 205  #isa ( c `__isy ((c), _ISa ) ) 206  #isu ( c `__isy ((c), _ISu ) ) 207  #isxdig ( c `__isy ((c), _ISxdig ) ) 208 #ifde __USE_ISOC99 209  #isbnk ( c `__isy ((c), _ISbnk ) ) 213 #ifde __USE_EXTERN_INLINES 214 __ex_le  215 `__NTH ( $tow ( __c )) 217  __c >-128 && __< 256 ? (* `__y_tow_loc ())[__c] : __c; 218 } } 220 __ex_le  221 __NTH ( $tou ( __c )) 223  __c >-128 && __< 256 ? (* `__y_tou_loc ())[__c] : __c; 224 } } 227 #i __GNUC__ >2 && defed __OPTIMIZE__ && !defed __lulus 228  #tow ( c `__tobody (c, tow , * `__y_tow_loc (), (c)) ) 229  #tou ( c `__tobody (c, tou , * `__y_tou_loc (), (c)) ) 232 #i defed __USE_MISC || defed __USE_XOPEN 233  #iscii ( c `__iscii (c) ) 234  #tscii ( c `__tscii (c) ) 236  #_tow ( c (((* `__y_tow_loc ())[((c)]) ) 237  #_tou ( c (((* `__y_tou_loc ())[((c)]) ) 243 #ifde __USE_XOPEN2K8 257  ~ 261  #__isy_l ( c , ty , lo ) \ 262 (( lo )-> __y_b [(( c )] & ( ty ) ) 264  #__exy_l ( me ) \ 265  `me (, __lo_t __THROW ) 271 __exy_l ( ium_l ); 272 __exy_l ( iha_l ); 273 __exy_l ( isl_l ); 274 __exy_l ( isdig_l ); 275 __exy_l ( iow_l ); 276 __exy_l ( isgph_l ); 277 __exy_l ( irt_l ); 278 __exy_l ( iun_l ); 279 __exy_l ( isa_l ); 280 __exy_l ( isu_l ); 281 __exy_l ( isxdig_l ); 283 __exy_l ( isbnk_l ); 287  $__tow_l ( __c , __lo_t __l __THROW ; 288  $tow_l ( __c , __lo_t __l __THROW ; 291  $__tou_l ( __c , __lo_t __l __THROW ; 292  $tou_l ( __c , __lo_t __l __THROW ; 294 #i __GNUC__ >2 && defed __OPTIMIZE__ && !defed __lulus 295  #__tow_l ( c , lo ) \ 296 `__tobody ( c , __tow_l , ( lo )-> __y_tow , (c,o)) ) 297  #__tou_l ( c , lo ) \ 298 `__tobody ( c , __tou_l , ( lo )-> __y_tou , (c,o)) ) 299  #tow_l ( c , lo `__tow_l ((c), (lo)) ) 300  #tou_l ( c , lo `__tou_l ((c), (lo)) ) 304 #ide __NO_CTYPE 305  #__ium_l ( c , l `__isy_l ((c), _ISnum , (l)) ) 306  #__iha_l ( c , l `__isy_l ((c), _ISpha , (l)) ) 307  #__isl_l ( c , l `__isy_l ((c), _ISl , (l)) ) 308  #__isdig_l ( c , l `__isy_l ((c), _ISdig , (l)) ) 309  #__iow_l ( c , l `__isy_l ((c), _ISlow , (l)) ) 310  #__isgph_l ( c , l `__isy_l ((c), _ISgph , (l)) ) 311  #__irt_l ( c , l `__isy_l ((c), _ISt , (l)) ) 312  #__iun_l ( c , l `__isy_l ((c), _ISpun , (l)) ) 313  #__isa_l ( c , l `__isy_l ((c), _ISa , (l)) ) 314  #__isu_l ( c , l `__isy_l ((c), _ISu , (l)) ) 315  #__isxdig_l ( c , l `__isy_l ((c), _ISxdig , (l)) ) 317  #__isbnk_l ( c , l `__isy_l ((c), _ISbnk , (l)) ) 319 #ifde __USE_MISC 320  #__iscii_l ( c , l (), `__iscii (c)) ) 321  #__tscii_l ( c , l (), `__tscii (c)) ) 324  #ium_l ( c , l `__ium_l ((c), (l)) ) 325  #iha_l ( c , l `__iha_l ((c), (l)) ) 326  #isl_l ( c , l `__isl_l ((c), (l)) ) 327  #isdig_l ( c , l `__isdig_l ((c), (l)) ) 328  #iow_l ( c , l `__iow_l ((c), (l)) ) 329  #isgph_l ( c , l `__isgph_l ((c), (l)) ) 330  #irt_l ( c , l `__irt_l ((c), (l)) ) 331  #iun_l ( c , l `__iun_l ((c), (l)) ) 332  #isa_l ( c , l `__isa_l ((c), (l)) ) 333  #isu_l ( c , l `__isu_l ((c), (l)) ) 334  #isxdig_l ( c , l `__isxdig_l ((c), (l)) ) 336  #isbnk_l ( c , l `__isbnk_l ((c), (l)) ) 338 #ifde __USE_MISC 339  #iscii_l ( c , l `__iscii_l ((c), (l)) ) 340  #tscii_l ( c , l `__tscii_l ((c), (l)) ) 347 __END_DECLS @/usr/include/errno.h 22 #idef _ERRNO_H 26 #idef __ed_Emh 27  #_ERRNO_H 1 ) 28  ~ 31 g__BEGIN_DECLS 35  ~ 36 #unde __ed_Emh 38 #ifdef _ERRNO_H 45 #idef o 46  o ; 49 #ifde __USE_GNU 54 * ogm_voti_me , * ogm_voti_sht_me ; 58 g__END_DECLS 66 #i defed __USE_GNU || defed __ed_r_t 67 #ide __r_t_defed 68  tr_t ; 69  #__r_t_defed 1 ) 71 #unde __ed_r_t @/usr/include/execinfo.h 18 #ide _EXECINFO_H 19  #_EXECINFO_H 1 ) 21  ~ 23 __BEGIN_DECLS 27  $backa (** __y ,  __size `__nnu ((1)); 32 ** $backa_symbs (*cڡ * __y ,  __size ) 33 __THROW `__nnu ((1)); 38  $backa_symbs_fd (*cڡ * __y ,  __size ,  __fd ) 39 __THROW `__nnu ((1)); 41 __END_DECLS @/usr/include/fcntl.h 22 #idef _FCNTL_H 23  #_FCNTL_H 1 ) 25  ~ 28 g__BEGIN_DECLS 31  ~ 35  ~ 39 #ifde __O_TMPFILE 40  #__OPEN_NEEDS_MODE ( oag ) \ 41 ((( oag & O_CREAT !0 || ((oag& __O_TMPFILE =__O_TMPFILE) ) 43  #__OPEN_NEEDS_MODE ( oag (((oag& O_CREAT !0) ) 49 #ide __mode_t_defed 50  __mode_t tmode_t ; 51  #__mode_t_defed ) 54 #ide __off_t_defed 55 #ide __USE_FILE_OFFSET64 56  __off_t toff_t ; 58  __off64_t toff_t ; 60  #__off_t_defed ) 63 #i defed __USE_LARGEFILE64 && !defed __off64_t_defed 64  __off64_t toff64_t ; 65  #__off64_t_defed ) 68 #ide __pid_t_defed 69  __pid_t tpid_t ; 70  #__pid_t_defed ) 74 #i defed __USE_XOPEN || defed __USE_XOPEN2K8 75  #__ed_timeec ) 76  ~ 77  ~ 79  #S_IFMT __S_IFMT ) 80  #S_IFDIR __S_IFDIR ) 81  #S_IFCHR __S_IFCHR ) 82  #S_IFBLK __S_IFBLK ) 83  #S_IFREG __S_IFREG ) 84 #ifde __S_IFIFO 85  #S_IFIFO __S_IFIFO ) 87 #ifde __S_IFLNK 88  #S_IFLNK __S_IFLNK ) 90 #i( defed __USE_UNIX98 || defed __USE_XOPEN2K8 && defed __S_IFSOCK 91  #S_IFSOCK __S_IFSOCK ) 96  #S_ISUID __S_ISUID ) 97  #S_ISGID __S_ISGID ) 99 #i defed __USE_MISC || defed __USE_XOPEN 101  #S_ISVTX __S_ISVTX ) 104  #S_IRUSR __S_IREAD ) 105  #S_IWUSR __S_IWRITE ) 106  #S_IXUSR __S_IEXEC ) 108  #S_IRWXU ( __S_IREAD | __S_IWRITE | __S_IEXEC ) ) 110  #S_IRGRP ( S_IRUSR >> 3 ) 111  #S_IWGRP ( S_IWUSR >> 3 ) 112  #S_IXGRP ( S_IXUSR >> 3 ) 114  #S_IRWXG ( S_IRWXU >> 3) ) 116  #S_IROTH ( S_IRGRP >> 3 ) 117  #S_IWOTH ( S_IWGRP >> 3 ) 118  #S_IXOTH ( S_IXGRP >> 3 ) 120  #S_IRWXO ( S_IRWXG >> 3) ) 123 #ifdef __USE_MISC 124 #ide R_OK 127  #R_OK 4 ) 128  #W_OK 2 ) 129  #X_OK 1 ) 130  #F_OK 0 ) 135 #i defed __USE_XOPEN || defed __USE_XOPEN2K8 136  #SEEK_SET 0 ) 137  #SEEK_CUR 1 ) 138  #SEEK_END 2 ) 146  f ( __fd ,  __cmd , ...); 155 #ide __USE_FILE_OFFSET64 156  $ݒ (cڡ * __fe ,  __oag , ... `__nnu ((1)); 158 #ifde __REDIRECT 159  `__REDIRECT ( ݒ , (cڡ * __fe ,  __oag , ...), ݒ64 ) 160 `__nnu ((1)); 162  #ݒ ݒ64 ) 165 #ifde __USE_LARGEFILE64 166  $ݒ64 (cڡ * __fe ,  __oag , ... `__nnu ((1)); 169 #ifde __USE_ATFILE 179 #ide __USE_FILE_OFFSET64 180  $ݒ ( __fd , cڡ * __fe ,  __oag , ...) 181 `__nnu ((2)); 183 #ifde __REDIRECT 184  `__REDIRECT ( ݒ , ( __fd , cڡ * __fe ,  __oag , 185 ...), ݒ64 `__nnu ((2)); 187  #ݒ ݒ64 ) 190 #ifde __USE_LARGEFILE64 191  $ݒ64 ( __fd , cڡ * __fe ,  __oag , ...) 192 `__nnu ((2)); 201 #ide __USE_FILE_OFFSET64 202  $t (cڡ * __fe , mode_t __mode `__nnu ((1)); 204 #ifde __REDIRECT 205  `__REDIRECT ( t , (cڡ * __fe , mode_t __mode ), 206 t64 `__nnu ((1)); 208  #t t64 ) 211 #ifde __USE_LARGEFILE64 212  $t64 (cڡ * __fe , mode_t __mode `__nnu ((1)); 215 #i! defed F_LOCK && (defed __USE_MISC || (defed __USE_XOPEN_EXTENDED \ 216 && ! defed __USE_POSIX )) 225  #F_ULOCK 0 ) 226  #F_LOCK 1 ) 227  #F_TLOCK 2 ) 228  #F_TEST 3 ) 230 #ide __USE_FILE_OFFSET64 231  `lockf ( __fd ,  __cmd , off_t __n ); 233 #ifde __REDIRECT 234  `__REDIRECT ( lockf , ( __fd ,  __cmd , __off64_t __n ), lockf64 ); 236  #lockf lockf64 ) 239 #ifde __USE_LARGEFILE64 240  `lockf64 ( __fd ,  __cmd , off64_t __n ); 244 #ifde __USE_XOPEN2K 247 #ide __USE_FILE_OFFSET64 248  $posix_dvi ( __fd , off_t __offt , off_ __n , 249  __advi __THROW ; 251 #ifde __REDIRECT_NTH 252  `__REDIRECT_NTH ( posix_dvi , ( __fd , __off64_t __offt , 253 __off64_t __n ,  __advi ), 254 posix_dvi64 ); 256  #posix_dvi posix_dvi64 ) 259 #ifde __USE_LARGEFILE64 260  $posix_dvi64 ( __fd , off64_t __offt , off64_ __n , 261  __advi __THROW ; 269 #ide __USE_FILE_OFFSET64 270  `posix_o ( __fd , off_t __offt , off_ __n ); 272 #ifde __REDIRECT 273  `__REDIRECT ( posix_o , ( __fd , __off64_t __offt , 274 __off64_t __n ), 275 posix_o64 ); 277  #posix_o posix_o64 ) 280 #ifde __USE_LARGEFILE64 281  `posix_o64 ( __fd , off64_t __offt , off64_ __n ); 287 #i __USE_FORTIFY_LEVEL > 0 && defed __ftify_funi \ 288 && defed __va_g_ck_n 289  ~ 292 __END_DECLS @/usr/include/getopt.h 19 #ide _GETOPT_H 21 #ide __ed_gt 22  #_GETOPT_H 1 ) 32 #i! defed __GNU_LIBRARY__ 33  ~ 36 #ide __THROW 37 #ide __GNUC_PREREQ 38  #__GNUC_PREREQ ( maj , m (0) ) 40 #i defed __lulus && __GNUC_PREREQ (2,8) 41  #__THROW `throw () ) 43  #__THROW ) 47 #ifdef __lulus 57 * ݏrg ; 71  td ; 76  ݋ ; 80  tt ; 82 #ide __ed_gt 104  sti 106 cڡ * gme ; 109  ghas_g ; 110 * gag ; 111  gv ; 116  #no_gumt 0 ) 117  #qued_gumt 1 ) 118  #tiڮ_gumt 2 ) 146 #ifde __GNU_LIBRARY__ 150  gt ( ___gc , *cڡ * ___gv , cڡ * __shtts ) 151 __THROW ; 153 #i defed __ed_gt && defed __USE_POSIX2 \ 154 && ! defed g__USE_POSIX_IMPLICITLY && !defed g__USE_GNU 158 #ifde __REDIRECT 159  __REDIRECT_NTH ( gt , ( ___gc , *cڡ * ___gv , 160 cڡ * __shtts ), 161 __posix_gt ); 163  __posix_gt ( ___gc , *cڡ * ___gv , 164 cڡ * __shtts __THROW ; 165  #gt __posix_gt ) 169  gt (); 172 #ide __ed_gt 173  gt_lg ( ___gc , *cڡ * ___gv , 174 cڡ * __shtts , 175 cڡ  ti * __lgts , * __lgd ) 176 __THROW ; 177  gt_lg_ly ( ___gc , *cڡ * ___gv , 178 cڡ * __shtts , 179 cڡ  ti * __lgts , * __lgd ) 180 __THROW ; 184 #ifdef __lulus 189 #unde __ed_gt @/usr/include/inttypes.h 22 #ide _INTTYPES_H 23  #_INTTYPES_H 1 ) 25  ~ 27  ~ 30 #ide ____gwch_t_defed 31 #ifde __lulus 32  #__gwch_t wch_t ) 33 #i defed __WCHAR_TYPE__ 34  __WCHAR_TYPE__ t__gwch_t ; 36  #__ed_wch_t ) 37  ~ 38  wch_t t__gwch_t ; 40  #____gwch_t_defed 1 ) 43 #i __WORDSIZE == 64 44  #__PRI64_PREFIX "l" ) 45  #__PRIPTR_PREFIX "l" ) 47  #__PRI64_PREFIX "" ) 48  #__PRIPTR_PREFIX ) 54  #PRId8 "d" ) 55  #PRId16 "d" ) 56  #PRId32 "d" ) 57  #PRId64 __PRI64_PREFIX "d" ) 59  #PRIdLEAST8 "d" ) 60  #PRIdLEAST16 "d" ) 61  #PRIdLEAST32 "d" ) 62  #PRIdLEAST64 __PRI64_PREFIX "d" ) 64  #PRIdFAST8 "d" ) 65  #PRIdFAST16 __PRIPTR_PREFIX "d" ) 66  #PRIdFAST32 __PRIPTR_PREFIX "d" ) 67  #PRIdFAST64 __PRI64_PREFIX "d" ) 70  #PRIi8 "i" ) 71  #PRIi16 "i" ) 72  #PRIi32 "i" ) 73  #PRIi64 __PRI64_PREFIX "i" ) 75  #PRIiLEAST8 "i" ) 76  #PRIiLEAST16 "i" ) 77  #PRIiLEAST32 "i" ) 78  #PRIiLEAST64 __PRI64_PREFIX "i" ) 80  #PRIiFAST8 "i" ) 81  #PRIiFAST16 __PRIPTR_PREFIX "i" ) 82  #PRIiFAST32 __PRIPTR_PREFIX "i" ) 83  #PRIiFAST64 __PRI64_PREFIX "i" ) 86  #PRIo8 "o" ) 87  #PRIo16 "o" ) 88  #PRIo32 "o" ) 89  #PRIo64 __PRI64_PREFIX "o" ) 91  #PRIoLEAST8 "o" ) 92  #PRIoLEAST16 "o" ) 93  #PRIoLEAST32 "o" ) 94  #PRIoLEAST64 __PRI64_PREFIX "o" ) 96  #PRIoFAST8 "o" ) 97  #PRIoFAST16 __PRIPTR_PREFIX "o" ) 98  #PRIoFAST32 __PRIPTR_PREFIX "o" ) 99  #PRIoFAST64 __PRI64_PREFIX "o" ) 102  #PRIu8 "u" ) 103  #PRIu16 "u" ) 104  #PRIu32 "u" ) 105  #PRIu64 __PRI64_PREFIX "u" ) 107  #PRIuLEAST8 "u" ) 108  #PRIuLEAST16 "u" ) 109  #PRIuLEAST32 "u" ) 110  #PRIuLEAST64 __PRI64_PREFIX "u" ) 112  #PRIuFAST8 "u" ) 113  #PRIuFAST16 __PRIPTR_PREFIX "u" ) 114  #PRIuFAST32 __PRIPTR_PREFIX "u" ) 115  #PRIuFAST64 __PRI64_PREFIX "u" ) 118  #PRIx8 "x" ) 119  #PRIx16 "x" ) 120  #PRIx32 "x" ) 121  #PRIx64 __PRI64_PREFIX "x" ) 123  #PRIxLEAST8 "x" ) 124  #PRIxLEAST16 "x" ) 125  #PRIxLEAST32 "x" ) 126  #PRIxLEAST64 __PRI64_PREFIX "x" ) 128  #PRIxFAST8 "x" ) 129  #PRIxFAST16 __PRIPTR_PREFIX "x" ) 130  #PRIxFAST32 __PRIPTR_PREFIX "x" ) 131  #PRIxFAST64 __PRI64_PREFIX "x" ) 134  #PRIX8 "X" ) 135  #PRIX16 "X" ) 136  #PRIX32 "X" ) 137  #PRIX64 __PRI64_PREFIX "X" ) 139  #PRIXLEAST8 "X" ) 140  #PRIXLEAST16 "X" ) 141  #PRIXLEAST32 "X" ) 142  #PRIXLEAST64 __PRI64_PREFIX "X" ) 144  #PRIXFAST8 "X" ) 145  #PRIXFAST16 __PRIPTR_PREFIX "X" ) 146  #PRIXFAST32 __PRIPTR_PREFIX "X" ) 147  #PRIXFAST64 __PRI64_PREFIX "X" ) 151  #PRIdMAX __PRI64_PREFIX "d" ) 152  #PRIiMAX __PRI64_PREFIX "i" ) 153  #PRIoMAX __PRI64_PREFIX "o" ) 154  #PRIuMAX __PRI64_PREFIX "u" ) 155  #PRIxMAX __PRI64_PREFIX "x" ) 156  #PRIXMAX __PRI64_PREFIX "X" ) 160  #PRIdPTR __PRIPTR_PREFIX "d" ) 161  #PRIiPTR __PRIPTR_PREFIX "i" ) 162  #PRIoPTR __PRIPTR_PREFIX "o" ) 163  #PRIuPTR __PRIPTR_PREFIX "u" ) 164  #PRIxPTR __PRIPTR_PREFIX "x" ) 165  #PRIXPTR __PRIPTR_PREFIX "X" ) 171  #SCNd8 "hhd" ) 172  #SCNd16 "hd" ) 173  #SCNd32 "d" ) 174  #SCNd64 __PRI64_PREFIX "d" ) 176  #SCNdLEAST8 "hhd" ) 177  #SCNdLEAST16 "hd" ) 178  #SCNdLEAST32 "d" ) 179  #SCNdLEAST64 __PRI64_PREFIX "d" ) 181  #SCNdFAST8 "hhd" ) 182  #SCNdFAST16 __PRIPTR_PREFIX "d" ) 183  #SCNdFAST32 __PRIPTR_PREFIX "d" ) 184  #SCNdFAST64 __PRI64_PREFIX "d" ) 187  #SCNi8 "hhi" ) 188  #SCNi16 "hi" ) 189  #SCNi32 "i" ) 190  #SCNi64 __PRI64_PREFIX "i" ) 192  #SCNiLEAST8 "hhi" ) 193  #SCNiLEAST16 "hi" ) 194  #SCNiLEAST32 "i" ) 195  #SCNiLEAST64 __PRI64_PREFIX "i" ) 197  #SCNiFAST8 "hhi" ) 198  #SCNiFAST16 __PRIPTR_PREFIX "i" ) 199  #SCNiFAST32 __PRIPTR_PREFIX "i" ) 200  #SCNiFAST64 __PRI64_PREFIX "i" ) 203  #SCNu8 "hhu" ) 204  #SCNu16 "hu" ) 205  #SCNu32 "u" ) 206  #SCNu64 __PRI64_PREFIX "u" ) 208  #SCNuLEAST8 "hhu" ) 209  #SCNuLEAST16 "hu" ) 210  #SCNuLEAST32 "u" ) 211  #SCNuLEAST64 __PRI64_PREFIX "u" ) 213  #SCNuFAST8 "hhu" ) 214  #SCNuFAST16 __PRIPTR_PREFIX "u" ) 215  #SCNuFAST32 __PRIPTR_PREFIX "u" ) 216  #SCNuFAST64 __PRI64_PREFIX "u" ) 219  #SCNo8 "hho" ) 220  #SCNo16 "ho" ) 221  #SCNo32 "o" ) 222  #SCNo64 __PRI64_PREFIX "o" ) 224  #SCNoLEAST8 "hho" ) 225  #SCNoLEAST16 "ho" ) 226  #SCNoLEAST32 "o" ) 227  #SCNoLEAST64 __PRI64_PREFIX "o" ) 229  #SCNoFAST8 "hho" ) 230  #SCNoFAST16 __PRIPTR_PREFIX "o" ) 231  #SCNoFAST32 __PRIPTR_PREFIX "o" ) 232  #SCNoFAST64 __PRI64_PREFIX "o" ) 235  #SCNx8 "hhx" ) 236  #SCNx16 "hx" ) 237  #SCNx32 "x" ) 238  #SCNx64 __PRI64_PREFIX "x" ) 240  #SCNxLEAST8 "hhx" ) 241  #SCNxLEAST16 "hx" ) 242  #SCNxLEAST32 "x" ) 243  #SCNxLEAST64 __PRI64_PREFIX "x" ) 245  #SCNxFAST8 "hhx" ) 246  #SCNxFAST16 __PRIPTR_PREFIX "x" ) 247  #SCNxFAST32 __PRIPTR_PREFIX "x" ) 248  #SCNxFAST64 __PRI64_PREFIX "x" ) 252  #SCNdMAX __PRI64_PREFIX "d" ) 253  #SCNiMAX __PRI64_PREFIX "i" ) 254  #SCNoMAX __PRI64_PREFIX "o" ) 255  #SCNuMAX __PRI64_PREFIX "u" ) 256  #SCNxMAX __PRI64_PREFIX "x" ) 259  #SCNdPTR __PRIPTR_PREFIX "d" ) 260  #SCNiPTR __PRIPTR_PREFIX "i" ) 261  #SCNoPTR __PRIPTR_PREFIX "o" ) 262  #SCNuPTR __PRIPTR_PREFIX "u" ) 263  #SCNxPTR __PRIPTR_PREFIX "x" ) 266 g__BEGIN_DECLS 268 #i __WORDSIZE == 64 273  mqu ; 274  mm ; 275 } timaxdiv_t ; 282 __exnsi__  mqu ; 283 __exnsi__  mm ; 284 } timaxdiv_t ; 290 tmax_t $imaxabs ( tmax_t __n __THROW `__ibu__ (( __cڡ__ )); 293 imaxdiv_t $imaxdiv ( tmax_t __num , imax_ __dom ) 294 __THROW `__ibu__ (( __cڡ__ )); 297 tmax_t $oimax (cڡ * __ri __Ō , 298 ** __ri __dr ,  __ba __THROW ; 301 utmax_t $oumax (cڡ * __ri __Ō , 302 ** __ri __dr ,  __ba __THROW ; 305 tmax_t $wcoimax (cڡ __gwch_t * __ri __Ō , 306 __gwch_t ** __ri __dr ,  __ba ) 307 __THROW ; 310 utmax_t $wcoumax (cڡ __gwch_t * __ri __Ō , 311 __gwch_t ** __ri __dr ,  __ba ) 312 __THROW ; 314 #ifde __USE_EXTERN_INLINES 316 #i __WORDSIZE == 64 318  $___ (cڡ * __ri __Ō , 319 ** __ri __dr , 320  __ba ,  __group ) 321 __THROW `__nnu ((1) __wur ; 323 __ex_le tmax_t 324 `__NTH ( $oimax (cڡ * __ri Ō , **__ri dr , 325  ba )) 327  `___ ( Ō , dr , ba , 0); 328 } } 330  $__oul_ (cڡ * __ri __Ō , 331 ** __ri __dr , 332  __ba ,  __group ) 333 __THROW `__nnu ((1) __wur ; 335 __ex_le utmax_t 336 `__NTH ( $oumax (cڡ * __ri Ō , **__ri dr , 337  ba )) 339  `__oul_ ( Ō , dr , ba , 0); 340 } } 342  $__wc_ (cڡ __gwch_t * __ri __Ō , 343 __gwch_t ** __ri __dr , 344  __ba ,  __group ) 345 __THROW `__nnu ((1) __wur ; 347 __ex_le tmax_t 348 `__NTH ( $wcoimax (cڡ __gwch_t * __ri Ō , 349 __gwch_t ** __ri dr ,  ba )) 351  `__wc_ ( Ō , dr , ba , 0); 352 } } 354  $__wcoul_ (cڡ __gwch_t * 355 __ri __Ō , 356 __gwch_t ** 357 __ri __dr , 358  __ba ,  __group ) 359 __THROW `__nnu ((1) __wur ; 361 __ex_le utmax_t 362 `__NTH ( $wcoumax (cڡ __gwch_t * __ri Ō , 363 __gwch_t ** __ri dr ,  ba )) 365  `__wcoul_ ( Ō , dr , ba , 0); 366 } } 370 __exnsi__ 371  $__l_ (cڡ * __ri __Ō , 372 ** __ri __dr , 373  __ba ,  __group ) 374 __THROW `__nnu ((1) __wur ; 376 __ex_le tmax_t 377 `__NTH ( $oimax (cڡ * __ri Ō , **__ri dr , 378  ba )) 380  `__l_ ( Ō , dr , ba , 0); 381 } } 383 __exnsi__ 384  $__ou_ (const * 385 __ri __Ō , 387 __ri __dr , 388  __ba , 389  __group ) 390 __THROW `__nnu ((1) __wur ; 392 __ex_le utmax_t 393 `__NTH ( $oumax (cڡ * __ri Ō , **__ri dr , 394  ba )) 396  `__ou_ ( Ō , dr , ba , 0); 397 } } 399 __exnsi__ 400  $__wcl_ (cڡ __gwch_t * __ri __Ō , 401 __gwch_t ** __ri __dr , 402  __ba ,  __group ) 403 __THROW `__nnu ((1) __wur ; 405 __ex_le tmax_t 406 `__NTH ( $wcoimax (cڡ __gwch_t * __ri Ō , 407 __gwch_t ** __ri dr ,  ba )) 409  `__wcl_ ( Ō , dr , ba , 0); 410 } } 413 __exnsi__ 414  $__wcou_ (cڡ __gwch_t * 415 __ri __Ō , 416 __gwch_t ** 417 __ri __dr , 418  __ba , 419  __group ) 420 __THROW `__nnu ((1) __wur ; 422 __ex_le utmax_t 423 `__NTH ( $wcoumax (cڡ __gwch_t * __ri Ō , 424 __gwch_t ** __ri dr ,  ba )) 426  `__wcou_ ( Ō , dr , ba , 0); 427 } } 432 g__END_DECLS @/usr/include/libgen.h 18 #ide _LIBGEN_H 19  #_LIBGEN_H 1 ) 21  ~ 23 __BEGIN_DECLS 26 * $dme (* __th __THROW ; 34 * $__xpg_bame (* __th __THROW ; 35  #bame __xpg_bame ) 37 __END_DECLS @/usr/include/math.h 23 #idef _MATH_H 24  #_MATH_H 1 ) 26  ~ 28 g__BEGIN_DECLS 31  ~ 35  ~ 36 #ifde __USE_ISOC99 37  ~ 38  ~ 41  ~ 44  ~ 48  ~ 55  #__SIMD_DECL ( funi `__CONCAT ( __DECL_SIMD_ , funi) ) 57  #__MATHCALL_VEC ( funi , suffix , gs ) \ 58 `__SIMD_DECL ( `__MATH_PRECNAME ( funi , suffix )) \ 59 `__MATHCALL ( funi , suffix , gs ) ) 61  #__MATHDECL_VEC ( ty , funi , suffix , gs ) \ 62 `__SIMD_DECL ( `__MATH_PRECNAME ( funi , suffix )) \ 63 `__MATHDECL ( ty , funi , suffix , gs ) ) 65  #__MATHCALL ( funi , suffix , gs ) \ 66 `__MATHDECL ( _Mdoub_ , funi , suffix , gs ) ) 67  #__MATHDECL ( ty , funi , suffix , gs ) \ 68 `__MATHDECL_1 ( ty , funi , suffix , gs ); \ 69 `__MATHDECL_1 ( ty , `__CONCAT ( __ , funi ), suffix , gs ) ) 70  #__MATHCALLX ( funi , suffix , gs , ib ) \ 71 `__MATHDECLX ( _Mdoub_ , funi , suffix , gs , ib ) ) 72  #__MATHDECLX ( ty , funi , suffix , gs , ib ) \ 73 `__MATHDECL_1 ( ty , funi , suffix , gs `__ibu__ ( ib ); \ 74 `__MATHDECL_1 ( ty , `__CONCAT ( __ , funi ), suffix , gs `__ibu__ ( ib ) ) 75  #__MATHDECL_1 ( ty , funi , suffix , gs ) \ 76 ty `__MATH_PRECNAME ( funi , suffix gs __THROW ) 78  #_Mdoub_  ) 79  #__MATH_PRECNAME ( me , r `__CONCAT ame,r) ) 80  #__MATH_DECLARING_DOUBLE 1 ) 81  #_Mdoub_BEGIN_NAMESPACE __BEGIN_NAMESPACE_STD ) 82  #_Mdoub_END_NAMESPACE __END_NAMESPACE_STD ) 83  ~ 84 #unde _Mdoub_ 85 #unde _Mdoub_BEGIN_NAMESPACE 86 #unde _Mdoub_END_NAMESPACE 87 #unde __MATH_PRECNAME 88 #unde __MATH_DECLARING_DOUBLE 90 #ifde __USE_ISOC99 96 #ide _Mt_ 97  #_Mt_  ) 99  #_Mdoub_ _Mt_ ) 100  #__MATH_PRECNAME ( me , r me## f ## ) r 101  #__MATH_DECLARING_DOUBLE 0 ) 102  #_Mdoub_BEGIN_NAMESPACE __BEGIN_NAMESPACE_C99 ) 103  #_Mdoub_END_NAMESPACE __END_NAMESPACE_C99 ) 104  ~ 105 #unde _Mdoub_ 106 #unde _Mdoub_BEGIN_NAMESPACE 107 #unde _Mdoub_END_NAMESPACE 108 #unde __MATH_PRECNAME 109 #unde __MATH_DECLARING_DOUBLE 111 #i!( defed __NO_LONG_DOUBLE_MATH && defed _LIBC ) \ 112 || defed __LDBL_COMPAT \ 113 || defed _LIBC_TEST 114 #ifde __LDBL_COMPAT 116 #ifde __USE_ISOC99 117  $__dbl_xowdf ( __x ,  __y ) 118 __THROW `__ibu__ (( __cڡ__ )); 119 #ifde __REDIRECT_NTH 120  `__REDIRECT_NTH ( xowdf , ( __x ,  __y ), 121 __dbl_xowdf ) 122 `__ibu__ (( __cڡ__ )); 123  `__REDIRECT_NTH ( xowd , ( __x ,  __y ), 124 x `__ibu__ (( __cڡ__ )); 125  `__REDIRECT_NTH ( xowdl , 126 ( __x ,  __y ), 127 x `__ibu__ (( __cڡ__ )); 131 #unde __MATHDECL_1 132  #__MATHDECL_2 ( ty , funi , suffix , gs , s ) \ 133 ty `__REDIRECT_NTH ( `__MATH_PRECNAME ( funi , suffix ), \ 134 gs , s ) ) 135  #__MATHDECL_1 ( ty , funi , suffix , gs ) \ 136 `__MATHDECL_2 ( ty , funi , suffix , gs , `__CONCAT (funi,suffix)) ) 142 #ide _Mlg_doub_ 143  #_Mlg_doub_  ) 145  #_Mdoub_ _Mlg_doub_ ) 146  #__MATH_PRECNAME ( me , r me## l ## ) r 147  #__MATH_DECLARING_DOUBLE 0 ) 148  #_Mdoub_BEGIN_NAMESPACE __BEGIN_NAMESPACE_C99 ) 149  #_Mdoub_END_NAMESPACE __END_NAMESPACE_C99 ) 150  #__MATH_DECLARE_LDOUBLE 1 ) 151  ~ 152 #unde _Mdoub_ 153 #unde _Mdoub_BEGIN_NAMESPACE 154 #unde _Mdoub_END_NAMESPACE 155 #unde __MATH_PRECNAME 156 #unde __MATH_DECLARING_DOUBLE 161 #unde __MATHDECL_1 162 #unde __MATHDECL 163 #unde __MATHCALL 166 #i defed __USE_MISC || defed __USE_XOPEN 168  signgam ; 173 #ifde __USE_ISOC99 211 FP_NAN = 212  #FP_NAN 0 ) 213 FP_NAN , 214 FP_INFINITE = 215  #FP_INFINITE 1 ) 216 FP_INFINITE , 217 FP_ZERO = 218  #FP_ZERO 2 ) 219 FP_ZERO , 220 FP_SUBNORMAL = 221  #FP_SUBNORMAL 3 ) 222 FP_SUBNORMAL , 223 FP_NORMAL = 224  #FP_NORMAL 4 ) 225 FP_NORMAL 233 #i `__GNUC_PREREQ (4,4&& ! defed __SUPPORT_SNAN__ \ 234 && ! defed __OPTIMIZE_SIZE__ 235  #assify ( x `__but_assify ( FP_NAN , FP_INFINITE , \ 236 FP_NORMAL , FP_SUBNORMAL , FP_ZERO , x ) ) 237 #i defed __NO_LONG_DOUBLE_MATH 238  #assify ( x ) \ 239 ( ( x = (? `__assifyf (x: `__assify (x)) ) 241  #assify ( x ) \ 242 ( ( x ) ==  () \ 243 ? `__assifyf ( x ) \ 244 :  ( x ) ==  () \ 245 ? `__assify ( x : `__assifyl (x)) ) 249 #i `__GNUC_PREREQ (4,0) 250  #signb ( x ) \ 251 ( ( x ) ==  () \ 252 ? `__but_signbf ( x ) \ 253 :  ( x ) ==  () \ 254 ? `__but_signb ( x : `__but_signbl (x)) ) 256 #ifde __NO_LONG_DOUBLE_MATH 257  #signb ( x ) \ 258 ( ( x = (? `__signbf (x: `__signb (x)) ) 260  #signb ( x ) \ 261 ( ( x ) ==  () \ 262 ? `__signbf ( x ) \ 263 :  ( x ) ==  () \ 264 ? `__signb ( x : `__signbl (x)) ) 269 #i `__GNUC_PREREQ (4,4&& ! defed __SUPPORT_SNAN__ 270  #isfe ( x `__but_isfe (x) ) 271 #i defed __NO_LONG_DOUBLE_MATH 272  #isfe ( x ) \ 273 ( ( x = (? `__fef (x: `__fe (x)) ) 275  #isfe ( x ) \ 276 ( ( x ) ==  () \ 277 ? `__fef ( x ) \ 278 :  ( x ) ==  () \ 279 ? `__fe ( x : `__f (x)) ) 283 #i `__GNUC_PREREQ (4,4&& ! defed __SUPPORT_SNAN__ 284  #im ( x `__but_im (x) ) 286  #im ( x ( `assify (x= FP_NORMAL ) ) 291 #i `__GNUC_PREREQ (4,4&& ! defed __SUPPORT_SNAN__ 292  #i ( x `__but_i (x) ) 293 #i defed __NO_LONG_DOUBLE_MATH 294  #i ( x ) \ 295 ( ( x = (? `__if (x: `__i (x)) ) 297  #i ( x ) \ 298 ( ( x ) ==  () \ 299 ? `__if ( x ) \ 300 :  ( x ) ==  () \ 301 ? `__i ( x : `__il (x)) ) 305 #i `__GNUC_PREREQ (4,4&& ! defed __SUPPORT_SNAN__ 306  #isf ( x `__but_isf_sign (x) ) 307 #i defed __NO_LONG_DOUBLE_MATH 308  #isf ( x ) \ 309 ( ( x = (? `__isff (x: `__isf (x)) ) 311  #isf ( x ) \ 312 ( ( x ) ==  () \ 313 ? `__isff ( x ) \ 314 :  ( x ) ==  () \ 315 ? `__isf ( x : `__is (x)) ) 319  #MATH_ERRNO 1 ) 320  #MATH_ERREXCEPT 2 ) 325 #ide __FAST_MATH__ 326  #mh_rhdlg ( MATH_ERRNO | MATH_ERREXCEPT ) ) 331 #ifde __USE_GNU 333 #ifde __NO_LONG_DOUBLE_MATH 334  #issiglg ( x ) \ 335 ( ( x = (? `__issiglgf (x: `__issiglg (x)) ) 337  #issiglg ( x ) \ 338 ( ( x ) ==  () \ 339 ? `__issiglgf ( x ) \ 340 :  ( x ) ==  () \ 341 ? `__issiglg ( x : `__issiglgl (x)) ) 345 #ifdef __USE_MISC 349 _IEEE_ = -1, 350 _SVID_ , 351 _XOPEN_ , 352 _POSIX_ , 353 _ISOC_ 354 } t_LIB_VERSION_TYPE ; 359 _LIB_VERSION_TYPE _LIB_VERSION ; 363 #ifde __USE_MISC 369 #ifde __lulus 370  __exi 372  exi 375  ty ; 376 * me ; 377  g1 ; 378  g2 ; 379  tv ; 380 } }; 382 #ifde __lulus 383  $mhr ( __exi * __exc `throw (); 385  `mhr ( exi * __exc ); 388  #X_TLOSS 1.41484755040568800000e+16 ) 391  #DOMAIN 1 ) 392  #SING 2 ) 393  #OVERFLOW 3 ) 394  #UNDERFLOW 4 ) 395  #TLOSS 5 ) 396  #PLOSS 6 ) 399  #HUGE 3.40282347e+38F ) 403 #ifde __USE_XOPEN 405  #MAXFLOAT 3.40282347e+38F ) 412 #i defed __USE_MISC || defed __USE_XOPEN 413  #M_E 2.7182818284590452354 ) 414  #M_LOG2E 1.4426950408889634074 ) 415  #M_LOG10E 0.43429448190325182765 ) 416  #M_LN2 0.69314718055994530942 ) 417  #M_LN10 2.30258509299404568402 ) 418  #M_PI 3.14159265358979323846 ) 419  #M_PI_2 1.57079632679489661923 ) 420  #M_PI_4 0.78539816339744830962 ) 421  #M_1_PI 0.31830988618379067154 ) 422  #M_2_PI 0.63661977236758134308 ) 423  #M_2_SQRTPI 1.12837916709551257390 ) 424  #M_SQRT2 1.41421356237309504880 ) 425  #M_SQRT1_2 0.70710678118654752440 ) 431 #ifde __USE_GNU 432  #M_El 2.718281828459045235360287471352662498L ) 433  #M_LOG2El 1.442695040888963407359924681001892137L ) 434  #M_LOG10El 0.434294481903251827651128918916605082L ) 435  #M_LN2l 0.693147180559945309417232121458176568L ) 436  #M_LN10l 2.302585092994045684017991454684364208L ) 437  #M_PIl 3.141592653589793238462643383279502884L ) 438  #M_PI_2l 1.570796326794896619231321691639751442L ) 439  #M_PI_4l 0.785398163397448309615660845819875721L ) 440  #M_1_PIl 0.318309886183790671537767526745028724L ) 441  #M_2_PIl 0.636619772367581343075535053490057448L ) 442  #M_2_SQRTPIl 1.128379167095512573896158903121545172L ) 443  #M_SQRT2l 1.414213562373095048801688724209698079L ) 444  #M_SQRT1_2l 0.707106781186547524400844362104849039L ) 451 #i defed __STRICT_ANSI__ && !defed __NO_MATH_INLINES 452  #__NO_MATH_INLINES 1 ) 455 #i defed __USE_ISOC99 && `__GNUC_PREREQ (2,97) 462  #isg ( x , y `__but_isg (x, y) ) 463  #isgequ ( x , y `__but_isgequ (x, y) ) 464  #iess ( x , y `__but_iess (x, y) ) 465  #iesqu ( x , y `__but_iesqu (x, y) ) 466  #iessg ( x , y `__but_iessg (x, y) ) 467  #isunded ( u , v `__but_isunded (u, v) ) 471 #ifde __USE_EXTERN_INLINES 472  ~ 477 #i defed __FINITE_MATH_ONLY__ && __FINITE_MATH_ONLY__ > 0 478  ~ 481 #ifde __USE_ISOC99 485 #ide isg 486  #isg ( x , y ) \ 487 ( __exnsi__ \ 488 ({ `__tyof__ ( x __x = (x); __tyof__( y __y = (y); \ 489 ! `isunded ( __x , __y && __x > __y; } })) ) 493 #ide isgequ 494  #isgequ ( x , y ) \ 495 ( __exnsi__ \ 496 ({ `__tyof__ ( x __x = (x); __tyof__( y __y = (y); \ 497 ! `isunded ( __x , __y && __x >__y; })) ) 501 #ide iess 502  #iess ( x , y ) \ 503 ( __exnsi__ \ 504 ({ `__tyof__ ( x __x = (x); __tyof__( y __y = (y); \ 505 ! `isunded ( __x , __y && __x < __y; })) ) 509 #ide iesqu 510  #iesqu ( x , y ) \ 511 ( __exnsi__ \ 512 ({ `__tyof__ ( x __x = (x); __tyof__( y __y = (y); \ 513 ! `isunded ( __x , __y && __x <__y; })) ) 517 #ide iessg 518  #iessg ( x , y ) \ 519 ( __exnsi__ \ 520 ({ `__tyof__ ( x __x = (x); __tyof__( y __y = (y); \ 521 ! `isunded ( __x , __y && (__x < __y || __y < __x); })) ) 525 #ide isunded 526  #isunded ( u , v ) \ 527 ( __exnsi__ \ 528 ({ `__tyof__ ( u __u = (u); __tyof__( v __v = (v); \ 529 `assify ( __u = FP_NAN || fpassify ( __v =FP_NAN; })) ) 534 g__END_DECLS @/usr/include/netinet/in.h 18 #idef _NETINET_IN_H 19  #_NETINET_IN_H 1 ) 21  ~ 22  ~ 23  ~ 24  ~ 27 __BEGIN_DECLS 30  ut32_t t_addr_t ; 31  s_addr 33 _addr_t ms_addr ; 37  ~ 42 mIPPROTO_IP = 0, 43  #IPPROTO_IP IPPROTO_IP ) 44 mIPPROTO_ICMP = 1, 45  #IPPROTO_ICMP IPPROTO_ICMP ) 46 mIPPROTO_IGMP = 2, 47  #IPPROTO_IGMP IPPROTO_IGMP ) 48 mIPPROTO_IPIP = 4, 49  #IPPROTO_IPIP IPPROTO_IPIP ) 50 mIPPROTO_TCP = 6, 51  #IPPROTO_TCP IPPROTO_TCP ) 52 mIPPROTO_EGP = 8, 53  #IPPROTO_EGP IPPROTO_EGP ) 54 mIPPROTO_PUP = 12, 55  #IPPROTO_PUP IPPROTO_PUP ) 56 mIPPROTO_UDP = 17, 57  #IPPROTO_UDP IPPROTO_UDP ) 58 mIPPROTO_IDP = 22, 59  #IPPROTO_IDP IPPROTO_IDP ) 60 mIPPROTO_TP = 29, 61  #IPPROTO_TP IPPROTO_TP ) 62 mIPPROTO_DCCP = 33, 63  #IPPROTO_DCCP IPPROTO_DCCP ) 64 mIPPROTO_IPV6 = 41, 65  #IPPROTO_IPV6 IPPROTO_IPV6 ) 66 mIPPROTO_RSVP = 46, 67  #IPPROTO_RSVP IPPROTO_RSVP ) 68 mIPPROTO_GRE = 47, 69  #IPPROTO_GRE IPPROTO_GRE ) 70 mIPPROTO_ESP = 50, 71  #IPPROTO_ESP IPPROTO_ESP ) 72 mIPPROTO_AH = 51, 73  #IPPROTO_AH IPPROTO_AH ) 74 mIPPROTO_MTP = 92, 75  #IPPROTO_MTP IPPROTO_MTP ) 76 mIPPROTO_BEETPH = 94, 77  #IPPROTO_BEETPH IPPROTO_BEETPH ) 78 mIPPROTO_ENCAP = 98, 79  #IPPROTO_ENCAP IPPROTO_ENCAP ) 80 mIPPROTO_PIM = 103, 81  #IPPROTO_PIM IPPROTO_PIM ) 82 mIPPROTO_COMP = 108, 83  #IPPROTO_COMP IPPROTO_COMP ) 84 mIPPROTO_SCTP = 132, 85  #IPPROTO_SCTP IPPROTO_SCTP ) 86 mIPPROTO_UDPLITE = 136, 87  #IPPROTO_UDPLITE IPPROTO_UDPLITE ) 88 mIPPROTO_MPLS = 137, 89  #IPPROTO_MPLS IPPROTO_MPLS ) 90 mIPPROTO_RAW = 255, 91  #IPPROTO_RAW IPPROTO_RAW ) 92 mIPPROTO_MAX 98 #ide __USE_KERNEL_IPV6_DEFS 101 mIPPROTO_HOPOPTS = 0, 102  #IPPROTO_HOPOPTS IPPROTO_HOPOPTS ) 103 mIPPROTO_ROUTING = 43, 104  #IPPROTO_ROUTING IPPROTO_ROUTING ) 105 mIPPROTO_FRAGMENT = 44, 106  #IPPROTO_FRAGMENT IPPROTO_FRAGMENT ) 107 mIPPROTO_ICMPV6 = 58, 108  #IPPROTO_ICMPV6 IPPROTO_ICMPV6 ) 109 mIPPROTO_NONE = 59, 110  #IPPROTO_NONE IPPROTO_NONE ) 111 mIPPROTO_DSTOPTS = 60, 112  #IPPROTO_DSTOPTS IPPROTO_DSTOPTS ) 113 mIPPROTO_MH = 135 114  #IPPROTO_MH IPPROTO_MH ) 119  ut16_t t_pt_t ; 124 mIPPORT_ECHO = 7, 125 mIPPORT_DISCARD = 9, 126 mIPPORT_SYSTAT = 11, 127 mIPPORT_DAYTIME = 13, 128 mIPPORT_NETSTAT = 15, 129 mIPPORT_FTP = 21, 130 mIPPORT_TELNET = 23, 131 mIPPORT_SMTP = 25, 132 mIPPORT_TIMESERVER = 37, 133 mIPPORT_NAMESERVER = 42, 134 mIPPORT_WHOIS = 43, 135 mIPPORT_MTP = 57, 137 mIPPORT_TFTP = 69, 138 mIPPORT_RJE = 77, 139 mIPPORT_FINGER = 79, 140 mIPPORT_TTYLINK = 87, 141 mIPPORT_SUPDUP = 95, 144 mIPPORT_EXECSERVER = 512, 145 mIPPORT_LOGINSERVER = 513, 146 mIPPORT_CMDSERVER = 514, 147 mIPPORT_EFSSERVER = 520, 150 mIPPORT_BIFFUDP = 512, 151 mIPPORT_WHOSERVER = 513, 152 mIPPORT_ROUTESERVER = 520, 155 mIPPORT_RESERVED = 1024, 158 mIPPORT_USERRESERVED = 5000 166  #IN_CLASSA ( a (((( _addr_t ))& 0x80000000=0) ) 167  #IN_CLASSA_NET 0xff000000 ) 168  #IN_CLASSA_NSHIFT 24 ) 169  #IN_CLASSA_HOST (0xfffffff& ~ IN_CLASSA_NET ) ) 170  #IN_CLASSA_MAX 128 ) 172  #IN_CLASSB ( a (((( _addr_t ))& 0xc0000000=0x80000000) ) 173  #IN_CLASSB_NET 0xffff0000 ) 174  #IN_CLASSB_NSHIFT 16 ) 175  #IN_CLASSB_HOST (0xfffffff& ~ IN_CLASSB_NET ) ) 176  #IN_CLASSB_MAX 65536 ) 178  #IN_CLASSC ( a (((( _addr_t ))& 0xe0000000=0xc0000000) ) 179  #IN_CLASSC_NET 0xffffff00 ) 180  #IN_CLASSC_NSHIFT 8 ) 181  #IN_CLASSC_HOST (0xfffffff& ~ IN_CLASSC_NET ) ) 183  #IN_CLASSD ( a (((( _addr_t ))& 0xf0000000=0xe0000000) ) 184  #IN_MULTICAST ( a `IN_CLASSD ) ) 186  #IN_EXPERIMENTAL ( a (((( _addr_t ))& 0xe0000000=0xe0000000) ) 187  #IN_BADCLASS ( a (((( _addr_t ))& 0xf0000000=0xf0000000) ) 190  #INADDR_ANY (( _addr_t 0x00000000) ) 192  #INADDR_BROADCAST (( _addr_t 0xffffffff) ) 194  #INADDR_NONE (( _addr_t 0xffffffff) ) 197  #IN_LOOPBACKNET 127 ) 199 #ide INADDR_LOOPBACK 200  #INADDR_LOOPBACK (( _addr_t 0x7f000001 ) 204  #INADDR_UNSPEC_GROUP (( _addr_t 0xe0000000 ) 205  #INADDR_ALLHOSTS_GROUP (( _addr_t 0xe0000001 ) 206  #INADDR_ALLRTRS_GROUP (( _addr_t 0xe0000002 ) 207  #INADDR_MAX_LOCAL_GROUP (( _addr_t 0xe00000ff ) 209 #ide __USE_KERNEL_IPV6_DEFS 211  s6_addr 215 ut8_t m__u6_addr8 [16]; 216 #ifde __USE_MISC 217 ut16_t m__u6_addr16 [8]; 218 ut32_t m__u6_addr32 [4]; 220 } m__6_u ; 221  #s6_addr __6_u . __u6_addr8 ) 222 #ifde __USE_MISC 223  #s6_addr16 __6_u . __u6_addr16 ) 224  #s6_addr32 __6_u . __u6_addr32 ) 229 cڡ  6_addr 6addr_y ; 230 cڡ  6_addr 6addr_loback ; 231  #IN6ADDR_ANY_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } } ) 232  #IN6ADDR_LOOPBACK_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } } ) 234  #INET_ADDRSTRLEN 16 ) 235  #INET6_ADDRSTRLEN 46 ) 239  ssockaddr_ 241 __SOCKADDR_COMMON ( s_ ); 242 _pt_t ms_pt ; 243  _addr ms_addr ; 246  ms_zo [ ( sockaddr ) - 247 __SOCKADDR_COMMON_SIZE - 248  ( _pt_t ) - 249  ( _addr )]; 252 #ide __USE_KERNEL_IPV6_DEFS 254  ssockaddr_6 256 __SOCKADDR_COMMON ( s6_ ); 257 _pt_t ms6_pt ; 258 ut32_t ms6_owfo ; 259  6_addr ms6_addr ; 260 ut32_t ms6_sce_id ; 264 #ifde __USE_MISC 266  s_mq 269  _addr mimr_muɟddr ; 272  _addr mimr_r ; 275  s_mq_sour 278  _addr mimr_muɟddr ; 281  _addr mimr_r ; 284  _addr mimr_souraddr ; 288 #ide __USE_KERNEL_IPV6_DEFS 290  sv6_mq 293  6_addr mv6mr_muɟddr ; 296  mv6mr_r ; 300 #ifde __USE_MISC 302  sgroup_q 305 ut32_t mgr_r ; 308  sockaddr_age mgr_group ; 311  sgroup_sour_q 314 ut32_t mg_r ; 317  sockaddr_age mg_group ; 320  sockaddr_age mg_sour ; 325  s_msfr 328  _addr mimsf_muɟddr ; 331  _addr mimsf_r ; 334 ut32_t mimsf_fmode ; 337 ut32_t mimsf_numc ; 339  _addr mimsf_i [1]; 342  #IP_MSFILTER_SIZE ( numc ( ( _msfr ) \ 343 -  ( _addr ) \ 344 + ( numc *  ( _addr )) ) 346  sgroup_fr 349 ut32_t mgf_r ; 352  sockaddr_age mgf_group ; 355 ut32_t mgf_fmode ; 358 ut32_t mgf_numc ; 360  sockaddr_age mgf_i [1]; 363  #GROUP_FILTER_SIZE ( numc ( ( group_fr ) \ 364 -  ( sockaddr_age ) \ 365 + (( numc ) \ 366 *  ( sockaddr_age ))) ) 376 ut32_t $ohl ( ut32_t __Îg __THROW `__ibu__ (( __cڡ__ )); 377 ut16_t $ohs ( ut16_t __tsht ) 378 __THROW `__ibu__ (( __cڡ__ )); 379 ut32_t $htl ( ut32_t __holg ) 380 __THROW `__ibu__ (( __cڡ__ )); 381 ut16_t $hts ( ut16_t __hosht ) 382 __THROW `__ibu__ (( __cڡ__ )); 384  ~ 387  ~ 389 #ifde __OPTIMIZE__ 393 #i __BYTE_ORDER = __BIG_ENDIAN 396  #ohl ( x (x) ) 397  #ohs ( x (x) ) 398  #htl ( x (x) ) 399  #hts ( x (x) ) 401 #i __BYTE_ORDER = __LITTLE_ENDIAN 402  #ohl ( x `__bsw_32 (x) ) 403  #ohs ( x `__bsw_16 (x) ) 404  #htl ( x `__bsw_32 (x) ) 405  #hts ( x `__bsw_16 (x) ) 410 #ifde __GNUC__ 411  #IN6_IS_ADDR_UNSPECIFIED ( a ) \ 412 ( __exnsi__ \ 413 ({ cڡ  6_addr * __a = (cڡ 6_add*( a ); \ 414 __a -> s6_addr32 [0] == 0 \ 415 && __a -> s6_addr32 [1] == 0 \ 416 && __a -> s6_addr32 [2] == 0 \ 417 && __a -> s6_addr32 [3] =0; } })) ) 419  #IN6_IS_ADDR_LOOPBACK ( a ) \ 420 ( __exnsi__ \ 421 ({ cڡ  6_addr * __a = (cڡ 6_add*( a ); \ 422 __a -> s6_addr32 [0] == 0 \ 423 && __a -> s6_addr32 [1] == 0 \ 424 && __a -> s6_addr32 [2] == 0 \ 425 && __a -> s6_addr32 [3] = `htl (1); })) ) 427  #IN6_IS_ADDR_LINKLOCAL ( a ) \ 428 ( __exnsi__ \ 429 ({ cڡ  6_addr * __a = (cڡ 6_add*( a ); \ 430 ( __a -> s6_addr32 [0] & `htl (0xffc00000)=ht(0x800000); })) ) 432  #IN6_IS_ADDR_SITELOCAL ( a ) \ 433 ( __exnsi__ \ 434 ({ cڡ  6_addr * __a = (cڡ 6_add*( a ); \ 435 ( __a -> s6_addr32 [0] & `htl (0xffc00000)=ht(0xc00000); })) ) 437  #IN6_IS_ADDR_V4MAPPED ( a ) \ 438 ( __exnsi__ \ 439 ({ cڡ  6_addr * __a = (cڡ 6_add*( a ); \ 440 __a -> s6_addr32 [0] == 0 \ 441 && __a -> s6_addr32 [1] == 0 \ 442 && __a -> s6_addr32 [2] = `htl (0xffff); })) ) 444  #IN6_IS_ADDR_V4COMPAT ( a ) \ 445 ( __exnsi__ \ 446 ({ cڡ  6_addr * __a = (cڡ 6_add*( a ); \ 447 __a -> s6_addr32 [0] == 0 \ 448 && __a -> s6_addr32 [1] == 0 \ 449 && __a -> s6_addr32 [2] == 0 \ 450 && `ohl ( __a -> s6_addr32 [3]> 1; })) ) 452  #IN6_ARE_ADDR_EQUAL ( a , b ) \ 453 ( __exnsi__ \ 454 ({ cڡ  6_addr * __a = (cڡ 6_add*( a ); \ 455 cڡ  6_addr * __b = (cڡ 6_add*( b ); \ 456 __a -> s6_addr32 [0] = __b ->s6_addr32[0] \ 457 && __a -> s6_addr32 [1] = __b ->s6_addr32[1] \ 458 && __a -> s6_addr32 [2] = __b ->s6_addr32[2] \ 459 && __a -> s6_addr32 [3] = __b ->s6_addr32[3]; })) ) 461  #IN6_IS_ADDR_UNSPECIFIED ( a ) \ 462 (((cڡ ut32_t *( a ))[0] == 0 \ 463 && ((cڡ ut32_t *( a ))[1] == 0 \ 464 && ((cڡ ut32_t *( a ))[2] == 0 \ 465 && ((cڡ ut32_t *( a ))[3] =0) ) 467  #IN6_IS_ADDR_LOOPBACK ( a ) \ 468 (((cڡ ut32_t *( a ))[0] == 0 \ 469 && ((cڡ ut32_t *( a ))[1] == 0 \ 470 && ((cڡ ut32_t *( a ))[2] == 0 \ 471 && ((cڡ ut32_t *( a ))[3] = `htl (1)) ) 473  #IN6_IS_ADDR_LINKLOCAL ( a ) \ 474 ((((cڡ ut32_t *( a ))[0] & `htl (0xffc00000)) \ 475 = `htl (0x800000)) ) 477  #IN6_IS_ADDR_SITELOCAL ( a ) \ 478 ((((cڡ ut32_t *( a ))[0] & `htl (0xffc00000)) \ 479 = `htl (0xc00000)) ) 481  #IN6_IS_ADDR_V4MAPPED ( a ) \ 482 ((((cڡ ut32_t *( a ))[0] == 0) \ 483 && (((cڡ ut32_t *( a ))[1] == 0) \ 484 && (((cڡ ut32_t *( a ))[2] = `htl (0xffff))) ) 486  #IN6_IS_ADDR_V4COMPAT ( a ) \ 487 ((((cڡ ut32_t *( a ))[0] == 0) \ 488 && (((cڡ ut32_t *( a ))[1] == 0) \ 489 && (((cڡ ut32_t *( a ))[2] == 0) \ 490 && ( `ohl (((cڡ ut32_t *( a ))[3]> 1)) ) 492  #IN6_ARE_ADDR_EQUAL ( a , b ) \ 493 ((((cڡ ut32_t *( a ))[0] =((cڡ ut32_*( b ))[0]) \ 494 && (((cڡ ut32_t *( a ))[1] =((cڡ ut32_*( b ))[1]) \ 495 && (((cڡ ut32_t *( a ))[2] =((cڡ ut32_*( b ))[2]) \ 496 && (((cڡ ut32_t *( a ))[3] =((cڡ ut32_*( b ))[3])) ) 499  #IN6_IS_ADDR_MULTICAST ( a (((cڡ ut8_t *))[0] =0xff) ) 501 #ifde __USE_MISC 503  $bdsvpt ( __sockfd ,  sockaddr_ * __sock_ __THROW ; 506  $bdsvpt6 ( __sockfd ,  sockaddr_6 * __sock_ ) 507 __THROW ; 511  #IN6_IS_ADDR_MC_NODELOCAL ( a ) \ 512 ( `IN6_IS_ADDR_MULTICAST ( a ) \ 513 && ((((cڡ ut8_t *( a ))[1] & 0xf=0x1)) ) 515  #IN6_IS_ADDR_MC_LINKLOCAL ( a ) \ 516 ( `IN6_IS_ADDR_MULTICAST ( a ) \ 517 && ((((cڡ ut8_t *( a ))[1] & 0xf=0x2)) ) 519  #IN6_IS_ADDR_MC_SITELOCAL ( a ) \ 520 ( `IN6_IS_ADDR_MULTICAST ( a ) \ 521 && ((((cڡ ut8_t *( a ))[1] & 0xf=0x5)) ) 523  #IN6_IS_ADDR_MC_ORGLOCAL ( a ) \ 524 ( `IN6_IS_ADDR_MULTICAST ( a ) \ 525 && ((((cڡ ut8_t *( a ))[1] & 0xf=0x8)) ) 527  #IN6_IS_ADDR_MC_GLOBAL ( a ) \ 528 ( `IN6_IS_ADDR_MULTICAST ( a ) \ 529 && ((((cڡ ut8_t *( a ))[1] & 0xf=0xe)) ) 532 #ifde __USE_GNU 533  cmsghdr ; 535 #ide __USE_KERNEL_IPV6_DEFS 537  s6_pktfo 539  6_addr i6_addr ; 540  i6_ifdex ; 544  s6_mtufo 546  sockaddr_6 6m_addr ; 547 ut32_t 6m_mtu ; 552  $6_ti_a ( __nbys ) 553 __THROW __ibu_dd__ ; 554  $6_ti_ (* __bp ,  cmsghdr ** __cmsgp , 555  __ty __THROW __ibu_dd__ ; 556  $6_ti_nd ( cmsghdr * __cmsg , 557 cڡ ut8_t * __typ ,  __mux , 558  __usy __THROW __ibu_dd__ ; 559 ut8_t * $6_ti_loc ( cmsghdr * __cmsg ,  __d , 560  __mux ,  __usy ) 561 __THROW __ibu_dd__ ; 562  $6_ti_xt (cڡ  cmsghdr * __cmsg , 563 ut8_t ** __p ) 564 __THROW __ibu_dd__ ; 565  $6_ti_fd (cڡ  cmsghdr * __cmsg , 566 ut8_t ** __p ,  __ty ) 567 __THROW __ibu_dd__ ; 571  $6_t_ (* __extbuf , sockn_t __ex __THROW ; 572  $6_t_nd (* __extbuf , sockn_t __ex ,  __offt , 573 ut8_t __ty , sockn_t __n , ut8_ __ign , 574 ** __dabu __THROW ; 575  $6_t_fish (* __extbuf , sockn_t __ex ,  __offt ) 576 __THROW ; 577  $6_t_t_v (* __dabuf ,  __offt , * __v , 578 sockn_t __vn __THROW ; 579  $6_t_xt (* __extbuf , sockn_t __ex ,  __offt , 580 ut8_t * __typ , sockn_t * __ , 581 ** __dabu __THROW ; 582  $6_t_fd (* __extbuf , sockn_t __ex ,  __offt , 583 ut8_t __ty , sockn_t * __ , 584 ** __dabu __THROW ; 585  $6_t_g_v (* __dabuf ,  __offt , * __v , 586 sockn_t __vn __THROW ; 590 sockn_t $6_h_a ( __ty ,  __gmts __THROW ; 591 * $6_h_ (* __bp , sockn_t __bp_n ,  __ty , 592  __gmts __THROW ; 593  $6_h_add (* __bp , cڡ  6_addr * __addr __THROW ; 594  $6_h_v (cڡ * __ , * __out __THROW ; 595  $6_h_gmts (cڡ * __bp __THROW ; 596  6_addr * $6_h_gaddr (cڡ * __bp ,  __dex ) 597 __THROW ; 603  $gv4sourfr ( __s ,  _addr __r_addr , 604  _addr __group , ut32_t * __fmode , 605 ut32_t * __numc ,  _addr * __i ) 606 __THROW ; 609  $tv4sourfr ( __s ,  _addr __r_addr , 610  _addr __group , ut32_t __fmode , 611 ut32_t __numc , 612 cڡ  _addr * __i ) 613 __THROW ; 617  $gsourfr ( __s , ut32_t __r_addr , 618 cڡ  sockaddr * __group , 619 sockn_t __grou , ut32_t * __fmode , 620 ut32_t * __numc , 621  sockaddr_age * __i __THROW ; 624  $tsourfr ( __s , ut32_t __r_addr , 625 cڡ  sockaddr * __group , 626 sockn_t __grou , ut32_t __fmode , 627 ut32_t __numc , 628 cڡ  sockaddr_age * __i __THROW ; 631 __END_DECLS @/usr/include/setjmp.h 22 #idef _SETJMP_H 23  #_SETJMP_H 1 ) 25  ~ 27 g__BEGIN_DECLS 29  ~ 30  ~ 34  s__jmp_buf_g 40 __jmp_buf m__jmpbuf ; 41  m__mask_was_ved ; 42 __sigt_t m__ved_mask ; 46 __BEGIN_NAMESPACE_STD 48  __jmp_buf_g tjmp_buf [1]; 52  $tjmp ( jmp_buf __v __THROWNL ; 54 __END_NAMESPACE_STD 59  $__sigtjmp ( __jmp_buf_g __v [1],  __vemask __THROWNL ; 63  $_tjmp ( __jmp_buf_g __v [1] __THROWNL ; 67  #tjmp ( v `_tjmp (v) ) 70 __BEGIN_NAMESPACE_STD 74  $lgjmp ( __jmp_buf_g __v [1],  __v ) 75 __THROWNL `__ibu__ (( __nܑu__ )); 77 __END_NAMESPACE_STD 79 #i defed __USE_MISC || defed __USE_XOPEN 83  $_lgjmp ( __jmp_buf_g __v [1],  __v ) 84 __THROWNL `__ibu__ (( __nܑu__ )); 88 #ifdef __USE_POSIX 92  __jmp_buf_g tsigjmp_buf [1]; 96  #sigtjmp ( v , vemask `__sigtjmp (v, savemask) ) 102  $siglgjmp ( sigjmp_buf __v ,  __v ) 103 __THROWNL `__ibu__ (( __nܑu__ )); 108 #i __USE_FORTIFY_LEVEL > 0 109  ~ 112 __END_DECLS @/usr/include/signal.h 22 #idef _SIGNAL_H 24 #i! defed __ed_sig_omic_t && !defed __ed_sigt_t 25  #_SIGNAL_H ) 28  ~ 30 g__BEGIN_DECLS 32  ~ 36 #i defed __ed_sig_omic_t || defed _SIGNAL_H 37 #ide __sig_omic_t_defed 38  #__sig_omic_t_defed ) 39 __BEGIN_NAMESPACE_STD 40  __sig_omic_t tsig_omic_t ; 41 g__END_NAMESPACE_STD 43 #unde __ed_sig_omic_t 46 #i defed __ed_sigt_t || (defed _SIGNAL_H && defed __USE_POSIX ) 47 #ide __sigt_t_defed 48  #__sigt_t_defed ) 49  __sigt_t tsigt_t ; 51 #unde __ed_sigt_t 54 #ifde _SIGNAL_H 56  ~ 57  ~ 59 #i defed __USE_XOPEN || defed __USE_XOPEN2K 60 #ide __pid_t_defed 61  __pid_t tpid_t ; 62  #__pid_t_defed ) 64 #ifde __USE_XOPEN 66 #ide __uid_t_defed 67  __uid_t tuid_t ; 68  #__uid_t_defed ) 72 #ifde __USE_POSIX199309 74  #__ed_timeec ) 75  ~ 78 #i defed __USE_POSIX199309 || defed __USE_XOPEN_EXTENDED 80  ~ 85 (* t__sighdr_t ) (); 90 __sighdr_t $__sysv_sigl ( __sig , __sighdr_t __hdr ) 91 __THROW ; 92 #ifde __USE_GNU 93 __sighdr_t $sysv_sigl ( __sig , __sighdr_t __hdr ) 94 __THROW ; 100 __BEGIN_NAMESPACE_STD 101 #ifde __USE_MISC 102 __sighdr_t $sigl ( __sig , __sighdr_t __hdr ) 103 __THROW ; 106 #ifde __REDIRECT_NTH 107 __sighdr_t `__REDIRECT_NTH ( sigl , 108 ( __sig , __sighdr_t __hdr ), 109 __sysv_sigl ); 111  #sigl __sysv_sigl ) 114 __END_NAMESPACE_STD 116 #ifde __USE_XOPEN 119 __sighdr_t $bsd_sigl ( __sig , __sighdr_t __hdr ) 120 __THROW ; 126 #ifde __USE_POSIX 127  $kl ( __pid_t __pid ,  __sig __THROW ; 130 #i defed __USE_MISC || defed __USE_XOPEN_EXTENDED 134  $kg ( __pid_t __pg ,  __sig __THROW ; 137 __BEGIN_NAMESPACE_STD 139  $i ( __sig __THROW ; 140 __END_NAMESPACE_STD 142 #ifde __USE_MISC 144 __sighdr_t $ssigl ( __sig , __sighdr_t __hdr ) 145 __THROW ; 146  $gsigl ( __sig __THROW ; 149 #ifde __USE_XOPEN2K8 151  `psigl ( __sig , cڡ * __s ); 154  `psigfo (cڡ sigfo_t * __pfo , cڡ * __s ); 166 #ifde __USE_XOPEN 167 #ifde __GNUC__ 168  $sigu ( __sig `__asm__ ("__xpg_sigpause"); 170  `__sigu ( __sig__mask ,  __is_sig ); 172  #sigu ( sig `__sigu ((sig), 1) ) 177 #ifde __USE_MISC 184  #sigmask ( sig `__sigmask (sig) ) 187  $sigblock ( __mask __THROW __ibu_dd__ ; 190  $sigtmask ( __mask __THROW __ibu_dd__ ; 193  $siggmask ( __THROW __ibu_dd__ ; 197 #ifde __USE_MISC 198  #NSIG _NSIG ) 201 #ifde __USE_GNU 202  __sighdr_t tsighdr_t ; 206 #ifde __USE_MISC 207  __sighdr_t tsig_t ; 210 #ifde __USE_POSIX 213  $sigemyt ( sigt_t * __t __THROW `__nnu ((1)); 216  $sigflt ( sigt_t * __t __THROW `__nnu ((1)); 219  $sigaddt ( sigt_t * __t ,  __signo __THROW `__nnu ((1)); 222  $sigdt ( sigt_t * __t ,  __signo __THROW `__nnu ((1)); 225  $sigismemb (cڡ sigt_t * __t ,  __signo ) 226 __THROW `__nnu ((1)); 228 #ifde __USE_GNU 230  $sigimyt (cڡ sigt_t * __t __THROW `__nnu ((1)); 233  $sigdt ( sigt_t * __t , cڡ sigt_* __ , 234 cڡ sigt_t * __right __THROW `__nnu ((1, 2, 3)); 237  $sigܣt ( sigt_t * __t , cڡ sigt_* __ , 238 cڡ sigt_t * __right __THROW `__nnu ((1, 2, 3)); 243  ~ 246  $sigocmask ( __how , cڡ sigt_t * __ri __t , 247 sigt_t * __ri __ot __THROW ; 254  $sigsud (cڡ sigt_t * __t `__nnu ((1)); 257  $sigai ( __sig , cڡ  sigai * __ri __a , 258  sigai * __ri __ __THROW ; 261  $signdg ( sigt_t * __t __THROW `__nnu ((1)); 268  $sigwa (cڡ sigt_t * __ri __t , *__ri __sig ) 269 `__nnu ((1, 2)); 271 #ifde __USE_POSIX199309 276  $sigwafo (cڡ sigt_t * __ri __t , 277 sigfo_t * __ri __fo `__nnu ((1)); 284  $sigtimedwa (cڡ sigt_t * __ri __t , 285 sigfo_t * __ri __fo , 286 cڡ  timeec * __ri __timeout ) 287 `__nnu ((1)); 291  $sigqueue ( __pid_t __pid ,  __sig , cڡ  sigv __v ) 292 __THROW ; 297 #ifde __USE_MISC 301 cڡ *cڡ _sys_sigli [ _NSIG ]; 302 cڡ *cڡ sys_sigli [ _NSIG ]; 306  ~ 309  $sigtu ( sigcڋxt * __s __THROW ; 314 #i defed __USE_XOPEN_EXTENDED || defed __USE_XOPEN2K8 315  #__ed_size_t ) 316  ~ 321  $sigu ( __sig ,  __u __THROW ; 323  ~ 324 #i defed __USE_XOPEN || defed __USE_XOPEN2K8 326  ~ 332  $sigack ( sigack * __ss , sigack * __oss ) 333 __THROW __ibu_dd__ ; 337  $sigtack (cڡ  sigtack * __ri __ss , 338  sigtack * __ri __oss __THROW ; 342 #ifde __USE_XOPEN_EXTENDED 346  $sighd ( __sig __THROW ; 349  $sigl ( __sig __THROW ; 352  $sigigne ( __sig __THROW ; 355 __sighdr_t $sigt ( __sig , __sighdr_t __di __THROW ; 358 #i defed __USE_POSIX199506 || defed __USE_UNIX98 361  ~ 362  ~ 369  $__libc_cut_sigm ( __THROW ; 371  $__libc_cut_sigmax ( __THROW ; 375 __END_DECLS @/usr/include/stdint.h 22 #ide _STDINT_H 23  #_STDINT_H 1 ) 25  ~ 26  ~ 27  ~ 34 #ide __t8_t_defed 35  #__t8_t_defed ) 36 sigd  tt8_t ; 37  tt16_t ; 38  tt32_t ; 39 #i __WORDSIZE == 64 40  tt64_t ; 42 __exnsi__ 43  tt64_t ; 48  tut8_t ; 49  tut16_t ; 50 #ide __ut32_t_defed 51  tut32_t ; 52  #__ut32_t_defed ) 54 #i __WORDSIZE == 64 55  tut64_t ; 57 __exnsi__ 58  tut64_t ; 65 sigd  tt_a8_t ; 66  tt_a16_t ; 67  tt_a32_t ; 68 #i __WORDSIZE == 64 69  tt_a64_t ; 71 __exnsi__ 72  tt_a64_t ; 76  tut_a8_t ; 77  tut_a16_t ; 78  tut_a32_t ; 79 #i __WORDSIZE == 64 80  tut_a64_t ; 82 __exnsi__ 83  tut_a64_t ; 90 sigd  tt_8_t ; 91 #i __WORDSIZE == 64 92  tt_16_t ; 93  tt_32_t ; 94  tt_64_t ; 96  tt_16_t ; 97  tt_32_t ; 98 __exnsi__ 99  tt_64_t ; 103  tut_8_t ; 104 #i __WORDSIZE == 64 105  tut_16_t ; 106  tut_32_t ; 107  tut_64_t ; 109  tut_16_t ; 110  tut_32_t ; 111 __exnsi__ 112  tut_64_t ; 117 #i __WORDSIZE == 64 118 #ide ___t_defed 119  t_t ; 120  #___t_defed ) 122  tu_t ; 124 #ide ___t_defed 125  t_t ; 126  #___t_defed ) 128  tu_t ; 133 #i __WORDSIZE == 64 134  ttmax_t ; 135  tutmax_t ; 137 __exnsi__ 138  ttmax_t ; 139 __exnsi__ 140  tutmax_t ; 144 #i __WORDSIZE == 64 145  #__INT64_C ( c ## L ) 146  #__UINT64_C ( c ## UL ) 148  #__INT64_C ( c ## LL ) 149  #__UINT64_C ( c ## ULL ) 155  #INT8_MIN (-128) ) 156  #INT16_MIN (-32767-1) ) 157  #INT32_MIN (-2147483647-1) ) 158  #INT64_MIN (- `__INT64_C (9223372036854775807)-1) ) 160  #INT8_MAX (127) ) 161  #INT16_MAX (32767) ) 162  #INT32_MAX (2147483647) ) 163  #INT64_MAX ( `__INT64_C (9223372036854775807)) ) 166  #UINT8_MAX (255) ) 167  #UINT16_MAX (65535) ) 168  #UINT32_MAX (4294967295U) ) 169  #UINT64_MAX ( `__UINT64_C (18446744073709551615)) ) 173  #INT_LEAST8_MIN (-128) ) 174  #INT_LEAST16_MIN (-32767-1) ) 175  #INT_LEAST32_MIN (-2147483647-1) ) 176  #INT_LEAST64_MIN (- `__INT64_C (9223372036854775807)-1) ) 178  #INT_LEAST8_MAX (127) ) 179  #INT_LEAST16_MAX (32767) ) 180  #INT_LEAST32_MAX (2147483647) ) 181  #INT_LEAST64_MAX ( `__INT64_C (9223372036854775807)) ) 184  #UINT_LEAST8_MAX (255) ) 185  #UINT_LEAST16_MAX (65535) ) 186  #UINT_LEAST32_MAX (4294967295U) ) 187  #UINT_LEAST64_MAX ( `__UINT64_C (18446744073709551615)) ) 191  #INT_FAST8_MIN (-128) ) 192 #i __WORDSIZE == 64 193  #INT_FAST16_MIN (-9223372036854775807L-1) ) 194  #INT_FAST32_MIN (-9223372036854775807L-1) ) 196  #INT_FAST16_MIN (-2147483647-1) ) 197  #INT_FAST32_MIN (-2147483647-1) ) 199  #INT_FAST64_MIN (- `__INT64_C (9223372036854775807)-1) ) 201  #INT_FAST8_MAX (127) ) 202 #i __WORDSIZE == 64 203  #INT_FAST16_MAX (9223372036854775807L) ) 204  #INT_FAST32_MAX (9223372036854775807L) ) 206  #INT_FAST16_MAX (2147483647) ) 207  #INT_FAST32_MAX (2147483647) ) 209  #INT_FAST64_MAX ( `__INT64_C (9223372036854775807)) ) 212  #UINT_FAST8_MAX (255) ) 213 #i __WORDSIZE == 64 214  #UINT_FAST16_MAX (18446744073709551615UL) ) 215  #UINT_FAST32_MAX (18446744073709551615UL) ) 217  #UINT_FAST16_MAX (4294967295U) ) 218  #UINT_FAST32_MAX (4294967295U) ) 220  #UINT_FAST64_MAX ( `__UINT64_C (18446744073709551615)) ) 224 #i __WORDSIZE == 64 225  #INTPTR_MIN (-9223372036854775807L-1) ) 226  #INTPTR_MAX (9223372036854775807L) ) 227  #UINTPTR_MAX (18446744073709551615UL) ) 229  #INTPTR_MIN (-2147483647-1) ) 230  #INTPTR_MAX (2147483647) ) 231  #UINTPTR_MAX (4294967295U) ) 236  #INTMAX_MIN (- `__INT64_C (9223372036854775807)-1) ) 238  #INTMAX_MAX ( `__INT64_C (9223372036854775807)) ) 241  #UINTMAX_MAX ( `__UINT64_C (18446744073709551615)) ) 247 #i __WORDSIZE == 64 248  #PTRDIFF_MIN (-9223372036854775807L-1) ) 249  #PTRDIFF_MAX (9223372036854775807L) ) 251  #PTRDIFF_MIN (-2147483647-1) ) 252  #PTRDIFF_MAX (2147483647) ) 256  #SIG_ATOMIC_MIN (-2147483647-1) ) 257  #SIG_ATOMIC_MAX (2147483647) ) 260 #i __WORDSIZE == 64 261  #SIZE_MAX (18446744073709551615UL) ) 263 #ifde __WORDSIZE32_SIZE_ULONG 264  #SIZE_MAX (4294967295UL) ) 266  #SIZE_MAX (4294967295U) ) 271 #ide WCHAR_MIN 273  #WCHAR_MIN __WCHAR_MIN ) 274  #WCHAR_MAX __WCHAR_MAX ) 278  #WINT_MIN (0u) ) 279  #WINT_MAX (4294967295u) ) 282  #INT8_C ( c ) c 283  #INT16_C ( c ) c 284  #INT32_C ( c ) c 285 #i __WORDSIZE == 64 286  #INT64_C ( c ## L ) 288  #INT64_C ( c ## LL ) 292  #UINT8_C ( c ) c 293  #UINT16_C ( c ) c 294  #UINT32_C ( c ## U ) 295 #i __WORDSIZE == 64 296  #UINT64_C ( c ## UL ) 298  #UINT64_C ( c ## ULL ) 302 #i __WORDSIZE == 64 303  #INTMAX_C ( c ## L ) 304  #UINTMAX_C ( c ## UL ) 306  #INTMAX_C ( c ## LL ) 307  #UINTMAX_C ( c ## ULL ) @/usr/include/stdio.h 23 #ide _STDIO_H 25 #i! defed __ed_FILE && !defed __ed___FILE 26  #_STDIO_H 1 ) 27  ~ 29 g__BEGIN_DECLS 31  #__ed_size_t ) 32  #__ed_NULL ) 33  ~ 35  ~ 36  #__ed_FILE ) 37  #__ed___FILE ) 41 #i! defed __FILE_defed && defed __ed_FILE 44  g_IO_FILE ; 46 __BEGIN_NAMESPACE_STD 48  _IO_FILE tFILE ; 49 g__END_NAMESPACE_STD 50 #i defed __USE_LARGEFILE64 || defed __USE_POSIX \ 51 || defed g__USE_ISOC99 || defed g__USE_XOPEN \ 52 || defed __USE_POSIX2 53 $__USING_NAMESPACE_STD ( FILE ) 56  #__FILE_defed 1 ) 58 #unde __ed_FILE 61 #i! defed ____FILE_defed && defed __ed___FILE 64  _IO_FILE t__FILE ; 66  #____FILE_defed 1 ) 68 #unde __ed___FILE 71 #ifdef _STDIO_H 72  #_STDIO_USES_IOSTREAM ) 74  ~ 76 #i defed __USE_XOPEN || defed __USE_XOPEN2K8 77 #ifde __GNUC__ 78 #ide _VA_LIST_DEFINED 79  _G_va_li tva_li ; 80  #_VA_LIST_DEFINED ) 83  ~ 87 #ifde __USE_XOPEN2K8 88 #ide __off_t_defed 89 #ide __USE_FILE_OFFSET64 90  __off_t toff_t ; 92  __off64_t toff_t ; 94  #__off_t_defed ) 96 #i defed __USE_LARGEFILE64 && !defed __off64_t_defed 97  __off64_t toff64_t ; 98  #__off64_t_defed ) 101 #ide __ssize_t_defed 102  __ssize_t tssize_t ; 103  #__ssize_t_defed ) 108 __BEGIN_NAMESPACE_STD 109 #ide __USE_FILE_OFFSET64 110  _G_os_t tos_t ; 112  _G_os64_t tos_t ; 114 __END_NAMESPACE_STD 115 #ifde __USE_LARGEFILE64 116  _G_os64_t tos64_t ; 120  #_IOFBF 0 ) 121  #_IOLBF 1 ) 122  #_IONBF 2 ) 126 #ide BUFSIZ 127  #BUFSIZ _IO_BUFSIZ ) 133 #ide EOF 134  #EOF (-1) ) 140  #SEEK_SET 0 ) 141  #SEEK_CUR 1 ) 142  #SEEK_END 2 ) 143 #ifde __USE_GNU 144  #SEEK_DATA 3 ) 145  #SEEK_HOLE 4 ) 149 #i defed __USE_MISC || defed __USE_XOPEN 151  #P_tmpd "/tmp" ) 164  ~ 168  _IO_FILE * d ; 169  _IO_FILE * dout ; 170  _IO_FILE * dr ; 172  #d d ) 173  #dout dout ) 174  #dr dr ) 176 __BEGIN_NAMESPACE_STD 178  $move (cڡ * __fame __THROW ; 180  $me (cڡ * __d , cڡ * __w __THROW ; 181 __END_NAMESPACE_STD 183 #ifde __USE_ATFILE 185  $mt ( __dfd , cڡ * __d ,  __wfd , 186 cڡ * __w __THROW ; 189 __BEGIN_NAMESPACE_STD 194 #ide __USE_FILE_OFFSET64 195 FILE * $tmpfe ( __wur ; 197 #ifde __REDIRECT 198 FILE * `__REDIRECT ( tmpfe , (), tmpfe64 __wur ; 200  #tmpfe tmpfe64 ) 204 #ifde __USE_LARGEFILE64 205 FILE * $tmpfe64 ( __wur ; 209 * $tmam (* __s __THROW __wur ; 210 __END_NAMESPACE_STD 212 #ifde __USE_MISC 215 * $tmam_r (* __s __THROW __wur ; 219 #i defed __USE_MISC || defed __USE_XOPEN 227 * $mam (cڡ * __d , cڡ * __pfx ) 228 __THROW __ibu_mloc__ __wur ; 232 __BEGIN_NAMESPACE_STD 237  `fo ( FILE * __am ); 242  `fush ( FILE * __am ); 243 __END_NAMESPACE_STD 245 #ifde __USE_MISC 252  `fush_uocked ( FILE * __am ); 255 #ifde __USE_GNU 262  `fol (); 266 __BEGIN_NAMESPACE_STD 267 #ide __USE_FILE_OFFSET64 272 FILE * $fݒ (cڡ * __ri __fame , 273 cڡ * __ri __modes __wur ; 278 FILE * $eݒ (cڡ * __ri __fame , 279 cڡ * __ri __modes , 280 FILE * __ri __am __wur ; 282 #ifde __REDIRECT 283 FILE * `__REDIRECT ( fݒ , (cڡ * __ri __fame , 284 cڡ * __ri __modes ), fݒ64 ) 285 __wur ; 286 FILE * `__REDIRECT ( eݒ , (cڡ * __ri __fame , 287 cڡ * __ri __modes , 288 FILE * __ri __am ), eݒ64 ) 289 __wur ; 291  #fݒ fݒ64 ) 292  #eݒ eݒ64 ) 295 __END_NAMESPACE_STD 296 #ifde __USE_LARGEFILE64 297 FILE * $fݒ64 (cڡ * __ri __fame , 298 cڡ * __ri __modes __wur ; 299 FILE * $eݒ64 (cڡ * __ri __fame , 300 cڡ * __ri __modes , 301 FILE * __ri __am __wur ; 304 #ifdef __USE_POSIX 306 FILE * $fdݒ ( __fd , cڡ * __modes __THROW __wur ; 309 #ifdef __USE_GNU 312 FILE * $fݒcook (* __ri __magic_cook , 313 cڡ * __ri __modes , 314 _IO_cook_io_funis_t __io_funcs __THROW __wur ; 317 #ifde __USE_XOPEN2K8 319 FILE * $fmemݒ (* __s , size_t __n , cڡ * __modes ) 320 __THROW __wur ; 325 FILE * $ݒ_memam (** __buoc , size_t * __sizoc __THROW __wur ; 329 __BEGIN_NAMESPACE_STD 332  $tbuf ( FILE * __ri __am , *__ri __buf __THROW ; 336  $tvbuf ( FILE * __ri __am , *__ri __buf , 337  __modes , size_t __n __THROW ; 338 __END_NAMESPACE_STD 340 #ifdef __USE_MISC 343  $tbufr ( FILE * __ri __am , *__ri __buf , 344 size_t __size __THROW ; 347  $ebuf ( FILE * __am __THROW ; 351 __BEGIN_NAMESPACE_STD 356  `rtf ( FILE * __ri __am , 357 cڡ * __ri __fm , ...); 362  `tf (cڡ * __ri __fm , ...); 364  $rtf (* __ri __s , 365 cڡ * __ri __fm , ... __THROWNL ; 371  `vrtf ( FILE * __ri __s , cڡ *__ri __fm , 372 _G_va_li __g ); 377  `vtf (cڡ * __ri __fm , _G_va_li __g ); 379  $vrtf (* __ri __s , cڡ *__ri __fm , 380 _G_va_li __g __THROWNL ; 381 __END_NAMESPACE_STD 383 #i defed __USE_ISOC99 || defed __USE_UNIX98 384 __BEGIN_NAMESPACE_C99 386  $tf (* __ri __s , size_t __maxn , 387 cڡ * __ri __fm , ...) 388 __THROWNL `__ibu__ (( `__fm__ ( __tf__ , 3, 4))); 390  $vtf (* __ri __s , size_t __maxn , 391 cڡ * __ri __fm , _G_va_li __g ) 392 __THROWNL `__ibu__ (( `__fm__ ( __tf__ , 3, 0))); 393 __END_NAMESPACE_C99 396 #ifde __USE_GNU 399  $vartf (** __ri __r , cڡ *__ri __f , 400 _G_va_li __g ) 401 __THROWNL `__ibu__ (( $__fm__ ( __tf__ , 2, 0)) __wur ; 402  $__artf (** __ri __r , 403 cڡ * __ri __fmt , ...) 404 __THROWNL `__ibu__ (( $__fm__ ( __tf__ , 2, 3)) __wur ; 405  $artf (** __ri __r , 406 cڡ * __ri __fmt , ...) 407 __THROWNL `__ibu__ (( $__fm__ ( __tf__ , 2, 3)) __wur ; 410 #ifde __USE_XOPEN2K8 412  $vdtf ( __fd , cڡ * __ri __fmt , 413 _G_va_li __g ) 414 `__ibu__ (( `__fm__ ( __tf__ , 2, 0))); 415  $dtf ( __fd , cڡ * __ri __fmt , ...) 416 `__ibu__ (( `__fm__ ( __tf__ , 2, 3))); 420 __BEGIN_NAMESPACE_STD 425  $fsnf ( FILE * __ri __am , 426 cڡ * __ri __fm , ... __wur ; 431  $snf (cڡ * __ri __fm , ... __wur ; 433  $ssnf (cڡ * __ri __s , 434 cڡ * __ri __fm , ... __THROW ; 436 #i defed __USE_ISOC99 && !defed __USE_GNU \ 437 && (! defed __LDBL_COMPAT || !defed __REDIRECT ) \ 438 && ( defed __STRICT_ANSI__ || defed __USE_XOPEN2K ) 439 #ifde __REDIRECT 443  `__REDIRECT ( fsnf , ( FILE * __ri __am , 444 cڡ * __ri __fm , ...), 445 __isoc99_fsnf __wur ; 446  `__REDIRECT ( snf , (cڡ * __ri __fm , ...), 447 __isoc99_snf __wur ; 448  `__REDIRECT_NTH ( ssnf , (cڡ * __ri __s , 449 cڡ * __ri __fm , ...), 450 __isoc99_ssnf ); 452  $__isoc99_fsnf ( FILE * __ri __am , 453 cڡ * __ri __fm , ... __wur ; 454  $__isoc99_snf (cڡ * __ri __fm , ... __wur ; 455  $__isoc99_ssnf (cڡ * __ri __s , 456 cڡ * __ri __fm , ... __THROW ; 457  #fsnf __isoc99_fsnf ) 458  #snf __isoc99_snf ) 459  #ssnf __isoc99_ssnf ) 463 __END_NAMESPACE_STD 465 #ifdef __USE_ISOC99 466 __BEGIN_NAMESPACE_C99 471  $vfsnf ( FILE * __ri __s , cڡ *__ri __fm , 472 _G_va_li __g ) 473 `__ibu__ (( $__fm__ ( __snf__ , 2, 0)) __wur ; 479  $vsnf (cڡ * __ri __fm , _G_va_li __g ) 480 `__ibu__ (( $__fm__ ( __snf__ , 1, 0)) __wur ; 483  $vssnf (cڡ * __ri __s , 484 cڡ * __ri __fm , _G_va_li __g ) 485 __THROW `__ibu__ (( `__fm__ ( __snf__ , 2, 0))); 487 #i! defed __USE_GNU \ 488 && (! defed __LDBL_COMPAT || !defed __REDIRECT ) \ 489 && ( defed __STRICT_ANSI__ || defed __USE_XOPEN2K ) 490 #ifde __REDIRECT 494  `__REDIRECT ( vfsnf , 495 ( FILE * __ri __s , 496 cڡ * __ri __fm , _G_va_li __g ), 497 __isoc99_vfsnf ) 498 `__ibu__ (( $__fm__ ( __snf__ , 2, 0)) __wur ; 499  `__REDIRECT ( vsnf , (cڡ * __ri __fm , 500 _G_va_li __g ), __isoc99_vsnf ) 501 `__ibu__ (( $__fm__ ( __snf__ , 1, 0)) __wur ; 502  `__REDIRECT_NTH ( vssnf , 503 (cڡ * __ri __s , 504 cڡ * __ri __fm , 505 _G_va_li __g ), __isoc99_vssnf ) 506 `__ibu__ (( `__fm__ ( __snf__ , 2, 0))); 508  $__isoc99_vfsnf ( FILE * __ri __s , 509 cڡ * __ri __fm , 510 _G_va_li __g __wur ; 511  $__isoc99_vsnf (cڡ * __ri __fm , 512 _G_va_li __g __wur ; 513  $__isoc99_vssnf (cڡ * __ri __s , 514 cڡ * __ri __fm , 515 _G_va_li __g __THROW ; 516  #vfsnf __isoc99_vfsnf ) 517  #vsnf __isoc99_vsnf ) 518  #vssnf __isoc99_vssnf ) 522 __END_NAMESPACE_C99 526 __BEGIN_NAMESPACE_STD 531  `fgc ( FILE * __am ); 532  `gc ( FILE * __am ); 538  `gch (); 539 __END_NAMESPACE_STD 543  #gc ( _ `_IO_gc (_) ) 545 #ifde __USE_POSIX 550  `gc_uocked ( FILE * __am ); 551  `gch_uocked (); 554 #ifde __USE_MISC 561  `fgc_uocked ( FILE * __am ); 565 __BEGIN_NAMESPACE_STD 573  `utc ( __c , FILE * __am ); 574  `putc ( __c , FILE * __am ); 580  `putch ( __c ); 581 __END_NAMESPACE_STD 585  #putc ( _ch , _ `_IO_putc (_ch, _) ) 587 #ifde __USE_MISC 594  `utc_uocked ( __c , FILE * __am ); 597 #ifde __USE_POSIX 602  `putc_uocked ( __c , FILE * __am ); 603  `putch_uocked ( __c ); 607 #i defed __USE_MISC \ 608 || ( defed __USE_XOPEN && !defed __USE_XOPEN2K ) 610  `gw ( FILE * __am ); 613  `putw ( __w , FILE * __am ); 617 __BEGIN_NAMESPACE_STD 622 * $fgs (* __ri __s ,  __n , FILE *__ri __am ) 623 __wur ; 625 #i! defed __USE_ISOC11 \ 626 || ( defed __lulus && __cplusplus <= 201103L) 638 * $gs (* __s __wur __ibu_dd__ ; 640 __END_NAMESPACE_STD 642 #ifde __USE_GNU 649 * $fgs_uocked (* __ri __s ,  __n , 650 FILE * __ri __am __wur ; 654 #ifdef __USE_XOPEN2K8 665 _IO_ssize_t $__gdim (** __ri __l , 666 size_t * __ri __n ,  __dim , 667 FILE * __ri __am __wur ; 668 _IO_ssize_t $gdim (** __ri __l , 669 size_t * __ri __n ,  __dim , 670 FILE * __ri __am __wur ; 678 _IO_ssize_t $gle (** __ri __l , 679 size_t * __ri __n , 680 FILE * __ri __am __wur ; 684 __BEGIN_NAMESPACE_STD 689  `uts (cڡ * __ri __s , FILE *__ri __am ); 695  `puts (cڡ * __s ); 702  `ungc ( __c , FILE * __am ); 709 size_t $d (* __ri __r , size_t __size , 710 size_t __n , FILE * __ri __am __wur ; 715 size_t `fwre (cڡ * __ri __r , size_ __size , 716 size_t __n , FILE * __ri __s ); 717 __END_NAMESPACE_STD 719 #ifde __USE_GNU 726  `uts_uocked (cڡ * __ri __s , 727 FILE * __ri __am ); 730 #ifde __USE_MISC 737 size_t $d_uocked (* __ri __r , size_t __size , 738 size_t __n , FILE * __ri __am __wur ; 739 size_t `fwre_uocked (cڡ * __ri __r , size_ __size , 740 size_t __n , FILE * __ri __am ); 744 __BEGIN_NAMESPACE_STD 749  `fek ( FILE * __am ,  __off ,  __wh ); 754  $l ( FILE * __am __wur ; 759  `wd ( FILE * __am ); 760 __END_NAMESPACE_STD 767 #i defed __USE_LARGEFILE || defed __USE_XOPEN2K 768 #ide __USE_FILE_OFFSET64 773  `feko ( FILE * __am , __off_t __off ,  __wh ); 778 __off_t $lo ( FILE * __am __wur ; 780 #ifde __REDIRECT 781  `__REDIRECT ( feko , 782 ( FILE * __am , __off64_t __off ,  __wh ), 783 feko64 ); 784 __off64_t `__REDIRECT ( lo , ( FILE * __am ), lo64 ); 786  #feko feko64 ) 787  #lo lo64 ) 792 __BEGIN_NAMESPACE_STD 793 #ide __USE_FILE_OFFSET64 798  `fgpos ( FILE * __ri __am , os_t *__ri __pos ); 803  `fos ( FILE * __am , cڡ os_t * __pos ); 805 #ifde __REDIRECT 806  `__REDIRECT ( fgpos , ( FILE * __ri __am , 807 os_t * __ri __pos ), fgpos64 ); 808  `__REDIRECT ( fos , 809 ( FILE * __am , cڡ os_t * __pos ), fos64 ); 811  #fgpos fgpos64 ) 812  #fos fos64 ) 815 __END_NAMESPACE_STD 817 #ifde __USE_LARGEFILE64 818  `feko64 ( FILE * __am , __off64_t __off ,  __wh ); 819 __off64_t $lo64 ( FILE * __am __wur ; 820  `fgpos64 ( FILE * __ri __am , os64_t *__ri __pos ); 821  `fos64 ( FILE * __am , cڡ os64_t * __pos ); 824 __BEGIN_NAMESPACE_STD 826  $ ( FILE * __am __THROW ; 828  $of ( FILE * __am __THROW __wur ; 830  $ ( FILE * __am __THROW __wur ; 831 __END_NAMESPACE_STD 833 #ifde __USE_MISC 835  $_uocked ( FILE * __am __THROW ; 836  $of_uocked ( FILE * __am __THROW __wur ; 837  $_uocked ( FILE * __am __THROW __wur ; 841 __BEGIN_NAMESPACE_STD 846  ` (cڡ * __s ); 847 __END_NAMESPACE_STD 853  ~ 856 #ifdef __USE_POSIX 858  $fo ( FILE * __am __THROW __wur ; 861 #ifde __USE_MISC 863  $fo_uocked ( FILE * __am __THROW __wur ; 867 #ifde __USE_POSIX2 872 FILE * $pݒ (cڡ * __commd , cڡ * __modes __wur ; 878  `po ( FILE * __am ); 882 #ifdef __USE_POSIX 884 * $mid (* __s __THROW ; 888 #ifde __USE_XOPEN 890 * `curid (* __s ); 894 #ifdef __USE_GNU 895  oback ; 898  $oback_tf ( oback * __ri __oback , 899 cڡ * __ri __fm , ...) 900 __THROWNL `__ibu__ (( `__fm__ ( __tf__ , 2, 3))); 901  $oback_vtf ( oback * __ri __oback , 902 cڡ * __ri __fm , 903 _G_va_li __gs ) 904 __THROWNL `__ibu__ (( `__fm__ ( __tf__ , 2, 0))); 908 #ifde __USE_POSIX 912  $ockfe ( FILE * __am __THROW ; 916  $rylockfe ( FILE * __am __THROW __wur ; 919  $fuockfe ( FILE * __am __THROW ; 922 #i defed __USE_XOPEN && !defed __USE_XOPEN2K && !defed __USE_GNU 926  #__ed_gt ) 927  ~ 932 #ifde __USE_EXTERN_INLINES 933  ~ 935 #i __USE_FORTIFY_LEVEL > 0 && defed __ftify_funi 936  ~ 938 #ifde __LDBL_COMPAT 939  ~ 942 __END_DECLS @/usr/include/stdlib.h 22 #idef _STDLIB_H 24  ~ 27  #__ed_size_t ) 28 #ide __ed_mloc_d_oc 29  #__ed_wch_t ) 30  #__ed_NULL ) 32  ~ 34 g__BEGIN_DECLS 36 #ide __ed_mloc_d_oc 37  #_STDLIB_H 1 ) 39 #i( defed __USE_XOPEN || defed __USE_XOPEN2K8 && !defed _SYS_WAIT_H 41  ~ 42  ~ 44 #ifde __USE_MISC 49 #i defed __GNUC__ && !defed __lulus 50  #__WAIT_INT ( us ) \ 51 ( `__exnsi__ (((uni { `__tyof ( us __ ;  __i ; }) \ 52 { . __ = ( us }). __i )) ) 54  #__WAIT_INT ( us (*(*&(us)) ) 62 #i! defed __GNUC__ || __GNUC__ < 2 || defed __lulus 63  #__WAIT_STATUS * ) 64  #__WAIT_STATUS_DEFN * ) 69  wa * m__ur ; 70 * m__ ; 71 } t__WAIT_STATUS t__ibu__ (( t__t_uni__ )); 72  #__WAIT_STATUS_DEFN * ) 77  #__WAIT_INT ( us (us) ) 78  #__WAIT_STATUS * ) 79  #__WAIT_STATUS_DEFN * ) 84  #WEXITSTATUS ( us `__WEXITSTATUS ( `__WAIT_INT (us)) ) 85  #WTERMSIG ( us `__WTERMSIG ( `__WAIT_INT (us)) ) 86  #WSTOPSIG ( us `__WSTOPSIG ( `__WAIT_INT (us)) ) 87  #WIFEXITED ( us `__WIFEXITED ( `__WAIT_INT (us)) ) 88  #WIFSIGNALED ( us `__WIFSIGNALED ( `__WAIT_INT (us)) ) 89  #WIFSTOPPED ( us `__WIFSTOPPED ( `__WAIT_INT (us)) ) 90 #ifde __WIFCONTINUED 91  #WIFCONTINUED ( us `__WIFCONTINUED ( `__WAIT_INT (us)) ) 95 __BEGIN_NAMESPACE_STD 99  mqu ; 100  mm ; 101 } tdiv_t ; 104 #ide __ldiv_t_defed 107  mqu ; 108  mm ; 109 } tldiv_t ; 110  #__ldiv_t_defed 1 ) 112 g__END_NAMESPACE_STD 114 #i defed __USE_ISOC99 && !defed __div_t_defed 115 __BEGIN_NAMESPACE_C99 117 __exnsi__ struct 119  mqu ; 120  mm ; 121 } tdiv_t ; 122  #__div_t_defed 1 ) 123 g__END_NAMESPACE_C99 128  #RAND_MAX 2147483647 ) 133  #EXIT_FAILURE 1 ) 134  #EXIT_SUCCESS 0 ) 138  #MB_CUR_MAX ( `__y_g_mb_cur_max ()) ) 139 size_t $__y_g_mb_cur_max ( __THROW __wur ; 142 __BEGIN_NAMESPACE_STD 144  $of (cڡ * __Ō ) 145 __THROW __ibu_pu__ `__nnu ((1) __wur ; 147  $oi (cڡ * __Ō ) 148 __THROW __ibu_pu__ `__nnu ((1) __wur ; 150  $ (cڡ * __Ō ) 151 __THROW __ibu_pu__ `__nnu ((1) __wur ; 152 __END_NAMESPACE_STD 154 #ifde __USE_ISOC99 155 __BEGIN_NAMESPACE_C99 157 __exnsi__  $l (cڡ * __Ō ) 158 __THROW __ibu_pu__ `__nnu ((1) __wur ; 159 __END_NAMESPACE_C99 162 __BEGIN_NAMESPACE_STD 164  $od (cڡ * __ri __Ō , 165 ** __ri __dr ) 166 __THROW `__nnu ((1)); 167 __END_NAMESPACE_STD 169 #ifdef __USE_ISOC99 170 __BEGIN_NAMESPACE_C99 172  $of (cڡ * __ri __Ō , 173 ** __ri __dr __THROW `__nnu ((1)); 175  $d (cڡ * __ri __Ō , 176 ** __ri __dr ) 177 __THROW `__nnu ((1)); 178 __END_NAMESPACE_C99 181 __BEGIN_NAMESPACE_STD 183  $ (cڡ * __ri __Ō , 184 ** __ri __dr ,  __ba ) 185 __THROW `__nnu ((1)); 187  $oul (cڡ * __ri __Ō , 188 ** __ri __dr ,  __ba ) 189 __THROW `__nnu ((1)); 190 __END_NAMESPACE_STD 192 #ifde __USE_MISC 194 __exnsi__ 195  $oq (cڡ * __ri __Ō , 196 ** __ri __dr ,  __ba ) 197 __THROW `__nnu ((1)); 199 __exnsi__ 200  $ouq (cڡ * __ri __Ō , 201 ** __ri __dr ,  __ba ) 202 __THROW `__nnu ((1)); 205 #ifde __USE_ISOC99 206 __BEGIN_NAMESPACE_C99 208 __exnsi__ 209  $l (cڡ * __ri __Ō , 210 ** __ri __dr ,  __ba ) 211 __THROW `__nnu ((1)); 213 __exnsi__ 214  $ou (cڡ * __ri __Ō , 215 ** __ri __dr ,  __ba ) 216 __THROW `__nnu ((1)); 217 __END_NAMESPACE_C99 221 #ifde __USE_GNU 235  ~ 239  $_l (cڡ * __ri __Ō , 240 ** __ri __dr ,  __ba , 241 __lo_t __loc __THROW `__nnu ((1, 4)); 243  $oul_l (cڡ * __ri __Ō , 244 ** __ri __dr , 245  __ba , __lo_t __loc ) 246 __THROW `__nnu ((1, 4)); 248 __exnsi__ 249  $l_l (cڡ * __ri __Ō , 250 ** __ri __dr ,  __ba , 251 __lo_t __loc ) 252 __THROW `__nnu ((1, 4)); 254 __exnsi__ 255  $ou_l (cڡ * __ri __Ō , 256 ** __ri __dr , 257  __ba , __lo_t __loc ) 258 __THROW `__nnu ((1, 4)); 260  $od_l (cڡ * __ri __Ō , 261 ** __ri __dr , __lo_t __loc ) 262 __THROW `__nnu ((1, 3)); 264  $of_l (cڡ * __ri __Ō , 265 ** __ri __dr , __lo_t __loc ) 266 __THROW `__nnu ((1, 3)); 268  $d_l (cڡ * __ri __Ō , 269 ** __ri __dr , 270 __lo_t __loc ) 271 __THROW `__nnu ((1, 3)); 275 #ifde __USE_EXTERN_INLINES 276 __BEGIN_NAMESPACE_STD 277 __ex_le  278 `__NTH ( $oi (cڡ * __Ō )) 280  ( ` ( __Ō , (** NULL , 10); 281 } } 282 __ex_le  283 __NTH ( $ (cڡ * __Ō )) 285  ` ( __Ō , (** NULL , 10); 286 } } 287 g__END_NAMESPACE_STD 289 #ifde __USE_ISOC99 290 __BEGIN_NAMESPACE_C99 291 __exnsi__ __ex_le  292 __NTH ( $l (cڡ * __Ō )) 294  `l ( __Ō , (** NULL , 10); 295 } } 296 g__END_NAMESPACE_C99 301 #i defed __USE_MISC || defed __USE_XOPEN_EXTENDED 305 * $l64a ( __n __THROW __wur ; 308  $a64l (cڡ * __s ) 309 __THROW __ibu_pu__ `__nnu ((1) __wur ; 313 #i defed __USE_MISC || defed __USE_XOPEN_EXTENDED 314  ~ 321  $ndom ( __THROW ; 324  $dom ( __ed __THROW ; 330 * $e ( __ed , * __ebuf , 331 size_t __ __THROW `__nnu ((2)); 335 * $te (* __ebuf __THROW `__nnu ((1)); 338 #ifde __USE_MISC 343  sndom_da 345 t32_t * ; 346 t32_t * ; 347 t32_t * e ; 348  nd_ty ; 349  nd_deg ; 350  nd_p ; 351 t32_t * d_r ; 354  $ndom_r ( ndom_da * __ri __buf , 355 t32_t * __ri __su __THROW `__nnu ((1, 2)); 357  $dom_r ( __ed ,  ndom_da * __buf ) 358 __THROW `__nnu ((2)); 360  $e_r ( __ed , * __ri __ebuf , 361 size_t __ , 362  ndom_da * __ri __buf ) 363 __THROW `__nnu ((2, 4)); 365  $te_r (* __ri __ebuf , 366  ndom_da * __ri __buf ) 367 __THROW `__nnu ((1, 2)); 372 __BEGIN_NAMESPACE_STD 374  $nd ( __THROW ; 376  $d ( __ed __THROW ; 377 __END_NAMESPACE_STD 379 #ifde __USE_POSIX 381  $nd_r (* __ed __THROW ; 385 #i defed __USE_MISC || defed __USE_XOPEN 389  $dnd48 ( __THROW ; 390  $d48 ( __xsubi [3] __THROW `__nnu ((1)); 393  $̪d48 ( __THROW ; 394  $Īd48 ( __xsubi [3]) 395 __THROW `__nnu ((1)); 398  $mnd48 ( __THROW ; 399  $jnd48 ( __xsubi [3]) 400 __THROW `__nnu ((1)); 403  $d48 ( __edv __THROW ; 404 * $ed48 ( __ed16v [3]) 405 __THROW `__nnu ((1)); 406  $lcg48 ( __m [7] __THROW `__nnu ((1)); 408 #ifde __USE_MISC 412  sdnd48_da 414  __x [3]; 415  __d_x [3]; 416  __c ; 417  __ ; 418 __exnsi__  __a ; 423  $dnd48_r ( dnd48_da * __ri __bufr , 424 * __ri __su __THROW `__nnu ((1, 2)); 425  $d48_r ( __xsubi [3], 426  dnd48_da * __ri __bufr , 427 * __ri __su __THROW `__nnu ((1, 2)); 430  $̪d48_r ( dnd48_da * __ri __bufr , 431 * __ri __su ) 432 __THROW `__nnu ((1, 2)); 433  $Īd48_r ( __xsubi [3], 434  dnd48_da * __ri __bufr , 435 * __ri __su ) 436 __THROW `__nnu ((1, 2)); 439  $mnd48_r ( dnd48_da * __ri __bufr , 440 * __ri __su ) 441 __THROW `__nnu ((1, 2)); 442  $jnd48_r ( __xsubi [3], 443  dnd48_da * __ri __bufr , 444 * __ri __su ) 445 __THROW `__nnu ((1, 2)); 448  $d48_r ( __edv ,  dnd48_da * __bufr ) 449 __THROW `__nnu ((2)); 451  $ed48_r ( __ed16v [3], 452  dnd48_da * __bufr __THROW `__nnu ((1, 2)); 454  $lcg48_r ( __m [7], 455  dnd48_da * __bufr ) 456 __THROW `__nnu ((1, 2)); 462 #ide __mloc_d_oc_defed 463  #__mloc_d_oc_defed ) 464 __BEGIN_NAMESPACE_STD 466 * $mloc ( size_t __size __THROW __ibu_mloc__ __wur ; 468 * $oc ( size_t __nmemb , size_ __size ) 469 __THROW __ibu_mloc__ __wur ; 470 __END_NAMESPACE_STD 473 #ide __ed_mloc_d_oc 474 __BEGIN_NAMESPACE_STD 480 * $loc (* __r , size_t __size ) 481 __THROW __ibu_wn_unud_su__ ; 483  $ (* __r __THROW ; 484 __END_NAMESPACE_STD 486 #ifdef __USE_MISC 488  $c (* __r __THROW ; 491 #ifde __USE_MISC 492  ~ 495 #i( defed __USE_XOPEN_EXTENDED && !defed __USE_XOPEN2K ) \ 496 || defed __USE_MISC 498 * $vloc ( size_t __size __THROW __ibu_mloc__ __wur ; 501 #ifde __USE_XOPEN2K 503  $posix_memign (** __memr , size_t __ignmt , size_ __size ) 504 __THROW `__nnu ((1) __wur ; 507 #ifde __USE_ISOC11 509 * $igd_loc ( size_t __ignmt , size_ __size ) 510 __THROW __ibu_mloc__ `__ibu_loc_size__ ((2) __wur ; 513 __BEGIN_NAMESPACE_STD 515  $abt ( __THROW `__ibu__ (( __nܑu__ )); 519  $ex ((* __func () __THROW `__nnu ((1)); 521 #i defed __USE_ISOC11 || defed __USE_ISOCXX11 523 #ifde __lulus 524 "C++"  $_quick_ex ((* __func ) ()) 525 __THROW `__asm ("_quick_ex" `__nnu ((1)); 527  $_quick_ex ((* __func () __THROW `__nnu ((1)); 530 __END_NAMESPACE_STD 532 #ifdef __USE_MISC 535  $_ex ((* __func ( __us , * __g ), *__arg) 536 __THROW `__nnu ((1)); 539 __BEGIN_NAMESPACE_STD 543  $ex ( __us __THROW `__ibu__ (( __nܑu__ )); 545 #i defed __USE_ISOC11 || defed __USE_ISOCXX11 549  $quick_ex ( __us __THROW `__ibu__ (( __nܑu__ )); 551 __END_NAMESPACE_STD 553 #ifde __USE_ISOC99 554 __BEGIN_NAMESPACE_C99 557  $_Ex ( __us __THROW `__ibu__ (( __nܑu__ )); 558 __END_NAMESPACE_C99 562 __BEGIN_NAMESPACE_STD 564 * $gv (cڡ * __me __THROW `__nnu ((1) __wur ; 565 __END_NAMESPACE_STD 567 #ifde __USE_GNU 570 * $cu_gv (cڡ * __me ) 571 __THROW `__nnu ((1) __wur ; 574 #i defed __USE_MISC || defed __USE_XOPEN 578  $punv (* __rg __THROW `__nnu ((1)); 581 #ifde __USE_XOPEN2K 584  $nv (cڡ * __me , cڡ * __vue ,  __a ) 585 __THROW `__nnu ((2)); 588  $unnv (cڡ * __me __THROW `__nnu ((1)); 591 #ifdef __USE_MISC 595  $nv ( __THROW ; 599 #i defed __USE_MISC \ 600 || ( defed __USE_XOPEN_EXTENDED && !defed __USE_XOPEN2K8 ) 606 * $mkmp (* __me __THROW `__nnu ((1)); 609 #i defed __USE_XOPEN_EXTENDED || defed __USE_XOPEN2K8 618 #ide __USE_FILE_OFFSET64 619  $mkemp (* __me `__nnu ((1) __wur ; 621 #ifde __REDIRECT 622  `__REDIRECT ( mkemp , (* __me ), mkemp64 ) 623 `__nnu ((1) __wur ; 625  #mkemp mkemp64 ) 628 #ifde __USE_LARGEFILE64 629  $mkemp64 (* __me `__nnu ((1) __wur ; 633 #ifde __USE_MISC 640 #ide __USE_FILE_OFFSET64 641  $mkemps (* __me ,  __suffixn `__nnu ((1) __wur ; 643 #ifde __REDIRECT 644  `__REDIRECT ( mkemps , (* __me ,  __suffixn ), 645 mkemps64 `__nnu ((1) __wur ; 647  #mkemps mkemps64 ) 650 #ifde __USE_LARGEFILE64 651  $mkemps64 (* __me ,  __suffixn ) 652 `__nnu ((1) __wur ; 656 #ifde __USE_XOPEN2K8 662 * $mkdmp (* __me __THROW `__nnu ((1) __wur ; 665 #ifde __USE_GNU 672 #ide __USE_FILE_OFFSET64 673  $mkoemp (* __me ,  __ags `__nnu ((1) __wur ; 675 #ifde __REDIRECT 676  `__REDIRECT ( mkoemp , (* __me ,  __ags ), mkoemp64 ) 677 `__nnu ((1) __wur ; 679  #mkoemp mkoemp64 ) 682 #ifde __USE_LARGEFILE64 683  $mkoemp64 (* __me ,  __ags `__nnu ((1) __wur ; 692 #ide __USE_FILE_OFFSET64 693  $mkoemps (* __me ,  __suffixn ,  __ags ) 694 `__nnu ((1) __wur ; 696 #ifde __REDIRECT 697  `__REDIRECT ( mkoemps , (* __me ,  __suffixn , 698  __ags ), mkoemps64 ) 699 `__nnu ((1) __wur ; 701  #mkoemps mkoemps64 ) 704 #ifde __USE_LARGEFILE64 705  $mkoemps64 (* __me ,  __suffixn ,  __ags ) 706 `__nnu ((1) __wur ; 711 __BEGIN_NAMESPACE_STD 716  $syem (cڡ * __commd __wur ; 717 __END_NAMESPACE_STD 720 #ifdef __USE_GNU 723 * $nilize_fe_me (cڡ * __me ) 724 __THROW `__nnu ((1) __wur ; 727 #i defed __USE_MISC || defed __USE_XOPEN_EXTENDED 733 * $th (cڡ * __ri __me , 734 * __ri __sved __THROW __wur ; 739 #ide __COMPAR_FN_T 740  #__COMPAR_FN_T ) 741 (* t__comr__t ) (const *, const *); 743 #ifdef __USE_GNU 744  __comr__t tcomris__t ; 747 #ifde __USE_GNU 748 (* t__comr_d__t ) (const *, const *, *); 751 __BEGIN_NAMESPACE_STD 754 * $bch (cڡ * __key , cڡ * __ba , 755 size_t __nmemb , size_ __size , __comr__t __comr ) 756 `__nnu ((1, 2, 5) __wur ; 758 #ifde __USE_EXTERN_INLINES 759  ~ 764  $qst (* __ba , size_t __nmemb , size_ __size , 765 __comr__t __comr `__nnu ((1, 4)); 766 #ifde __USE_GNU 767  $qst_r (* __ba , size_t __nmemb , size_ __size , 768 __comr_d__t __comr , * __g ) 769 `__nnu ((1, 4)); 774  $abs ( __x __THROW `__ibu__ (( __cڡ__ ) __wur ; 775  $bs ( __x __THROW `__ibu__ (( __cڡ__ ) __wur ; 776 __END_NAMESPACE_STD 778 #ifde __USE_ISOC99 779 __exnsi__  $abs ( __x ) 780 __THROW `__ibu__ (( __cڡ__ ) __wur ; 784 __BEGIN_NAMESPACE_STD 788 div_t $div ( __num ,  __dom ) 789 __THROW `__ibu__ (( __cڡ__ ) __wur ; 790 ldiv_t $ldiv ( __num ,  __dom ) 791 __THROW `__ibu__ (( __cڡ__ ) __wur ; 792 __END_NAMESPACE_STD 794 #ifde __USE_ISOC99 795 __BEGIN_NAMESPACE_C99 796 __exnsi__ div_t $div ( __num , 797  __dom ) 798 __THROW `__ibu__ (( __cڡ__ ) __wur ; 799 __END_NAMESPACE_C99 803 #i( defed __USE_XOPEN_EXTENDED && !defed __USE_XOPEN2K8 ) \ 804 || defed __USE_MISC 811 * $ecvt ( __vue ,  __ndig , * __ri __det , 812 * __ri __sign __THROW `__nnu ((3, 4) __wur ; 817 * $fcvt ( __vue ,  __ndig , * __ri __det , 818 * __ri __sign __THROW `__nnu ((3, 4) __wur ; 823 * $gcvt ( __vue ,  __ndig , * __buf ) 824 __THROW `__nnu ((3) __wur ; 827 #ifde __USE_MISC 829 * $qecvt ( __vue ,  __ndig , 830 * __ri __det , *__ri __sign ) 831 __THROW `__nnu ((3, 4) __wur ; 832 * $qfcvt ( __vue ,  __ndig , 833 * __ri __det , *__ri __sign ) 834 __THROW `__nnu ((3, 4) __wur ; 835 * $qgcvt ( __vue ,  __ndig , * __buf ) 836 __THROW `__nnu ((3) __wur ; 841  $ecvt_r ( __vue ,  __ndig , * __ri __det , 842 * __ri __sign , *__ri __buf , 843 size_t __n __THROW `__nnu ((3, 4, 5)); 844  $fcvt_r ( __vue ,  __ndig , * __ri __det , 845 * __ri __sign , *__ri __buf , 846 size_t __n __THROW `__nnu ((3, 4, 5)); 848  $qecvt_r ( __vue ,  __ndig , 849 * __ri __det , *__ri __sign , 850 * __ri __buf , size_t __n ) 851 __THROW `__nnu ((3, 4, 5)); 852  $qfcvt_r ( __vue ,  __ndig , 853 * __ri __det , *__ri __sign , 854 * __ri __buf , size_t __n ) 855 __THROW `__nnu ((3, 4, 5)); 859 __BEGIN_NAMESPACE_STD 862  $mbn (cڡ * __s , size_t __n __THROW ; 865  $mbtowc ( wch_t * __ri __pwc , 866 cڡ * __ri __s , size_t __n __THROW ; 869  $womb (* __s , wch_t __wch __THROW ; 873 size_t $mbowcs ( wch_t * __ri __pwcs , 874 cڡ * __ri __s , size_t __n __THROW ; 876 size_t $wcombs (* __ri __s , 877 cڡ wch_t * __ri __pwcs , size_t __n ) 878 __THROW ; 879 __END_NAMESPACE_STD 882 #ifde __USE_MISC 887  $mch (cڡ * __ڣ __THROW `__nnu ((1) __wur ; 891 #i defed __USE_XOPEN_EXTENDED || defed __USE_XOPEN2K8 898  $gsubt (** __ri __tip , 899 *cڡ * __ri __toks , 900 ** __ri __vu ) 901 __THROW `__nnu ((1, 2, 3) __wur ; 905 #ifde __USE_XOPEN 907  $tkey (cڡ * __key __THROW `__nnu ((1)); 913 #ifde __USE_XOPEN2KXSI 915  $posix_ݒ ( __oag __wur ; 918 #ifde __USE_XOPEN 923  $g ( __fd __THROW ; 927  $uock ( __fd __THROW ; 932 * $ame ( __fd __THROW __wur ; 935 #ifde __USE_GNU 939  $ame_r ( __fd , * __buf , size_t __bu ) 940 __THROW `__nnu ((2)); 943  `g (); 946 #ifde __USE_MISC 950  $gldavg ( __ldavg [],  __m ) 951 __THROW `__nnu ((1)); 954  ~ 957 #i __USE_FORTIFY_LEVEL > 0 && defed __ftify_funi 958  ~ 960 #ifde __LDBL_COMPAT 961  ~ 965 #unde __ed_mloc_d_oc 967 __END_DECLS @/usr/include/string.h 22 #idef _STRING_H 23  #_STRING_H 1 ) 25  ~ 27 g__BEGIN_DECLS 30  #__ed_size_t ) 31  #__ed_NULL ) 32  ~ 35 #i defed __lulus && __GNUC_PREREQ (4, 4) 36  #__CORRECT_ISO_CPP_STRING_H_PROTO ) 40 __BEGIN_NAMESPACE_STD 42 * $memy (* __ri __de , cڡ *__ri __c , 43 size_t __n __THROW `__nnu ((1, 2)); 46 * $memmove (* __de , cڡ * __c , size_t __n ) 47 __THROW `__nnu ((1, 2)); 48 __END_NAMESPACE_STD 53 #i defed __USE_MISC || defed __USE_XOPEN 54 * $memcy (* __ri __de , cڡ *__ri __c , 55  __c , size_t __n ) 56 __THROW `__nnu ((1, 2)); 60 __BEGIN_NAMESPACE_STD 62 * $memt (* __s ,  __c , size_t __n __THROW `__nnu ((1)); 65  $memcmp (cڡ * __s1 , cڡ * __s2 , size_t __n ) 66 __THROW __ibu_pu__ `__nnu ((1, 2)); 69 #ifde __CORRECT_ISO_CPP_STRING_H_PROTO 72 * `memchr (* __s ,  __c , size_t __n ) 73 __THROW `__asm ("memchr" __ibu_pu__ `__nnu ((1)); 74 cڡ * `memchr (cڡ * __s ,  __c , size_t __n ) 75 __THROW `__asm ("memchr" __ibu_pu__ `__nnu ((1)); 77 #ifde __OPTIMIZE__ 78 __ex_ways_le * 79 `memchr (* __s ,  __c , size_t __n __THROW 81  `__but_memchr ( __s , __c , __n ); 84 __ex_ways_le const * 85 `memchr (cڡ * __s ,  __c , size_t __n __THROW 87  `__but_memchr ( __s , __c , __n ); 90 } } 92 * $memchr (cڡ * __s ,  __c , size_t __n ) 93 __THROW __ibu_pu__ `__nnu ((1)); 95 __END_NAMESPACE_STD 97 #ifde __USE_GNU 100 #ifde __CORRECT_ISO_CPP_STRING_H_PROTO 101 "C++" * $wmemchr (* __s ,  __c ) 102 __THROW `__asm ("wmemchr" __ibu_pu__ `__nnu ((1)); 103 "C++" cڡ * $wmemchr (cڡ * __s ,  __c ) 104 __THROW `__asm ("wmemchr" __ibu_pu__ `__nnu ((1)); 106 * $wmemchr (cڡ * __s ,  __c ) 107 __THROW __ibu_pu__ `__nnu ((1)); 111 #ifde __CORRECT_ISO_CPP_STRING_H_PROTO 112 "C++" * $memrchr (* __s ,  __c , size_t __n ) 113 __THROW `__asm ("memrchr" __ibu_pu__ `__nnu ((1)); 114 "C++" cڡ * $memrchr (cڡ * __s ,  __c , size_t __n ) 115 __THROW `__asm ("memrchr" __ibu_pu__ `__nnu ((1)); 117 * $memrchr (cڡ * __s ,  __c , size_t __n ) 118 __THROW __ibu_pu__ `__nnu ((1)); 123 __BEGIN_NAMESPACE_STD 125 * $ry (* __ri __de , cڡ *__ri __c ) 126 __THROW `__nnu ((1, 2)); 128 * $y (* __ri __de , 129 cڡ * __ri __c , size_t __n ) 130 __THROW `__nnu ((1, 2)); 133 * $rt (* __ri __de , cڡ *__ri __c ) 134 __THROW `__nnu ((1, 2)); 136 * $t (* __ri __de , cڡ *__ri __c , 137 size_t __n __THROW `__nnu ((1, 2)); 140  $rcmp (cڡ * __s1 , cڡ * __s2 ) 141 __THROW __ibu_pu__ `__nnu ((1, 2)); 143  $cmp (cڡ * __s1 , cڡ * __s2 , size_t __n ) 144 __THROW __ibu_pu__ `__nnu ((1, 2)); 147  $rcl (cڡ * __s1 , cڡ * __s2 ) 148 __THROW __ibu_pu__ `__nnu ((1, 2)); 150 size_t $rxm (* __ri __de , 151 cڡ * __ri __c , size_t __n ) 152 __THROW `__nnu ((2)); 153 __END_NAMESPACE_STD 155 #ifde __USE_XOPEN2K8 159  ~ 162  $rcl_l (cڡ * __s1 , cڡ * __s2 , __lo_t __l ) 163 __THROW __ibu_pu__ `__nnu ((1, 2, 3)); 165 size_t $rxm_l (* __de , cڡ * __c , size_t __n , 166 __lo_t __l __THROW `__nnu ((2, 4)); 169 #i defed __USE_XOPEN_EXTENDED || defed __USE_XOPEN2K8 171 * $rdup (cڡ * __s ) 172 __THROW __ibu_mloc__ `__nnu ((1)); 178 #i defed __USE_XOPEN2K8 179 * $dup (cڡ * __rg , size_t __n ) 180 __THROW __ibu_mloc__ `__nnu ((1)); 183 #i defed __USE_GNU && defed __GNUC__ 185  #rdu ( s ) \ 186 ( __exnsi__ \ 188 cڡ * __d = ( s ); \ 189 size_t __n = ` ( __d ) + 1; \ 190 * __w = (* `__but_lo ( __n ); \ 191 (* `memy ( __w , __d , __n ); \ 192 } })) ) 195  #du ( s , n ) \ 196 ( __exnsi__ \ 198 cڡ * __d = ( s ); \ 199 size_t __n = `n ( __d , ( n )); \ 200 * __w = (* `__but_lo ( __n + 1); \ 201 __w [ __n ] = '\0'; \ 202 (* `memy ( __w , __d , __n ); \ 203 })) ) 206 g__BEGIN_NAMESPACE_STD 208 #ifde __CORRECT_ISO_CPP_STRING_H_PROTO 211 * rchr (* __s ,  __c ) 212 __THROW __asm ("rchr" __ibu_pu__ __nnu ((1)); 213 cڡ * rchr (cڡ * __s ,  __c ) 214 __THROW __asm ("rchr" __ibu_pu__ __nnu ((1)); 216 #ifde __OPTIMIZE__ 217 __ex_ways_le * 218 rchr (* __s ,  __c g__THROW 220  __but_rchr ( __s , __c ); 223 __ex_ways_le const * 224 rchr (cڡ * __s ,  __c g__THROW 226  __but_rchr ( __s , __c ); 231 * $rchr (cڡ * __s ,  __c ) 232 __THROW __ibu_pu__ `__nnu ((1)); 235 #ifde __CORRECT_ISO_CPP_STRING_H_PROTO 238 * `chr (* __s ,  __c ) 239 __THROW `__asm ("chr" __ibu_pu__ `__nnu ((1)); 240 cڡ * `chr (cڡ * __s ,  __c ) 241 __THROW `__asm ("chr" __ibu_pu__ `__nnu ((1)); 243 #ifde __OPTIMIZE__ 244 __ex_ways_le * 245 `chr (* __s ,  __c __THROW 247  `__but_chr ( __s , __c ); 250 __ex_ways_le const * 251 `chr (cڡ * __s ,  __c __THROW 253  `__but_chr ( __s , __c ); 256 } } 258 * $chr (cڡ * __s ,  __c ) 259 __THROW __ibu_pu__ `__nnu ((1)); 261 __END_NAMESPACE_STD 263 #ifde __USE_GNU 266 #ifde __CORRECT_ISO_CPP_STRING_H_PROTO 267 "C++" * $rchul (* __s ,  __c ) 268 __THROW `__asm ("rchul" __ibu_pu__ `__nnu ((1)); 269 "C++" cڡ * $rchul (cڡ * __s ,  __c ) 270 __THROW `__asm ("rchul" __ibu_pu__ `__nnu ((1)); 272 * $rchul (cڡ * __s ,  __c ) 273 __THROW __ibu_pu__ `__nnu ((1)); 277 __BEGIN_NAMESPACE_STD 280 size_t $rcn (cڡ * __s , cڡ * __je ) 281 __THROW __ibu_pu__ `__nnu ((1, 2)); 284 size_t $rn (cڡ * __s , cڡ * __ac ) 285 __THROW __ibu_pu__ `__nnu ((1, 2)); 287 #ifde __CORRECT_ISO_CPP_STRING_H_PROTO 290 * `brk (* __s , cڡ * __ac ) 291 __THROW `__asm ("brk" __ibu_pu__ `__nnu ((1, 2)); 292 cڡ * `brk (cڡ * __s , cڡ * __ac ) 293 __THROW `__asm ("brk" __ibu_pu__ `__nnu ((1, 2)); 295 #ifde __OPTIMIZE__ 296 __ex_ways_le * 297 `brk (* __s , cڡ * __ac __THROW 299  `__but_brk ( __s , __ac ); 302 __ex_ways_le const * 303 `brk (cڡ * __s , cڡ * __ac __THROW 305  `__but_brk ( __s , __ac ); 308 } } 310 * $brk (cڡ * __s , cڡ * __ac ) 311 __THROW __ibu_pu__ `__nnu ((1, 2)); 314 #ifde __CORRECT_ISO_CPP_STRING_H_PROTO 317 * `rr (* __hayack , cڡ * __ed ) 318 __THROW `__asm ("rr" __ibu_pu__ `__nnu ((1, 2)); 319 cڡ * `rr (cڡ * __hayack , cڡ * __ed ) 320 __THROW `__asm ("rr" __ibu_pu__ `__nnu ((1, 2)); 322 #ifde __OPTIMIZE__ 323 __ex_ways_le * 324 `rr (* __hayack , cڡ * __ed __THROW 326  `__but_rr ( __hayack , __ed ); 329 __ex_ways_le const * 330 `rr (cڡ * __hayack , cڡ * __ed __THROW 332  `__but_rr ( __hayack , __ed ); 335 } } 337 * $rr (cڡ * __hayack , cڡ * __ed ) 338 __THROW __ibu_pu__ `__nnu ((1, 2)); 343 * $ok (* __ri __s , cڡ *__ri __dim ) 344 __THROW `__nnu ((2)); 345 __END_NAMESPACE_STD 349 * $__ok_r (* __ri __s , 350 cڡ * __ri __dim , 351 ** __ri __ve_r ) 352 __THROW `__nnu ((2, 3)); 353 #ifde __USE_POSIX 354 * $ok_r (* __ri __s , cڡ *__ri __dim , 355 ** __ri __ve_r ) 356 __THROW `__nnu ((2, 3)); 359 #ifde __USE_GNU 361 #ifde __CORRECT_ISO_CPP_STRING_H_PROTO 362 "C++" * $rr (* __hayack , cڡ * __ed ) 363 __THROW `__asm ("rr" __ibu_pu__ `__nnu ((1, 2)); 364 "C++" cڡ * $rr (cڡ * __hayack , 365 cڡ * __ed ) 366 __THROW `__asm ("rr" __ibu_pu__ `__nnu ((1, 2)); 368 * $rr (cڡ * __hayack , cڡ * __ed ) 369 __THROW __ibu_pu__ `__nnu ((1, 2)); 373 #ifde __USE_GNU 377 * $memmem (cڡ * __hayack , size_t __hayackn , 378 cڡ * __ed , size_t __edn ) 379 __THROW __ibu_pu__ `__nnu ((1, 3)); 383 * $__mempy (* __ri __de , 384 cڡ * __ri __c , size_t __n ) 385 __THROW `__nnu ((1, 2)); 386 * $mempy (* __ri __de , 387 cڡ * __ri __c , size_t __n ) 388 __THROW `__nnu ((1, 2)); 392 __BEGIN_NAMESPACE_STD 394 size_t $ (cڡ * __s ) 395 __THROW __ibu_pu__ `__nnu ((1)); 396 __END_NAMESPACE_STD 398 #ifdef __USE_XOPEN2K8 401 size_t $n (cڡ * __rg , size_t __maxn ) 402 __THROW __ibu_pu__ `__nnu ((1)); 406 __BEGIN_NAMESPACE_STD 408 * $ ( __um __THROW ; 409 __END_NAMESPACE_STD 410 #ifde __USE_XOPEN2K 418 #i defed __USE_XOPEN2K && !defed __USE_GNU 421 #ifde __REDIRECT_NTH 422  `__REDIRECT_NTH ( _r , 423 ( __um , * __buf , size_t __bu ), 424 __xpg__r `__nnu ((2)); 426  $__xpg__r ( __um , * __buf , size_t __bu ) 427 __THROW `__nnu ((2)); 428  #_r __xpg__r ) 433 * $_r ( __um , * __buf , size_t __bu ) 434 __THROW `__nnu ((2) __wur ; 438 #ifde __USE_XOPEN2K8 440 * $_l ( __um , __lo_t __l __THROW ; 446  $__bzo (* __s , size_t __n __THROW `__nnu ((1)); 448 #ifde __USE_MISC 450  $bcy (cڡ * __c , * __de , size_t __n ) 451 __THROW `__nnu ((1, 2)); 454  $bzo (* __s , size_t __n __THROW `__nnu ((1)); 457  $bcmp (cڡ * __s1 , cڡ * __s2 , size_t __n ) 458 __THROW __ibu_pu__ `__nnu ((1, 2)); 461 #ifde __CORRECT_ISO_CPP_STRING_H_PROTO 464 * `dex (* __s ,  __c ) 465 __THROW `__asm ("dex" __ibu_pu__ `__nnu ((1)); 466 cڡ * `dex (cڡ * __s ,  __c ) 467 __THROW `__asm ("dex" __ibu_pu__ `__nnu ((1)); 469 #i defed __OPTIMIZE__ && !defed __CORRECT_ISO_CPP_STRINGS_H_PROTO 470 __ex_ways_le * 471 `dex (* __s ,  __c __THROW 473  `__but_dex ( __s , __c ); 476 __ex_ways_le const * 477 `dex (cڡ * __s ,  __c __THROW 479  `__but_dex ( __s , __c ); 482 } } 484 * $dex (cڡ * __s ,  __c ) 485 __THROW __ibu_pu__ `__nnu ((1)); 489 #ifde __CORRECT_ISO_CPP_STRING_H_PROTO 492 * `rdex (* __s ,  __c ) 493 __THROW `__asm ("rdex" __ibu_pu__ `__nnu ((1)); 494 cڡ * `rdex (cڡ * __s ,  __c ) 495 __THROW `__asm ("rdex" __ibu_pu__ `__nnu ((1)); 497 #i defed __OPTIMIZE__ && !defed __CORRECT_ISO_CPP_STRINGS_H_PROTO 498 __ex_ways_le * 499 `rdex (* __s ,  __c __THROW 501  `__but_rdex ( __s , __c ); 504 __ex_ways_le const * 505 `rdex (cڡ * __s ,  __c __THROW 507  `__but_rdex ( __s , __c ); 510 } } 512 * $rdex (cڡ * __s ,  __c ) 513 __THROW __ibu_pu__ `__nnu ((1)); 518  $ffs ( __i __THROW `__ibu__ (( __cڡ__ )); 522 #ifdef __USE_GNU 523  $ff ( __l __THROW `__ibu__ (( __cڡ__ )); 524 __exnsi__  $ffl ( __ ) 525 __THROW `__ibu__ (( __cڡ__ )); 529  $rcmp (cڡ * __s1 , cڡ * __s2 ) 530 __THROW __ibu_pu__ `__nnu ((1, 2)); 533  $cmp (cڡ * __s1 , cڡ * __s2 , size_t __n ) 534 __THROW __ibu_pu__ `__nnu ((1, 2)); 537 #ifdef __USE_GNU 540  $rcmp_l (cڡ * __s1 , cڡ * __s2 , 541 __lo_t __loc ) 542 __THROW __ibu_pu__ `__nnu ((1, 2, 3)); 544  $cmp_l (cڡ * __s1 , cڡ * __s2 , 545 size_t __n , __lo_t __loc ) 546 __THROW __ibu_pu__ `__nnu ((1, 2, 4)); 549 #ifdef __USE_MISC 552 * $rp (** __ri __rgp , 553 cڡ * __ri __dim ) 554 __THROW `__nnu ((1, 2)); 557 #ifdef __USE_XOPEN2K8 559 * $rsigl ( __sig __THROW ; 562 * $__py (* __ri __de , cڡ *__ri __c ) 563 __THROW `__nnu ((1, 2)); 564 * $py (* __ri __de , cڡ *__ri __c ) 565 __THROW `__nnu ((1, 2)); 569 * $__y (* __ri __de , 570 cڡ * __ri __c , size_t __n ) 571 __THROW `__nnu ((1, 2)); 572 * $y (* __ri __de , 573 cڡ * __ri __c , size_t __n ) 574 __THROW `__nnu ((1, 2)); 577 #ifdef __USE_GNU 579  $rvscmp (cڡ * __s1 , cڡ * __s2 ) 580 __THROW __ibu_pu__ `__nnu ((1, 2)); 583 * $ry (* __rg __THROW `__nnu ((1)); 586 * $memob (* __s , size_t __n __THROW `__nnu ((1)); 588 #ide bame 593 #ifde __CORRECT_ISO_CPP_STRING_H_PROTO 594 "C++" * $bame (* __fame ) 595 __THROW `__asm ("bame" `__nnu ((1)); 596 "C++" cڡ * $bame (cڡ * __fame ) 597 __THROW `__asm ("bame" `__nnu ((1)); 599 * $bame (cڡ * __fame __THROW `__nnu ((1)); 605 #i defed __GNUC__ && __GNUC__ >= 2 606 #i defed __OPTIMIZE__ && !defed __OPTIMIZE_SIZE__ \ 607 && ! defed __NO_INLINE__ && !defed __lulus 627  ~ 630  ~ 633 #i __USE_FORTIFY_LEVEL > 0 && defed __ftify_funi 635  ~ 639 #i defed __USE_GNU && defed __OPTIMIZE__ \ 640 && defed __ex_ways_le && $__GNUC_PREREQ (3,2) 641 #i! defed _FORCE_INLINES && !defed _HAVE_STRING_ARCH_mempy 643 #unde mempy 644 #unde __mempy 645  #mempy ( de , c , n `__mempy_le (de, src,) ) 646  #__mempy ( de , c , n `__mempy_le (de, src,) ) 648 __ex_ways_le * 649 $__mempy_le (* __ri __de , 650 cڡ * __ri __c , size_t __n ) 652  (* `memy ( __de , __c , __n ) + __n; 653 } } 658 g__END_DECLS @/usr/include/sys/param.h 19 #ide _SYS_PARAM_H 20  #_SYS_PARAM_H 1 ) 22  #__ed_NULL ) 23  ~ 25  ~ 26  ~ 27  ~ 28  ~ 31  ~ 36  #NBBY CHAR_BIT ) 38 #i! defed NGROUPS && defed NGROUPS_MAX 39  #NGROUPS NGROUPS_MAX ) 41 #i! defed MAXSYMLINKS && defed SYMLOOP_MAX 42  #MAXSYMLINKS SYMLOOP_MAX ) 44 #i! defed CANBSIZ && defed MAX_CANON 45  #CANBSIZ MAX_CANON ) 47 #i! defed MAXPATHLEN && defed PATH_MAX 48  #MAXPATHLEN PATH_MAX ) 50 #i! defed NOFILE && defed OPEN_MAX 51  #NOFILE OPEN_MAX ) 53 #i! defed MAXHOSTNAMELEN && defed HOST_NAME_MAX 54  #MAXHOSTNAMELEN HOST_NAME_MAX ) 56 #ide NCARGS 57 #ifde ARG_MAX 58  #NCARGS ARG_MAX ) 62  #NCARGS INT_MAX ) 68 #ide NOGROUP 69  #NOGROUP 65535 ) 71 #ide NODEV 72  #NODEV (( dev_t -1 ) 77 #ide DEV_BSIZE 78  #DEV_BSIZE 512 ) 83  #tb ( a , i ()[(i)/ NBBY ] |1<<((i)%NBBY)) ) 84  #rb ( a , i ()[(i)/ NBBY ] &~(1<<((i)%NBBY))) ) 85  #ist ( a , i ()[(i)/ NBBY ] & (1<<((i)%NBBY))) ) 86  #isr ( a , i (()[(i)/ NBBY ] & (1<<((i)%NBBY))=0) ) 89 #ide howmy 90  #howmy ( x , y (((x+ ((y- 1)/ (y)) ) 92 #ifde __GNUC__ 93  #roundup ( x , y ( `__but_cڡt_p (y&& `powof2 (y) \ 94 ? ((( x + ( y ) - 1) & ~((y) - 1)) \ 95 : (((( x + (( y - 1)/ (y)* (y))) ) 97  #roundup ( x , y ((((x+ ((y- 1)/ (y)* (y)) ) 99  #powof2 ( x ((((x- 1& (x)=0) ) 102  #MIN ( a , b (()<(b))?):(b)) ) 103  #MAX ( a , b (()>(b))?):(b)) ) @/usr/include/sys/queue.h 32 #idef _SYS_QUEUE_H_ 33  #_SYS_QUEUE_H_ ) 84  #LIST_HEAD ( me , ty ) \ 85  sme { \ 86  ty * lh_f ; \ 87 } ) 89  #LIST_HEAD_INITIALIZER ( hd ) \ 90 { NULL } ) 92  #LIST_ENTRY ( ty ) \ 94  ty * _xt ; \ 95  ty ** _ev ; \ 96 } ) 101  #LIST_INIT ( hd ) do { \ 102 ( hd )-> lh_f = NULL ; \ 103 }  0) ) 105  #LIST_INSERT_AFTER ( lim , m , fld ) do { \ 106 i((( m )-> fld . _xt = ( lim )->fld._xt! NULL ) \ 107 ( lim )-> fld . _xt ->fld. _ev = \ 108 &( m )-> fld . _xt ; \ 109 ( lim )-> fld . _xt = ( m ); \ 110 ( m )-> fld . _ev = &( lim )->fld. _xt ; \ 111 }  0) ) 113  #LIST_INSERT_BEFORE ( lim , m , fld ) do { \ 114 ( m )-> fld . _ev = ( lim )->field.le_prev; \ 115 ( m )-> fld . _xt = ( lim ); \ 116 *( lim )-> fld . _ev = ( m ); \ 117 ( lim )-> fld . _ev = &( m )->fld. _xt ; \ 118 }  0) ) 120  #LIST_INSERT_HEAD ( hd , m , fld ) do { \ 121 i((( m )-> fld . _xt = ( hd )-> lh_f ! NULL ) \ 122 ( hd )-> lh_f -> fld . _ev = &( m )->fld. _xt ;\ 123 ( hd )-> lh_f = ( m ); \ 124 ( m )-> fld . _ev = &( hd )-> lh_f ; \ 125 }  0) ) 127  #LIST_REMOVE ( m , fld ) do { \ 128 i(( m )-> fld . _xt ! NULL ) \ 129 ( m )-> fld . _xt ->fld. _ev = \ 130 ( m )-> fld . _ev ; \ 131 *( m )-> fld . _ev = (m)->fld. _xt ; \ 132 }  0) ) 134  #LIST_FOREACH ( v , hd , fld ) \ 135 ( v (( hd )-> lh_f ); \ 136 ( v ); \ 137 ( v ((v)-> fld . _xt )) ) 142  #LIST_EMPTY ( hd ((hd)-> lh_f = NULL ) ) 143  #LIST_FIRST ( hd ((hd)-> lh_f ) ) 144  #LIST_NEXT ( m , fld (lm)->fld. _xt ) ) 150  #SLIST_HEAD ( me , ty ) \ 151  sme { \ 152  ty * h_f ; \ 153 } ) 155  #SLIST_HEAD_INITIALIZER ( hd ) \ 156 { NULL } ) 158  #SLIST_ENTRY ( ty ) \ 160  ty * e_xt ; \ 161 } ) 166  #SLIST_INIT ( hd ) do { \ 167 ( hd )-> h_f = NULL ; \ 168 }  0) ) 170  #SLIST_INSERT_AFTER ( im , m , fld ) do { \ 171 ( m )-> fld . e_xt = ( im )->field.sle_next; \ 172 ( im )-> fld . e_xt = ( m ); \ 173 }  0) ) 175  #SLIST_INSERT_HEAD ( hd , m , fld ) do { \ 176 ( m )-> fld . e_xt = ( hd )-> h_f ; \ 177 ( hd )-> h_f = ( m ); \ 178 }  0) ) 180  #SLIST_REMOVE_HEAD ( hd , fld ) do { \ 181 ( hd )-> h_f = (hd)->h_f-> fld . e_xt ; \ 182 }  0) ) 184  #SLIST_REMOVE ( hd , m , ty , fld ) do { \ 185 i(( hd )-> h_f =( m )) { \ 186 `SLIST_REMOVE_HEAD (( hd ), fld ); \ 189  ty * culm = ( hd )-> h_f ; \ 190  culm -> fld . e_xt !( m )) \ 191 culm = culm-> fld . e_xt ; \ 192 culm -> fld . e_xt = \ 193 culm -> fld . e_xt ->field.sle_next; \ 195 }  0) ) 197  #SLIST_FOREACH ( v , hd , fld ) \ 198 ( v ( hd )-> h_f ; (v); (v(v)-> fld . e_xt ) ) 203  #SLIST_EMPTY ( hd ((hd)-> h_f = NULL ) ) 204  #SLIST_FIRST ( hd ((hd)-> h_f ) ) 205  #SLIST_NEXT ( m , fld (lm)->fld. e_xt ) ) 211  #STAILQ_HEAD ( me , ty ) \ 212  sme { \ 213  ty * qh_f ; \ 214  ty ** qh_ϡ ; \ 215 } ) 217  #STAILQ_HEAD_INITIALIZER ( hd ) \ 218 { NULL , &( hd ). qh_f } ) 220  #STAILQ_ENTRY ( ty ) \ 222  ty * qe_xt ; \ 223 } ) 228  #STAILQ_INIT ( hd ) do { \ 229 ( hd )-> qh_f = NULL ; \ 230 ( hd )-> qh_ϡ = &(hd)-> qh_f ; \ 231 }  0) ) 233  #STAILQ_INSERT_HEAD ( hd , m , fld ) do { \ 234 i((( m )-> fld . qe_xt = ( hd )-> qh_f = NULL ) \ 235 ( hd )-> qh_ϡ = &( m )-> fld . qe_xt ; \ 236 ( hd )-> qh_f = ( m ); \ 237 }  0) ) 239  #STAILQ_INSERT_TAIL ( hd , m , fld ) do { \ 240 ( m )-> fld . qe_xt = NULL ; \ 241 *( hd )-> qh_ϡ = ( m ); \ 242 ( hd )-> qh_ϡ = &( m )-> fld . qe_xt ; \ 243 }  0) ) 245  #STAILQ_INSERT_AFTER ( hd , lim , m , fld ) do { \ 246 i((( m )-> fld . qe_xt = ( lim )->fld.qe_xt= NULL )\ 247 ( hd )-> qh_ϡ = &( m )-> fld . qe_xt ; \ 248 ( lim )-> fld . qe_xt = ( m ); \ 249 }  0) ) 251  #STAILQ_REMOVE_HEAD ( hd , fld ) do { \ 252 i((( hd )-> qh_f = (hd)->qh_f-> fld . qe_xt = NULL ) \ 253 ( hd )-> qh_ϡ = &(hd)-> qh_f ; \ 254 }  0) ) 256  #STAILQ_REMOVE ( hd , m , ty , fld ) do { \ 257 i(( hd )-> qh_f =( m )) { \ 258 `STAILQ_REMOVE_HEAD (( hd ), fld ); \ 260  ty * culm = ( hd )-> qh_f ; \ 261  culm -> fld . qe_xt !( m )) \ 262 culm = culm-> fld . qe_xt ; \ 263 i(( culm -> fld . qe_xt = \ 264 culm -> fld . qe_xt ->fld.qe_xt= NULL ) \ 265 ( hd )-> qh_ϡ = &( culm )-> fld . qe_xt ; \ 267 }  0) ) 269  #STAILQ_FOREACH ( v , hd , fld ) \ 270 ( v (( hd )-> qh_f ); \ 271 ( v ); \ 272 ( v ((v)-> fld . qe_xt )) ) 274  #STAILQ_CONCAT ( hd1 , hd2 ) do { \ 275 i(! `STAILQ_EMPTY (( hd2 ))) { \ 276 *( hd1 )-> qh_ϡ = ( hd2 )-> qh_f ; \ 277 ( hd1 )-> qh_ϡ = ( hd2 )->stqh_last; \ 278 `STAILQ_INIT (( hd2 )); \ 280 }  0) ) 285  #STAILQ_EMPTY ( hd ((hd)-> qh_f = NULL ) ) 286  #STAILQ_FIRST ( hd ((hd)-> qh_f ) ) 287  #STAILQ_NEXT ( m , fld (lm)->fld. qe_xt ) ) 293  #SIMPLEQ_HEAD ( me , ty ) \ 294  sme { \ 295  ty * sqh_f ; \ 296  ty ** sqh_ϡ ; \ 297 } ) 299  #SIMPLEQ_HEAD_INITIALIZER ( hd ) \ 300 { NULL , &( hd ). sqh_f } ) 302  #SIMPLEQ_ENTRY ( ty ) \ 304  ty * sqe_xt ; \ 305 } ) 310  #SIMPLEQ_INIT ( hd ) do { \ 311 ( hd )-> sqh_f = NULL ; \ 312 ( hd )-> sqh_ϡ = &(hd)-> sqh_f ; \ 313 }  0) ) 315  #SIMPLEQ_INSERT_HEAD ( hd , m , fld ) do { \ 316 i((( m )-> fld . sqe_xt = ( hd )-> sqh_f = NULL ) \ 317 ( hd )-> sqh_ϡ = &( m )-> fld . sqe_xt ; \ 318 ( hd )-> sqh_f = ( m ); \ 319 }  0) ) 321  #SIMPLEQ_INSERT_TAIL ( hd , m , fld ) do { \ 322 ( m )-> fld . sqe_xt = NULL ; \ 323 *( hd )-> sqh_ϡ = ( m ); \ 324 ( hd )-> sqh_ϡ = &( m )-> fld . sqe_xt ; \ 325 }  0) ) 327  #SIMPLEQ_INSERT_AFTER ( hd , lim , m , fld ) do { \ 328 i((( m )-> fld . sqe_xt = ( lim )->fld.sqe_xt= NULL )\ 329 ( hd )-> sqh_ϡ = &( m )-> fld . sqe_xt ; \ 330 ( lim )-> fld . sqe_xt = ( m ); \ 331 }  0) ) 333  #SIMPLEQ_REMOVE_HEAD ( hd , fld ) do { \ 334 i((( hd )-> sqh_f = (hd)->sqh_f-> fld . sqe_xt = NULL ) \ 335 ( hd )-> sqh_ϡ = &(hd)-> sqh_f ; \ 336 }  0) ) 338  #SIMPLEQ_REMOVE ( hd , m , ty , fld ) do { \ 339 i(( hd )-> sqh_f =( m )) { \ 340 `SIMPLEQ_REMOVE_HEAD (( hd ), fld ); \ 342  ty * culm = ( hd )-> sqh_f ; \ 343  culm -> fld . sqe_xt !( m )) \ 344 culm = culm-> fld . sqe_xt ; \ 345 i(( culm -> fld . sqe_xt = \ 346 culm -> fld . sqe_xt ->fld.sqe_xt= NULL ) \ 347 ( hd )-> sqh_ϡ = &( culm )-> fld . sqe_xt ; \ 349 }  0) ) 351  #SIMPLEQ_FOREACH ( v , hd , fld ) \ 352 ( v (( hd )-> sqh_f ); \ 353 ( v ); \ 354 ( v ((v)-> fld . sqe_xt )) ) 359  #SIMPLEQ_EMPTY ( hd ((hd)-> sqh_f = NULL ) ) 360  #SIMPLEQ_FIRST ( hd ((hd)-> sqh_f ) ) 361  #SIMPLEQ_NEXT ( m , fld (lm)->fld. sqe_xt ) ) 367  #_TAILQ_HEAD ( me , ty , qu ) \ 368  sme { \ 369 qu ty * tqh_f ; \ 370 qu ty *qu * tqh_ϡ ; \ 371 } ) 372  #TAILQ_HEAD ( me , ty `_TAILQ_HEAD ame, ty,) ) 374  #TAILQ_HEAD_INITIALIZER ( hd ) \ 375 { NULL , &( hd ). tqh_f } ) 377  #_TAILQ_ENTRY ( ty , qu ) \ 379 qu ty * tqe_xt ; \ 380 qu ty *qu * tqe_ev ; \ 381 } ) 382  #TAILQ_ENTRY ( ty `_TAILQ_ENTRY (ty,) ) 387  #TAILQ_INIT ( hd ) do { \ 388 ( hd )-> tqh_f = NULL ; \ 389 ( hd )-> tqh_ϡ = &(hd)-> tqh_f ; \ 390 }  0) ) 392  #TAILQ_INSERT_HEAD ( hd , m , fld ) do { \ 393 i((( m )-> fld . tqe_xt = ( hd )-> tqh_f ! NULL ) \ 394 ( hd )-> tqh_f -> fld . tqe_ev = \ 395 &( m )-> fld . tqe_xt ; \ 397 ( hd )-> tqh_ϡ = &( m )-> fld . tqe_xt ; \ 398 ( hd )-> tqh_f = ( m ); \ 399 ( m )-> fld . tqe_ev = &( hd )-> tqh_f ; \ 400 }  0) ) 402  #TAILQ_INSERT_TAIL ( hd , m , fld ) do { \ 403 ( m )-> fld . tqe_xt = NULL ; \ 404 ( m )-> fld . tqe_ev = ( hd )-> tqh_ϡ ; \ 405 *( hd )-> tqh_ϡ = ( m ); \ 406 ( hd )-> tqh_ϡ = &( m )-> fld . tqe_xt ; \ 407 }  0) ) 409  #TAILQ_INSERT_AFTER ( hd , lim , m , fld ) do { \ 410 i((( m )-> fld . tqe_xt = ( lim )->fld.tqe_xt! NULL )\ 411 ( m )-> fld . tqe_xt ->fld. tqe_ev = \ 412 &( m )-> fld . tqe_xt ; \ 414 ( hd )-> tqh_ϡ = &( m )-> fld . tqe_xt ; \ 415 ( lim )-> fld . tqe_xt = ( m ); \ 416 ( m )-> fld . tqe_ev = &( lim )->fld. tqe_xt ; \ 417 }  0) ) 419  #TAILQ_INSERT_BEFORE ( lim , m , fld ) do { \ 420 ( m )-> fld . tqe_ev = ( lim )->field.tqe_prev; \ 421 ( m )-> fld . tqe_xt = ( lim ); \ 422 *( lim )-> fld . tqe_ev = ( m ); \ 423 ( lim )-> fld . tqe_ev = &( m )->fld. tqe_xt ; \ 424 }  0) ) 426  #TAILQ_REMOVE ( hd , m , fld ) do { \ 427 i((( m )-> fld . tqe_xt ! NULL ) \ 428 ( m )-> fld . tqe_xt ->fld. tqe_ev = \ 429 ( m )-> fld . tqe_ev ; \ 431 ( hd )-> tqh_ϡ = ( m )-> fld . tqe_ev ; \ 432 *( m )-> fld . tqe_ev = (m)->fld. tqe_xt ; \ 433 }  0) ) 435  #TAILQ_FOREACH ( v , hd , fld ) \ 436 ( v (( hd )-> tqh_f ); \ 437 ( v ); \ 438 ( v ((v)-> fld . tqe_xt )) ) 440  #TAILQ_FOREACH_REVERSE ( v , hd , hdme , fld ) \ 441 ( v (*((( hdme *)(( hd )-> tqh_ϡ ))->tqh_last)); \ 442 ( v ); \ 443 ( v (*((( hdme *)((v)-> fld . tqe_ev ))-> tqh_ϡ ))) ) 445  #TAILQ_CONCAT ( hd1 , hd2 , fld ) do { \ 446 i(! `TAILQ_EMPTY ( hd2 )) { \ 447 *( hd1 )-> tqh_ϡ = ( hd2 )-> tqh_f ; \ 448 ( hd2 )-> tqh_f -> fld . tqe_ev = ( hd1 )-> tqh_ϡ ; \ 449 ( hd1 )-> tqh_ϡ = ( hd2 )->tqh_last; \ 450 `TAILQ_INIT (( hd2 )); \ 452 }  0) ) 457  #TAILQ_EMPTY ( hd ((hd)-> tqh_f = NULL ) ) 458  #TAILQ_FIRST ( hd ((hd)-> tqh_f ) ) 459  #TAILQ_NEXT ( m , fld (lm)->fld. tqe_xt ) ) 461  #TAILQ_LAST ( hd , hdme ) \ 462 (*((( hdme *)(( hd )-> tqh_ϡ ))->tqh_ϡ)) ) 463  #TAILQ_PREV ( m , hdme , fld ) \ 464 (*((( hdme *)(( m )-> fld . tqe_ev ))-> tqh_ϡ )) ) 470  #CIRCLEQ_HEAD ( me , ty ) \ 471  sme { \ 472  ty * cqh_f ; \ 473  ty * cqh_ϡ ; \ 474 } ) 476  #CIRCLEQ_HEAD_INITIALIZER ( hd ) \ 477 { (*)& hd , (*)&hd } ) 479  #CIRCLEQ_ENTRY ( ty ) \ 481  ty * cqe_xt ; \ 482  ty * cqe_ev ; \ 483 } ) 488  #CIRCLEQ_INIT ( hd ) do { \ 489 ( hd )-> cqh_f = (*)(head); \ 490 ( hd )-> cqh_ϡ = (*)(head); \ 491 }  0) ) 493  #CIRCLEQ_INSERT_AFTER ( hd , lim , m , fld ) do { \ 494 ( m )-> fld . cqe_xt = ( lim )->field.cqe_next; \ 495 ( m )-> fld . cqe_ev = ( lim ); \ 496 i(( lim )-> fld . cqe_xt =(*)( hd )) \ 497 ( hd )-> cqh_ϡ = ( m ); \ 499 ( lim )-> fld . cqe_xt ->fld. cqe_ev = ( m ); \ 500 ( lim )-> fld . cqe_xt = ( m ); \ 501 }  0) ) 503  #CIRCLEQ_INSERT_BEFORE ( hd , lim , m , fld ) do { \ 504 ( m )-> fld . cqe_xt = ( lim ); \ 505 ( m )-> fld . cqe_ev = ( lim )->field.cqe_prev; \ 506 i(( lim )-> fld . cqe_ev =(*)( hd )) \ 507 ( hd )-> cqh_f = ( m ); \ 509 ( lim )-> fld . cqe_ev ->fld. cqe_xt = ( m ); \ 510 ( lim )-> fld . cqe_ev = ( m ); \ 511 }  0) ) 513  #CIRCLEQ_INSERT_HEAD ( hd , m , fld ) do { \ 514 ( m )-> fld . cqe_xt = ( hd )-> cqh_f ; \ 515 ( m )-> fld . cqe_ev = (*)( hd ); \ 516 i(( hd )-> cqh_ϡ == (*)(head)) \ 517 ( hd )-> cqh_ϡ = ( m ); \ 519 ( hd )-> cqh_f -> fld . cqe_ev = ( m ); \ 520 ( hd )-> cqh_f = ( m ); \ 521 }  0) ) 523  #CIRCLEQ_INSERT_TAIL ( hd , m , fld ) do { \ 524 ( m )-> fld . cqe_xt = (*)( hd ); \ 525 ( m )-> fld . cqe_ev = ( hd )-> cqh_ϡ ; \ 526 i(( hd )-> cqh_f == (*)(head)) \ 527 ( hd )-> cqh_f = ( m ); \ 529 ( hd )-> cqh_ϡ -> fld . cqe_xt = ( m ); \ 530 ( hd )-> cqh_ϡ = ( m ); \ 531 }  0) ) 533  #CIRCLEQ_REMOVE ( hd , m , fld ) do { \ 534 i(( m )-> fld . cqe_xt =(*)( hd )) \ 535 ( hd )-> cqh_ϡ = ( m )-> fld . cqe_ev ; \ 537 ( m )-> fld . cqe_xt ->fld. cqe_ev = \ 538 ( m )-> fld . cqe_ev ; \ 539 i(( m )-> fld . cqe_ev =(*)( hd )) \ 540 ( hd )-> cqh_f = ( m )-> fld . cqe_xt ; \ 542 ( m )-> fld . cqe_ev ->fld. cqe_xt = \ 543 ( m )-> fld . cqe_xt ; \ 544 }  0) ) 546  #CIRCLEQ_FOREACH ( v , hd , fld ) \ 547 ( v (( hd )-> cqh_f ); \ 548 ( v !(cڡ *)( hd ); \ 549 ( v ((v)-> fld . cqe_xt )) ) 551  #CIRCLEQ_FOREACH_REVERSE ( v , hd , fld ) \ 552 ( v (( hd )-> cqh_ϡ ); \ 553 ( v !(cڡ *)( hd ); \ 554 ( v ((v)-> fld . cqe_ev )) ) 559  #CIRCLEQ_EMPTY ( hd ((hd)-> cqh_f =(*)(hd)) ) 560  #CIRCLEQ_FIRST ( hd ((hd)-> cqh_f ) ) 561  #CIRCLEQ_LAST ( hd ((hd)-> cqh_ϡ ) ) 562  #CIRCLEQ_NEXT ( m , fld (lm)->fld. cqe_xt ) ) 563  #CIRCLEQ_PREV ( m , fld (lm)->fld. cqe_ev ) ) 565  #CIRCLEQ_LOOP_NEXT ( hd , m , fld ) \ 566 ((( m )-> fld . cqe_xt =(*)( hd )) \ 567 ? (( hd )-> cqh_f ) \ 568 : ( m -> fld . cqe_xt )) ) 569  #CIRCLEQ_LOOP_PREV ( hd , m , fld ) \ 570 ((( m )-> fld . cqe_ev =(*)( hd )) \ 571 ? (( hd )-> cqh_ϡ ) \ 572 : ( m -> fld . cqe_ev )) ) @/usr/include/sys/socket.h 19 #idef _SYS_SOCKET_H 20  #_SYS_SOCKET_H 1 ) 22  ~ 24 g__BEGIN_DECLS 26  ~ 27  #__ed_size_t ) 28  ~ 29 #ifde __USE_GNU 31  ~ 38  ~ 40 #ifde __USE_MISC 43  sosockaddr 45  m_my ; 46  m_da [14]; 54 mSHUT_RD = 0, 55  #SHUT_RD SHUT_RD ) 56 mSHUT_WR , 57  #SHUT_WR SHUT_WR ) 58 mSHUT_RDWR 59  #SHUT_RDWR SHUT_RDWR ) 68 #i defed __lulus || ! __GNUC_PREREQ (2, 7|| !defed __USE_GNU 69  #__SOCKADDR_ARG  sockaddr * __ri ) 70  #__CONST_SOCKADDR_ARG cڡ  sockaddr * ) 74  #__SOCKADDR_ALLTYPES \ 75 `__SOCKADDR_ONETYPE ( sockaddr ) \ 76 `__SOCKADDR_ONETYPE ( sockaddr_ ) \ 77 `__SOCKADDR_ONETYPE ( sockaddr_ax25 ) \ 78 `__SOCKADDR_ONETYPE ( sockaddr_dl ) \ 79 `__SOCKADDR_ONETYPE ( sockaddr_e ) \ 80 `__SOCKADDR_ONETYPE ( sockaddr_ ) \ 81 `__SOCKADDR_ONETYPE ( sockaddr_6 ) \ 82 `__SOCKADDR_ONETYPE ( sockaddr_p ) \ 83 `__SOCKADDR_ONETYPE ( sockaddr_x ) \ 84 `__SOCKADDR_ONETYPE ( sockaddr_iso ) \ 85 `__SOCKADDR_ONETYPE ( sockaddr_ns ) \ 86 `__SOCKADDR_ONETYPE ( sockaddr_un ) \ 87 `__SOCKADDR_ONETYPE ( sockaddr_x25 ) ) 89  #__SOCKADDR_ONETYPE ( ty ty * __ri __ ##ty##__; ) 90 uni { m__SOCKADDR_ALLTYPES 91 } t__SOCKADDR_ARG t__ibu__ (( t__t_uni__ )); 92 #unde __SOCKADDR_ONETYPE 93  #__SOCKADDR_ONETYPE ( ty cڡ ty * __ri __ ##ty##__; ) 94 uni { m__SOCKADDR_ALLTYPES 95 } t__CONST_SOCKADDR_ARG t__ibu__ (( t__t_uni__ )); 96 #unde __SOCKADDR_ONETYPE 99 #ifde __USE_GNU 101  smmsghdr 103  msghdr mmsg_hdr ; 104  mmsg_n ; 113  $sock ( __doma ,  __ty ,  __oc __THROW ; 119  $sock ( __doma ,  __ty ,  __oc , 120  __fds [2] __THROW ; 123  $bd ( __fd , __CONST_SOCKADDR_ARG __addr , sockn_t __n ) 124 __THROW ; 127  $gsockme ( __fd , __SOCKADDR_ARG __addr , 128 sockn_t * __ri __n __THROW ; 137  `c ( __fd , __CONST_SOCKADDR_ARG __addr , sockn_t __n ); 141  $gme ( __fd , __SOCKADDR_ARG __addr , 142 sockn_t * __ri __n __THROW ; 149 ssize_t `nd ( __fd , cڡ * __buf , size_t __n ,  __ags ); 156 ssize_t `cv ( __fd , * __buf , size_t __n ,  __ags ); 163 ssize_t `ndto ( __fd , cڡ * __buf , size_t __n , 164  __ags , __CONST_SOCKADDR_ARG __addr , 165 sockn_t __addr_n ); 174 ssize_t `cvom ( __fd , * __ri __buf , size_t __n , 175  __ags , __SOCKADDR_ARG __addr , 176 sockn_t * __ri __addr_n ); 184 ssize_t `ndmsg ( __fd , cڡ  msghdr * __mesge , 185  __ags ); 187 #ifde __USE_GNU 193  `ndmmsg ( __fd ,  mmsghdr * __vmesges , 194  __vn ,  __ags ); 202 ssize_t `cvmsg ( __fd ,  msghdr * __mesge ,  __ags ); 204 #ifde __USE_GNU 210  `cvmmsg ( __fd ,  mmsghdr * __vmesges , 211  __vn ,  __ags , 212  timeec * __tmo ); 219  $gsockt ( __fd ,  __v ,  __݊ame , 220 * __ri __tv , 221 sockn_t * __ri __ݎ __THROW ; 226  $tsockt ( __fd ,  __v ,  __݊ame , 227 cڡ * __tv , sockn_t __ݎ __THROW ; 233  $li ( __fd ,  __n __THROW ; 243  `ac ( __fd , __SOCKADDR_ARG __addr , 244 sockn_t * __ri __addr_n ); 246 #ifde __USE_GNU 251  `ac4 ( __fd , __SOCKADDR_ARG __addr , 252 sockn_t * __ri __addr_n ,  __ags ); 261  $shutdown ( __fd ,  __how __THROW ; 264 #ifde __USE_XOPEN2K 266  $sockmk ( __fd __THROW ; 270 #ifde __USE_MISC 274  $isfdty ( __fd ,  __fdty __THROW ; 279 #i __USE_FORTIFY_LEVEL > 0 && defed __ftify_funi 280  ~ 283 __END_DECLS @/usr/include/sys/types.h 22 #idef _SYS_TYPES_H 23  #_SYS_TYPES_H 1 ) 25  ~ 27 g__BEGIN_DECLS 29  ~ 31 #ifdef __USE_MISC 32 #ide __u_ch_defed 33  __u_ch tu_ch ; 34  __u_sht tu_sht ; 35  __u_t tu_t ; 36  __u_lg tu_lg ; 37  __quad_t tquad_t ; 38  __u_quad_t tu_quad_t ; 39  __fsid_t tfsid_t ; 40  #__u_ch_defed ) 44  __loff_t tloff_t ; 46 #ide __o_t_defed 47 #ide __USE_FILE_OFFSET64 48  __o_t to_t ; 50  __o64_t to_t ; 52  #__o_t_defed ) 54 #i defed __USE_LARGEFILE64 && !defed __o64_t_defed 55  __o64_t to64_t ; 56  #__o64_t_defed ) 59 #ide __dev_t_defed 60  __dev_t tdev_t ; 61  #__dev_t_defed ) 64 #ide __gid_t_defed 65  __gid_t tgid_t ; 66  #__gid_t_defed ) 69 #ide __mode_t_defed 70  __mode_t tmode_t ; 71  #__mode_t_defed ) 74 #ide __ƚk_t_defed 75  __ƚk_t tƚk_t ; 76  #__ƚk_t_defed ) 79 #ide __uid_t_defed 80  __uid_t tuid_t ; 81  #__uid_t_defed ) 84 #ide __off_t_defed 85 #ide __USE_FILE_OFFSET64 86  __off_t toff_t ; 88  __off64_t toff_t ; 90  #__off_t_defed ) 92 #i defed __USE_LARGEFILE64 && !defed __off64_t_defed 93  __off64_t toff64_t ; 94  #__off64_t_defed ) 97 #ide __pid_t_defed 98  __pid_t tpid_t ; 99  #__pid_t_defed ) 102 #i( defed __USE_XOPEN || defed __USE_XOPEN2K8 ) \ 103 && ! defed __id_t_defed 104  __id_t tid_t ; 105  #__id_t_defed ) 108 #ide __ssize_t_defed 109  __ssize_t tssize_t ; 110  #__ssize_t_defed ) 113 #ifdef __USE_MISC 114 #ide __daddr_t_defed 115  __daddr_t tdaddr_t ; 116  __ddr_t tddr_t ; 117  #__daddr_t_defed ) 121 #i( defed __USE_MISC || defed __USE_XOPEN && !defed __key_t_defed 122  __key_t tkey_t ; 123  #__key_t_defed ) 126 #i defed __USE_XOPEN || defed __USE_XOPEN2K8 127  #__ed_ock_t ) 129  #__ed_time_t ) 130  #__ed_tim_t ) 131  #__ed_ockid_t ) 132  ~ 134 #ifde __USE_XOPEN 135 #ide __ucds_t_defed 136  __ucds_t tucds_t ; 137  #__ucds_t_defed ) 139 #ide __sucds_t_defed 140  __sucds_t tsucds_t ; 141  #__sucds_t_defed ) 145  #__ed_size_t ) 146  ~ 148 #ifde __USE_MISC 150  tulg ; 151  tusht ; 152  tut ; 157 #i! __GNUC_PREREQ (2, 7) 160 #ide __t8_t_defed 161  #__t8_t_defed ) 162  tt8_t ; 163  tt16_t ; 164  tt32_t ; 165 #i __WORDSIZE == 64 166  tt64_t ; 168 __exnsi__  tt64_t ; 173  tu_t8_t ; 174  tu_t16_t ; 175  tu_t32_t ; 176 #i __WORDSIZE == 64 177  tu_t64_t ; 179 __exnsi__  tu_t64_t ; 182  tgi_t ; 187  #__tN_t ( N , MODE ) \ 188 ## tN ## t_t t__ibu__ (( t__mode__ ( tMODE ))) ) 189  t__u_tN_t ( tN , tMODE ) \ 190  tu_t ## tN ## t_t t__ibu__ (( t__mode__ ( tMODE ))) ) 192 #ide t__t8_t_defed 193  t__t8_t_defed ) 194 t__tN_t (8, t__QI__ ); 195 __tN_t (16, __HI__ ); 196 __tN_t (32, __SI__ ); 197 __tN_t (64, __DI__ ); 200 __u_tN_t (8, __QI__ ); 201 __u_tN_t (16, __HI__ ); 202 __u_tN_t (32, __SI__ ); 203 __u_tN_t (64, __DI__ ); 205  tgi_t t__ibu__ (( t__mode__ ( t__wd__ ))); 211  #__BIT_TYPES_DEFINED__ 1 ) 214 #ifdef __USE_MISC 216  ~ 219  ~ 222  ~ 226 #i( defed __USE_UNIX98 || defed __USE_XOPEN2K8 ) \ 227 && ! defed __blksize_t_defed 228  __blksize_t tblksize_t ; 229  #__blksize_t_defed ) 233 #ide __USE_FILE_OFFSET64 234 #ide __blkt_t_defed 235  __blkt_t tblkt_t ; 236  #__blkt_t_defed ) 238 #ide __fsblkt_t_defed 239  __fsblkt_t tfsblkt_t ; 240  #__fsblkt_t_defed ) 242 #ide __fsft_t_defed 243  __fsft_t tfsft_t ; 244  #__fsft_t_defed ) 247 #ide __blkt_t_defed 248  __blkt64_t tblkt_t ; 249  #__blkt_t_defed ) 251 #ide __fsblkt_t_defed 252  __fsblkt64_t tfsblkt_t ; 253  #__fsblkt_t_defed ) 255 #ide __fsft_t_defed 256  __fsft64_t tfsft_t ; 257  #__fsft_t_defed ) 261 #ifde __USE_LARGEFILE64 262  __blkt64_t tblkt64_t ; 263  __fsblkt64_t tfsblkt64_t ; 264  __fsft64_t tfsft64_t ; 269 #i defed __USE_POSIX199506 || defed __USE_UNIX98 270  ~ 273 g__END_DECLS @/usr/include/sys/wait.h 22 #idef _SYS_WAIT_H 23  #_SYS_WAIT_H 1 ) 25  ~ 27 g__BEGIN_DECLS 29  ~ 32 #i! defed _STDLIB_H || (!defed __USE_XOPEN && !defed __USE_XOPEN2K8 ) 35  ~ 37 #ifdef __USE_MISC 42 #i defed __GNUC__ && !defed __lulus 43  #__WAIT_INT ( us ) \ 44 ( `__exnsi__ (((uni { `__tyof ( us __ ;  __i ; }) \ 45 { . __ = ( us }). __i )) ) 47  #__WAIT_INT ( us (*(cڡ *&(us)) ) 55 #i! defed __GNUC__ || __GNUC__ < 2 || defed __lulus 56  #__WAIT_STATUS * ) 57  #__WAIT_STATUS_DEFN * ) 62  wa * m__ur ; 63 * m__ ; 64 } t__WAIT_STATUS t__ibu__ (( t__t_uni__ )); 65  #__WAIT_STATUS_DEFN * ) 70  #__WAIT_INT ( us (us) ) 71  #__WAIT_STATUS * ) 72  #__WAIT_STATUS_DEFN * ) 77  ~ 79  #WEXITSTATUS ( us `__WEXITSTATUS ( `__WAIT_INT (us)) ) 80  #WTERMSIG ( us `__WTERMSIG ( `__WAIT_INT (us)) ) 81  #WSTOPSIG ( us `__WSTOPSIG ( `__WAIT_INT (us)) ) 82  #WIFEXITED ( us `__WIFEXITED ( `__WAIT_INT (us)) ) 83  #WIFSIGNALED ( us `__WIFSIGNALED ( `__WAIT_INT (us)) ) 84  #WIFSTOPPED ( us `__WIFSTOPPED ( `__WAIT_INT (us)) ) 85 #ifde __WIFCONTINUED 86  #WIFCONTINUED ( us `__WIFCONTINUED ( `__WAIT_INT (us)) ) 90 #ifdef __USE_MISC 91  #WCOREFLAG __WCOREFLAG ) 92  #WCOREDUMP ( us `__WCOREDUMP ( `__WAIT_INT (us)) ) 93  #W_EXITCODE ( t , sig `__W_EXITCODE (t, sig) ) 94  #W_STOPCODE ( sig `__W_STOPCODE (sig) ) 102 __pid_t wa ( __WAIT_STATUS ___loc ); 104 #ifdef __USE_MISC 106  #WAIT_ANY (-1 ) 107  #WAIT_MYPGRP 0 ) 125 __pid_t wapid (__pid_ __pid , * ___loc ,  __tis ); 127 #i defed __USE_XOPEN || defed __USE_XOPEN2K8 128 #ide __id_t_defed 129  ~ 130  __id_t tid_t ; 131  #__id_t_defed ) 134  #__ed_sigfo_t ) 135  ~ 148  waid ( idty_t __idty , __id_t __id , sigfo_t * __f , 149  __tis ); 152 #i defed __USE_MISC || defed __USE_XOPEN_EXTENDED 155  gruge ; 162 __pid_t $wa3 ( __WAIT_STATUS ___loc ,  __tis , 163  ruge * __uge __THROWNL ; 166 #ifde __USE_MISC 168 __pid_t $wa4 ( __pid_t __pid , __WAIT_STATUS ___loc ,  __tis , 169  ruge * __uge __THROWNL ; 173 __END_DECLS @/usr/include/time.h 22 #idef _TIME_H 24 #i(! defed __ed_time_t && !defed __ed_ock_t && \ 25 ! defed g__ed_timeec ) 26  #_TIME_H 1 ) 27  ~ 29 g__BEGIN_DECLS 33 #ifdef _TIME_H 35  #__ed_size_t ) 36  #__ed_NULL ) 37  ~ 41  ~ 44 #i! defed __STRICT_ANSI__ && !defed __USE_XOPEN2K 45 #ide CLK_TCK 46  #CLK_TCK CLOCKS_PER_SEC ) 52 #i! defed __ock_t_defed && (defed _TIME_H || defed __ed_ock_t ) 53  #__ock_t_defed 1 ) 55  ~ 57 __BEGIN_NAMESPACE_STD 59  __ock_t tock_t ; 60 g__END_NAMESPACE_STD 61 #i defed __USE_XOPEN || defed __USE_POSIX 62 $__USING_NAMESPACE_STD ( ock_t ) 66 #unde __ed_ock_t 68 #i! defed __time_t_defed && (defed _TIME_H || defed __ed_time_t ) 69  #__time_t_defed 1 ) 71  ~ 73 __BEGIN_NAMESPACE_STD 75  __time_t ttime_t ; 76 __END_NAMESPACE_STD 77 #ifde __USE_POSIX 78 $__USING_NAMESPACE_STD ( time_t ) 82 #unde __ed_time_t 84 #i! defed __ockid_t_defed && \ 85 (( defed _TIME_H && defed __USE_POSIX199309 || defed __ed_ockid_t ) 86  #__ockid_t_defed 1 ) 88  ~ 91  __ockid_t tockid_t ; 94 #unde __ockid_time_t 96 #i! defed __tim_t_defed && \ 97 (( defed _TIME_H && defed __USE_POSIX199309 || defed __ed_tim_t ) 98  #__tim_t_defed 1 ) 100  ~ 103  __tim_t ttim_t ; 106 #unde __ed_tim_t 109 #i(! defed __timeec_defed \ 110 && (( defed _TIME_H \ 111 && ( defed __USE_POSIX199309 \ 112 || defed __USE_ISOC11 )) \ 113 || defed __ed_timeec )) 114  #__timeec_defed 1 ) 116  ~ 120  stimeec 122 __time_t tv_c ; 123 __sys_g_t tv_nc ; 127 #unde __ed_timeec 130 #ifdef _TIME_H 131 __BEGIN_NAMESPACE_STD 133  stm 135  tm_c ; 136  tm_m ; 137  tm_hour ; 138  tm_mday ; 139  tm_m ; 140  tm_yr ; 141  tm_wday ; 142  tm_yday ; 143  tm_isd ; 145 #ifdef __USE_MISC 146  tm_gmtoff ; 147 cڡ * tm_ze ; 149  __tm_gmtoff ; 150 cڡ * __tm_ze ; 153 __END_NAMESPACE_STD 154 #i defed __USE_XOPEN || defed __USE_POSIX 155 $__USING_NAMESPACE_STD ( tm ) 159 #ifde __USE_POSIX199309 161  simec 163  timeec _rv ; 164  timeec _vue ; 168  sigevt ; 172 #ifde __USE_XOPEN2K 173 #ide __pid_t_defed 174  __pid_t tpid_t ; 175  #__pid_t_defed ) 180 #ifde __USE_ISOC11 182  #TIME_UTC 1 ) 186 __BEGIN_NAMESPACE_STD 189 ock_t $ock ( __THROW ; 192 time_t $time ( time_t * __tim __THROW ; 195  $difime ( time_t __time1 ,ime_ __time0 ) 196 __THROW `__ibu__ (( __cڡ__ )); 199 time_t $mktime ( tm * __ __THROW ; 205 size_t $rime (* __ri __s , size_t __maxsize , 206 cڡ * __ri __fm , 207 cڡ  tm * __ri __ __THROW ; 208 __END_NAMESPACE_STD 210 #ifde __USE_XOPEN 213 * $time (cڡ * __ri __s , 214 cڡ * __ri __fmt ,  tm * __ ) 215 __THROW ; 218 #ifde __USE_XOPEN2K8 221  ~ 223 size_t $rime_l (* __ri __s , size_t __maxsize , 224 cڡ * __ri __fm , 225 cڡ  tm * __ri __ , 226 __lo_t __loc __THROW ; 229 #ifde __USE_GNU 230 * $time_l (cڡ * __ri __s , 231 cڡ * __ri __fmt ,  tm * __ , 232 __lo_t __loc __THROW ; 236 __BEGIN_NAMESPACE_STD 239  tm * $gmtime (cڡ time_t * __tim __THROW ; 243  tm * $loime (cڡ time_t * __tim __THROW ; 244 __END_NAMESPACE_STD 246 #ifde __USE_POSIX 249  tm * $gmtime_r (cڡ time_t * __ri __tim , 250  tm * __ri __ __THROW ; 254  tm * $loime_r (cڡ time_t * __ri __tim , 255  tm * __ri __ __THROW ; 258 __BEGIN_NAMESPACE_STD 261 * $asime (cڡ  tm * __ __THROW ; 264 * $ime (cڡ time_t * __tim __THROW ; 265 __END_NAMESPACE_STD 267 #ifde __USE_POSIX 272 * $asime_r (cڡ  tm * __ri __ , 273 * __ri __buf __THROW ; 276 * $ime_r (cڡ time_t * __ri __tim , 277 * __ri __buf __THROW ; 282 * __tzme [2]; 283  __daylight ; 284  __timeze ; 287 #ifdef __USE_POSIX 289 * tzme [2]; 293  $tzt ( __THROW ; 296 #i defed __USE_MISC || defed __USE_XOPEN 297  daylight ; 298  timeze ; 301 #ifde __USE_MISC 304  $ime (cڡ time_t * __wh __THROW ; 310  #__ip ( yr ) \ 311 (( yr % 4 =0 && ((yr% 100 !0 || (yr% 400 =0)) ) 314 #ifde __USE_MISC 319 time_t $timegm ( tm * __ __THROW ; 322 time_t $timol ( tm * __ __THROW ; 325  $dysize ( __yr __THROW `__ibu__ (( __cڡ__ )); 329 #ifde __USE_POSIX199309 334  `nop (cڡ  timeec * __queed_time , 335  timeec * __mag ); 339  $ock_gs ( ockid_t __ock_id ,  timeec * __s __THROW ; 342  $ock_gtime ( ockid_t __ock_id ,  timeec * __ __THROW ; 345  $ock_ime ( ockid_t __ock_id , cڡ  timeec * __ ) 346 __THROW ; 348 #ifde __USE_XOPEN2K 353  `ock_nop ( ockid_t __ock_id ,  __ags , 354 cڡ  timeec * __q , 355  timeec * __m ); 358  $ock_guockid ( pid_t __pid , ockid_t * __ock_id __THROW ; 363  $tim_ ( ockid_t __ock_id , 364  sigevt * __ri __evp , 365 tim_t * __ri __timid __THROW ; 368  $tim_de ( tim_t __timid __THROW ; 371  $tim_ime ( tim_t __timid ,  __ags , 372 cڡ  imec * __ri __vue , 373  imec * __ri __ovue __THROW ; 376  $tim_gtime ( tim_t __timid ,  imec * __vue ) 377 __THROW ; 380  $tim_govrun ( tim_t __timid __THROW ; 384 #ifde __USE_ISOC11 386  $timeec_g ( timeec * __ts ,  __ba ) 387 __THROW `__nnu ((1)); 391 #ifde __USE_XOPEN_EXTENDED 403  gde_r ; 412  tm * `gde (cڡ * __rg ); 415 #ifde __USE_GNU 426  `gde_r (cڡ * __ri __rg , 427  tm * __ri __sbu ); 430 __END_DECLS @/usr/include/unistd.h 22 #idef _UNISTD_H 23  #_UNISTD_H 1 ) 25  ~ 27 g__BEGIN_DECLS 32 #ifde __USE_XOPEN2K8 34  #_POSIX_VERSION 200809L ) 35 #i defed __USE_XOPEN2K 37  #_POSIX_VERSION 200112L ) 38 #i defed __USE_POSIX199506 40  #_POSIX_VERSION 199506L ) 41 #i defed __USE_POSIX199309 43  #_POSIX_VERSION 199309L ) 46  #_POSIX_VERSION 199009L ) 52 #ifde __USE_XOPEN2K8 53  #__POSIX2_THIS_VERSION 200809L ) 55 #i defed __USE_XOPEN2K 57  #__POSIX2_THIS_VERSION 200112L ) 58 #i defed __USE_POSIX199506 60  #__POSIX2_THIS_VERSION 199506L ) 63  #__POSIX2_THIS_VERSION 199209L ) 67  #_POSIX2_VERSION __POSIX2_THIS_VERSION ) 70  #_POSIX2_C_VERSION __POSIX2_THIS_VERSION ) 74  #_POSIX2_C_BIND __POSIX2_THIS_VERSION ) 78  #_POSIX2_C_DEV __POSIX2_THIS_VERSION ) 82  #_POSIX2_SW_DEV __POSIX2_THIS_VERSION ) 86  #_POSIX2_LOCALEDEF __POSIX2_THIS_VERSION ) 89 #ifde __USE_XOPEN2K8 90  #_XOPEN_VERSION 700 ) 91 #i defed __USE_XOPEN2K 92  #_XOPEN_VERSION 600 ) 93 #i defed __USE_UNIX98 94  #_XOPEN_VERSION 500 ) 96  #_XOPEN_VERSION 4 ) 100  #_XOPEN_XCU_VERSION 4 ) 103  #_XOPEN_XPG2 1 ) 104  #_XOPEN_XPG3 1 ) 105  #_XOPEN_XPG4 1 ) 108  #_XOPEN_UNIX 1 ) 111  #_XOPEN_CRYPT 1 ) 115  #_XOPEN_ENH_I18N 1 ) 118  #_XOPEN_LEGACY 1 ) 205  ~ 208 #i defed __USE_UNIX98 || defed __USE_XOPEN2K 209  ~ 213  #STDIN_FILENO 0 ) 214  #STDOUT_FILENO 1 ) 215  #STDERR_FILENO 2 ) 220  ~ 222 #idef __ssize_t_defed 223  __ssize_t tssize_t ; 224  #__ssize_t_defed ) 227  #__ed_size_t ) 228  #__ed_NULL ) 229  ~ 231 #i defed __USE_XOPEN || defed __USE_XOPEN2K 234 #ide __gid_t_defed 235  __gid_t tgid_t ; 236  #__gid_t_defed ) 239 #ide __uid_t_defed 240  __uid_t tuid_t ; 241  #__uid_t_defed ) 244 #ide __off_t_defed 245 #ide __USE_FILE_OFFSET64 246  __off_t toff_t ; 248  __off64_t toff_t ; 250  #__off_t_defed ) 252 #i defed __USE_LARGEFILE64 && !defed __off64_t_defed 253  __off64_t toff64_t ; 254  #__off64_t_defed ) 257 #ide __ucds_t_defed 258  __ucds_t tucds_t ; 259  #__ucds_t_defed ) 262 #ide __pid_t_defed 263  __pid_t tpid_t ; 264  #__pid_t_defed ) 268 #i defed __USE_XOPEN_EXTENDED || defed __USE_XOPEN2K 269 #ide ___t_defed 270  ___t t_t ; 271  #___t_defed ) 275 #i defed __USE_MISC || defed __USE_XOPEN 276 #ide __sockn_t_defed 277  __sockn_t tsockn_t ; 278  #__sockn_t_defed ) 284  #R_OK 4 ) 285  #W_OK 2 ) 286  #X_OK 1 ) 287  #F_OK 0 ) 290  $acss (cڡ * __me ,  __ty __THROW `__nnu ((1)); 292 #ifde __USE_GNU 295  $euidacss (cڡ * __me ,  __ty ) 296 __THROW `__nnu ((1)); 299  $css (cڡ * __me ,  __ty ) 300 __THROW `__nnu ((1)); 303 #ifde __USE_ATFILE 307  $cst ( __fd , cڡ * __fe ,  __ty ,  __ag ) 308 __THROW `__nnu ((2) __wur ; 313 #idef _STDIO_H 314  #SEEK_SET 0 ) 315  #SEEK_CUR 1 ) 316  #SEEK_END 2 ) 317 #ifde __USE_GNU 318  #SEEK_DATA 3 ) 319  #SEEK_HOLE 4 ) 323 #i defed __USE_MISC && !defed L_SET 325  #L_SET SEEK_SET ) 326  #L_INCR SEEK_CUR ) 327  #L_XTND SEEK_END ) 336 #ide __USE_FILE_OFFSET64 337 __off_t $lek ( __fd , __off_t __offt ,  __wh __THROW ; 339 #ifde __REDIRECT_NTH 340 __off64_t `__REDIRECT_NTH ( lek , 341 ( __fd , __off64_t __offt ,  __wh ), 342 lek64 ); 344  #lek lek64 ) 347 #ifde __USE_LARGEFILE64 348 __off64_t $lek64 ( __fd , __off64_t __offt ,  __wh ) 349 __THROW ; 356  `o ( __fd ); 363 ssize_t $ad ( __fd , * __buf , size_t __nbys __wur ; 369 ssize_t $wre ( __fd , cڡ * __buf , size_t __n __wur ; 371 #i defed __USE_UNIX98 || defed __USE_XOPEN2K8 372 #ide __USE_FILE_OFFSET64 379 ssize_t $d ( __fd , * __buf , size_t __nbys , 380 __off_t __offt __wur ; 387 ssize_t $pwre ( __fd , cڡ * __buf , size_t __n , 388 __off_t __offt __wur ; 390 #ifde __REDIRECT 391 ssize_t `__REDIRECT ( d , ( __fd , * __buf , size_t __nbys , 392 __off64_t __offt ), 393 d64 __wur ; 394 ssize_t `__REDIRECT ( pwre , ( __fd , cڡ * __buf , 395 size_t __nbys , __off64_t __offt ), 396 pwre64 __wur ; 398  #d d64 ) 399  #pwre pwre64 ) 403 #ifde __USE_LARGEFILE64 407 ssize_t $d64 ( __fd , * __buf , size_t __nbys , 408 __off64_t __offt __wur ; 411 ssize_t $pwre64 ( __fd , cڡ * __buf , size_t __n , 412 __off64_t __offt __wur ; 420  $pe ( __pedes [2] __THROW __wur ; 422 #ifde __USE_GNU 425  $pe2 ( __pedes [2],  __ags __THROW __wur ; 435  $m ( __cds __THROW ; 447  `p ( __cds ); 449 #i( defed __USE_XOPEN_EXTENDED && !defed __USE_XOPEN2K8 ) \ 450 || defed __USE_MISC 455 __ucds_t $um ( __ucds_t __vue , __ucds_ __rv ) 456 __THROW ; 463  `up ( __ucds_t __ucds ); 472  `u (); 476  $chown (cڡ * __fe , __uid_t __owr , __gid_t __group ) 477 __THROW `__nnu ((1) __wur ; 479 #i defed __USE_XOPEN_EXTENDED || defed __USE_XOPEN2K8 481  $fchown ( __fd , __uid_t __owr , __gid_t __group __THROW __wur ; 486  $lchown (cڡ * __fe , __uid_t __owr , __gid_t __group ) 487 __THROW `__nnu ((1) __wur ; 491 #ifde __USE_ATFILE 494  $fchowt ( __fd , cڡ * __fe , __uid_t __owr , 495 __gid_t __group ,  __ag ) 496 __THROW `__nnu ((2) __wur ; 500  $chd (cڡ * __th __THROW `__nnu ((1) __wur ; 502 #i defed __USE_XOPEN_EXTENDED || defed __USE_XOPEN2K8 504  $fchd ( __fd __THROW __wur ; 514 * $gcwd (* __buf , size_t __size __THROW __wur ; 516 #ifdef __USE_GNU 520 * $g_cut_d_me ( __THROW ; 523 #i( defed __USE_XOPEN_EXTENDED && !defed __USE_XOPEN2K8 ) \ 524 || defed __USE_MISC 528 * $gwd (* __buf ) 529 __THROW `__nnu ((1) __ibu_dd__ __wur ; 534  $dup ( __fd __THROW __wur ; 537  $dup2 ( __fd ,  __fd2 __THROW ; 539 #ifde __USE_GNU 542  $dup3 ( __fd ,  __fd2 ,  __ags __THROW ; 546 ** __v ; 547 #ifde __USE_GNU 548 ** v ; 554  $execve (cڡ * __th , *cڡ __gv [], 555 *cڡ __vp [] __THROW `__nnu ((1, 2)); 557 #ifde __USE_XOPEN2K8 560  $xecve ( __fd , *cڡ __gv [], *cڡ __vp []) 561 __THROW `__nnu ((2)); 566  $execv (cڡ * __th , *cڡ __gv []) 567 __THROW `__nnu ((1, 2)); 571  $exee (cڡ * __th , cڡ * __g , ...) 572 __THROW `__nnu ((1, 2)); 576  $exe (cڡ * __th , cڡ * __g , ...) 577 __THROW `__nnu ((1, 2)); 581  $execvp (cڡ * __fe , *cڡ __gv []) 582 __THROW `__nnu ((1, 2)); 587  $exep (cڡ * __fe , cڡ * __g , ...) 588 __THROW `__nnu ((1, 2)); 590 #ifde __USE_GNU 593  $execv (cڡ * __fe , *cڡ __gv [], 594 *cڡ __vp []) 595 __THROW `__nnu ((1, 2)); 599 #i defed __USE_MISC || defed __USE_XOPEN 601  $ni ( __c __THROW __wur ; 606  $_ex ( __us `__ibu__ (( __nܑu__ )); 612  ~ 615  $thcf (cڡ * __th ,  __me ) 616 __THROW `__nnu ((1)); 619  $hcf ( __fd ,  __me __THROW ; 622  $syscf ( __me __THROW ; 624 #ifdef __USE_POSIX2 626 size_t $cfr ( __me , * __buf , size_t __n __THROW ; 631 __pid_t $gpid ( __THROW ; 634 __pid_t $gid ( __THROW ; 637 __pid_t $gpg ( __THROW ; 640 __pid_t $__gpgid ( __pid_t __pid __THROW ; 641 #i defed __USE_XOPEN_EXTENDED || defed __USE_XOPEN2K8 642 __pid_t $gpgid ( __pid_t __pid __THROW ; 649  $gid ( __pid_t __pid , __pid_ __pgid __THROW ; 651 #i defed __USE_MISC || defed __USE_XOPEN_EXTENDED 663  $g ( __THROW ; 670 __pid_t $tsid ( __THROW ; 672 #i defed __USE_XOPEN_EXTENDED || defed __USE_XOPEN2K8 674 __pid_t $gsid ( __pid_t __pid __THROW ; 678 __uid_t $guid ( __THROW ; 681 __uid_t $geuid ( __THROW ; 684 __gid_t $ggid ( __THROW ; 687 __gid_t $gegid ( __THROW ; 692  $ggroups ( __size , __gid_t __li [] __THROW __wur ; 694 #ifdef __USE_GNU 696  $group_memb ( __gid_t __gid __THROW ; 703  $tuid ( __uid_t __uid __THROW __wur ; 705 #i defed __USE_MISC || defed __USE_XOPEN_EXTENDED 708  $euid ( __uid_t __ruid , __uid_ __euid __THROW __wur ; 711 #ifde __USE_XOPEN2K 713  $uid ( __uid_t __uid __THROW __wur ; 720  $tgid ( __gid_t __gid __THROW __wur ; 722 #i defed __USE_MISC || defed __USE_XOPEN_EXTENDED 725  $egid ( __gid_t __rgid , __gid_ __egid __THROW __wur ; 728 #ifde __USE_XOPEN2K 730  $gid ( __gid_t __gid __THROW __wur ; 733 #ifde __USE_GNU 736  $gsuid ( __uid_t * __ruid , __uid_* __euid , __uid_* __suid ) 737 __THROW ; 741  $gsgid ( __gid_t * __rgid , __gid_* __egid , __gid_* __sgid ) 742 __THROW ; 746  $esuid ( __uid_t __ruid , __uid_ __euid , __uid_ __suid ) 747 __THROW __wur ; 751  $esgid ( __gid_t __rgid , __gid_ __egid , __gid_ __sgid ) 752 __THROW __wur ; 759 __pid_t $fk ( __THROWNL ; 761 #i( defed __USE_XOPEN_EXTENDED && !defed __USE_XOPEN2K8 ) \ 762 || defed __USE_MISC 767 __pid_t $vfk ( __THROW ; 773 * $yme ( __fd __THROW ; 777  $yme_r ( __fd , * __buf , size_t __bu ) 778 __THROW `__nnu ((2) __wur ; 782  $iy ( __fd __THROW ; 784 #i defed __USE_MISC \ 785 || ( defed __USE_XOPEN_EXTENDED && !defed __USE_UNIX98 ) 788  $y ( __THROW ; 793  $lk (cڡ * __om , cڡ * __to ) 794 __THROW `__nnu ((1, 2) __wur ; 796 #ifde __USE_ATFILE 799  $lk ( __omfd , cڡ * __om ,  __tofd , 800 cڡ * __to ,  __ags ) 801 __THROW `__nnu ((2, 4) __wur ; 804 #i defed __USE_XOPEN_EXTENDED || defed __USE_XOPEN2K 806  $symlk (cڡ * __om , cڡ * __to ) 807 __THROW `__nnu ((1, 2) __wur ; 812 ssize_t $adlk (cڡ * __ri __th , 813 * __ri __buf , size_t __n ) 814 __THROW `__nnu ((1, 2) __wur ; 817 #ifde __USE_ATFILE 819  $symlk (cڡ * __om ,  __tofd , 820 cڡ * __to __THROW `__nnu ((1, 3) __wur ; 823 ssize_t $adlk ( __fd , cڡ * __ri __th , 824 * __ri __buf , size_t __n ) 825 __THROW `__nnu ((2, 3) __wur ; 829  $uƚk (cڡ * __me __THROW `__nnu ((1)); 831 #ifde __USE_ATFILE 833  $uƚk ( __fd , cڡ * __me ,  __ag ) 834 __THROW `__nnu ((2)); 838  $rmd (cڡ * __th __THROW `__nnu ((1)); 842 __pid_t $tcgpg ( __fd __THROW ; 845  $tcg ( __fd , __pid_t __pg_id __THROW ; 852 * `glog (); 853 #i defed __USE_REENTRANT || defed __USE_POSIX199506 860  $glog_r (* __me , size_t __me_n `__nnu ((1)); 863 #ifdef __USE_MISC 865  $og (cڡ * __me __THROW `__nnu ((1)); 869 #ifdef __USE_POSIX2 873  #__ed_gt ) 874  ~ 878 #i defed __USE_UNIX98 || defed __USE_XOPEN2K 882  $ghome (* __me , size_t __n __THROW `__nnu ((1)); 886 #i defed __USE_MISC 889  $thome (cڡ * __me , size_t __n ) 890 __THROW `__nnu ((1) __wur ; 894  $thoid ( __id __THROW __wur ; 900  $gdomame (* __me , size_t __n ) 901 __THROW `__nnu ((1) __wur ; 902  $tdomame (cڡ * __me , size_t __n ) 903 __THROW `__nnu ((1) __wur ; 909  $vhgup ( __THROW ; 912  $voke (cڡ * __fe __THROW `__nnu ((1) __wur ; 920  $of (* __me_bufr , size_t __size , 921 size_t __offt ,  __s ) 922 __THROW `__nnu ((1)); 928  $ac (cڡ * __me __THROW ; 932 * $gurshl ( __THROW ; 933  $durshl ( __THROW ; 934  $turshl ( __THROW ; 940  $dm ( __nochd ,  __noo __THROW __wur ; 944 #i defed __USE_MISC || (defed __USE_XOPEN && !defed __USE_XOPEN2K ) 947  $chro (cڡ * __th __THROW `__nnu ((1) __wur ; 951 * $gss (cڡ * __om `__nnu ((1)); 959  `fsync ( __fd ); 962 #ifde __USE_GNU 965  $syncfs ( __fd __THROW ; 969 #i defed __USE_MISC || defed __USE_XOPEN_EXTENDED 972  `ghoid (); 975  $sync ( __THROW ; 978 #i defed __USE_MISC || !defed __USE_XOPEN2K 981  $ggesize ( __THROW `__ibu__ (( __cڡ__ )); 986  $gdbsize ( __THROW ; 992 #i defed __USE_XOPEN_EXTENDED || defed __USE_XOPEN2K8 995 #ide __USE_FILE_OFFSET64 996  $un (cڡ * __fe , __off_t __ngth ) 997 __THROW `__nnu ((1) __wur ; 999 #ifde __REDIRECT_NTH 1000  `__REDIRECT_NTH ( un , 1001 (cڡ * __fe , __off64_t __ngth ), 1002 un64 `__nnu ((1) __wur ; 1004  #un un64 ) 1007 #ifde __USE_LARGEFILE64 1008  $un64 (cڡ * __fe , __off64_t __ngth ) 1009 __THROW `__nnu ((1) __wur ; 1014 #i defed __USE_POSIX199309 \ 1015 || defed __USE_XOPEN_EXTENDED || defed __USE_XOPEN2K 1018 #ide __USE_FILE_OFFSET64 1019  $run ( __fd , __off_t __ngth __THROW __wur ; 1021 #ifde __REDIRECT_NTH 1022  `__REDIRECT_NTH ( run , ( __fd , __off64_t __ngth ), 1023 run64 __wur ; 1025  #run run64 ) 1028 #ifde __USE_LARGEFILE64 1029  $run64 ( __fd , __off64_t __ngth __THROW __wur ; 1035 #i( defed __USE_XOPEN_EXTENDED && !defed __USE_XOPEN2K ) \ 1036 || defed __USE_MISC 1040  $brk (* __addr __THROW __wur ; 1046 * $sbrk ( _t __d __THROW ; 1050 #ifde __USE_MISC 1061  $sys ( __syo , ... __THROW ; 1066 #i( defed __USE_MISC || defed __USE_XOPEN_EXTENDED && !defed F_LOCK 1078  #F_ULOCK 0 ) 1079  #F_LOCK 1 ) 1080  #F_TLOCK 2 ) 1081  #F_TEST 3 ) 1083 #ide __USE_FILE_OFFSET64 1084  $lockf ( __fd ,  __cmd , __off_t __n __wur ; 1086 #ifde __REDIRECT 1087  `__REDIRECT ( lockf , ( __fd ,  __cmd , __off64_t __n ), 1088 lockf64 __wur ; 1090  #lockf lockf64 ) 1093 #ifde __USE_LARGEFILE64 1094  $lockf64 ( __fd ,  __cmd , __off64_t __n __wur ; 1099 #ifde __USE_GNU 1104  #TEMP_FAILURE_RETRY ( exessi ) \ 1105 ( __exnsi__ \ 1106 ({  __su ; \ 1107 d __su = (( exessi ); \ 1108  __su =-1L && o = EINTR ); \ 1109 __su ; } })) ) 1112 #i defed __USE_POSIX199309 || defed __USE_UNIX98 1115  fdasync ( __fdes ); 1121 #ifdef __USE_XOPEN 1123 * $y (cڡ * __key , cڡ * __ ) 1124 __THROW `__nnu ((1, 2)); 1128  $y (* __glibc_block ,  __edag ) 1129 __THROW `__nnu ((1)); 1136  $swab (cڡ * __ri __om , *__ri __to , 1137 ssize_t __n __THROW `__nnu ((1, 2)); 1143 #i defed __USE_XOPEN && !defed __USE_XOPEN2K 1145 * $mid (* __s __THROW ; 1150 #i __USE_FORTIFY_LEVEL > 0 && defed __ftify_funi 1151  ~ 1154 __END_DECLS @/usr/include/alloca.h 18 #idef _ALLOCA_H 19  #_ALLOCA_H 1 ) 21  ~ 23  #__ed_size_t ) 24  ~ 26 g__BEGIN_DECLS 29 #unde lo 32 * $lo ( size_t __size __THROW ; 34 #ifdef __GNUC__ 35  #lo ( size `__but_lo (size) ) 38 __END_DECLS @/usr/include/bits/byteswap.h 19 #i! defed _BYTESWAP_H && !defed _NETINET_IN_H && !defed _ENDIAN_H 23 #ide _BITS_BYTESWAP_H 24  #_BITS_BYTESWAP_H 1 ) 26  ~ 27  ~ 28  ~ 31  #__bsw_cڡt_16 ( x ) \ 32 (((((( x >> 8& 0xff| (((x& 0xff<< 8))) ) 35  ~ 38  #__bsw_cڡt_32 ( x ) \ 39 (((( x ) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \ 40 ((( x & 0x0000ff00<< 8| (((x& 0x000000ff<< 24)) ) 42 #ifde __GNUC__ 43 #i __GNUC_PREREQ (4, 3) 44  __le  45 $__bsw_32 ( __bsx ) 47  `__but_bsw32 ( __bsx ); 48 } } 49 #i __GNUC__ >= 2 50 #i __WORDSIZE =64 || ( defed __i486__ || defed __ium__ \ 51 || defed g__iumo__ || defed g__ium4__ \ 52 || defed g__k8__ || defed g__hl__ \ 53 || defed g__k6__ || defed g__noca__ \ 54 || defed g__ce2__ || defed g__geode__ \ 55 || defed g__amdm10__ ) 58  #__bsw_32 ( x ) \ 59 ( __exnsi__ \ 60 ({  __v , __x = ( x ); \ 61 i( `__but_cڡt_p ( __x )) \ 62 __v = `__bsw_cڡt_32 ( __x ); \ 64 `__asm__ ("bsw %0" : "" ( __v : "0" ( __x )); \ 65 __v ; })) ) 67  #__bsw_32 ( x ) \ 68 ( __exnsi__ \ 69 ({  __v , __x = ( x ); \ 70 i( `__but_cڡt_p ( __x )) \ 71 __v = `__bsw_cڡt_32 ( __x ); \ 73 `__asm__ ("rorw $8, %w0;" \ 76 : "" ( __v ) \ 77 : "0" ( __x ) \ 79 __v ; })) ) 82  #__bsw_32 ( x ) \ 83 ( __exnsi__ \ 84 ({  __x = ( x ); `__bsw_cڡt_32 (__x); })) ) 87  __le  88 $__bsw_32 ( __bsx ) 90  `__bsw_cڡt_32 ( __bsx ); 91 } } 95 #i __GNUC_PREREQ (2, 0) 97  #__bsw_cڡt_64 ( x ) \ 98 ( `__exnsi__ (((( x ) & 0xff00000000000000ull) >> 56) \ 99 | ((( x ) & 0x00ff000000000000ull) >> 40) \ 100 | ((( x ) & 0x0000ff0000000000ull) >> 24) \ 101 | ((( x ) & 0x000000ff00000000ull) >> 8) \ 102 | ((( x ) & 0x00000000ff000000ull) << 8) \ 103 | ((( x ) & 0x0000000000ff0000ull) << 24) \ 104 | ((( x ) & 0x000000000000ff00ull) << 40) \ 105 | ((( x & 0x00000000000000ffu<< 56))) ) 107 #i __GNUC_PREREQ (4, 3) 108  __le __ut64_t 109 $__bsw_64 ( __ut64_t __bsx ) 111  `__but_bsw64 ( __bsx ); 112 } } 113 #i __WORDSIZE == 64 114  #__bsw_64 ( x ) \ 115 ( __exnsi__ \ 116 ({ __ut64_t __v , __x = ( x ); \ 117 i( `__but_cڡt_p ( __x )) \ 118 __v = `__bsw_cڡt_64 ( __x ); \ 120 `__asm__ ("bsw %q0" : "" ( __v : "0" ( __x )); \ 121 __v ; })) ) 123  #__bsw_64 ( x ) \ 124 ( __exnsi__ \ 125 ({ uni { __exnsi__ __ut64_t __ ; \ 126  __l [2]; } __w , __r ; \ 127 i( `__but_cڡt_p ( x )) \ 128 __r . __ = `__bsw_cڡt_64 ( x ); \ 131 __w . __ = ( x ); \ 132 __r . __l [0] = `__bsw_32 ( __w .__l[1]); \ 133 __r . __l [1] = `__bsw_32 ( __w .__l[0]); \ 135 __r . __ ; })) ) 138  #__bsw_cڡt_64 ( x ) \ 139 (((( x ) & 0xff00000000000000ull) >> 56) \ 140 | ((( x ) & 0x00ff000000000000ull) >> 40) \ 141 | ((( x ) & 0x0000ff0000000000ull) >> 24) \ 142 | ((( x ) & 0x000000ff00000000ull) >> 8) \ 143 | ((( x ) & 0x00000000ff000000ull) << 8) \ 144 | ((( x ) & 0x0000000000ff0000ull) << 24) \ 145 | ((( x ) & 0x000000000000ff00ull) << 40) \ 146 | ((( x & 0x00000000000000ffu<< 56)) ) 148  __le __ut64_t 149 $__bsw_64 ( __ut64_t __bsx ) 151  `__bsw_cڡt_64 ( __bsx ); 152 } } @/usr/include/bits/confname.h 19 #ide _UNISTD_H 26 m_PC_LINK_MAX , 27  #_PC_LINK_MAX _PC_LINK_MAX ) 28 m_PC_MAX_CANON , 29  #_PC_MAX_CANON _PC_MAX_CANON ) 30 m_PC_MAX_INPUT , 31  #_PC_MAX_INPUT _PC_MAX_INPUT ) 32 m_PC_NAME_MAX , 33  #_PC_NAME_MAX _PC_NAME_MAX ) 34 m_PC_PATH_MAX , 35  #_PC_PATH_MAX _PC_PATH_MAX ) 36 m_PC_PIPE_BUF , 37  #_PC_PIPE_BUF _PC_PIPE_BUF ) 38 m_PC_CHOWN_RESTRICTED , 39  #_PC_CHOWN_RESTRICTED _PC_CHOWN_RESTRICTED ) 40 m_PC_NO_TRUNC , 41  #_PC_NO_TRUNC _PC_NO_TRUNC ) 42 m_PC_VDISABLE , 43  #_PC_VDISABLE _PC_VDISABLE ) 44 m_PC_SYNC_IO , 45  #_PC_SYNC_IO _PC_SYNC_IO ) 46 m_PC_ASYNC_IO , 47  #_PC_ASYNC_IO _PC_ASYNC_IO ) 48 m_PC_PRIO_IO , 49  #_PC_PRIO_IO _PC_PRIO_IO ) 50 m_PC_SOCK_MAXBUF , 51  #_PC_SOCK_MAXBUF _PC_SOCK_MAXBUF ) 52 m_PC_FILESIZEBITS , 53  #_PC_FILESIZEBITS _PC_FILESIZEBITS ) 54 m_PC_REC_INCR_XFER_SIZE , 55  #_PC_REC_INCR_XFER_SIZE _PC_REC_INCR_XFER_SIZE ) 56 m_PC_REC_MAX_XFER_SIZE , 57  #_PC_REC_MAX_XFER_SIZE _PC_REC_MAX_XFER_SIZE ) 58 m_PC_REC_MIN_XFER_SIZE , 59  #_PC_REC_MIN_XFER_SIZE _PC_REC_MIN_XFER_SIZE ) 60 m_PC_REC_XFER_ALIGN , 61  #_PC_REC_XFER_ALIGN _PC_REC_XFER_ALIGN ) 62 m_PC_ALLOC_SIZE_MIN , 63  #_PC_ALLOC_SIZE_MIN _PC_ALLOC_SIZE_MIN ) 64 m_PC_SYMLINK_MAX , 65  #_PC_SYMLINK_MAX _PC_SYMLINK_MAX ) 66 m_PC_2_SYMLINKS 67  #_PC_2_SYMLINKS _PC_2_SYMLINKS ) 73 m_SC_ARG_MAX , 74  #_SC_ARG_MAX _SC_ARG_MAX ) 75 m_SC_CHILD_MAX , 76  #_SC_CHILD_MAX _SC_CHILD_MAX ) 77 m_SC_CLK_TCK , 78  #_SC_CLK_TCK _SC_CLK_TCK ) 79 m_SC_NGROUPS_MAX , 80  #_SC_NGROUPS_MAX _SC_NGROUPS_MAX ) 81 m_SC_OPEN_MAX , 82  #_SC_OPEN_MAX _SC_OPEN_MAX ) 83 m_SC_STREAM_MAX , 84  #_SC_STREAM_MAX _SC_STREAM_MAX ) 85 m_SC_TZNAME_MAX , 86  #_SC_TZNAME_MAX _SC_TZNAME_MAX ) 87 m_SC_JOB_CONTROL , 88  #_SC_JOB_CONTROL _SC_JOB_CONTROL ) 89 m_SC_SAVED_IDS , 90  #_SC_SAVED_IDS _SC_SAVED_IDS ) 91 m_SC_REALTIME_SIGNALS , 92  #_SC_REALTIME_SIGNALS _SC_REALTIME_SIGNALS ) 93 m_SC_PRIORITY_SCHEDULING , 94  #_SC_PRIORITY_SCHEDULING _SC_PRIORITY_SCHEDULING ) 95 m_SC_TIMERS , 96  #_SC_TIMERS _SC_TIMERS ) 97 m_SC_ASYNCHRONOUS_IO , 98  #_SC_ASYNCHRONOUS_IO _SC_ASYNCHRONOUS_IO ) 99 m_SC_PRIORITIZED_IO , 100  #_SC_PRIORITIZED_IO _SC_PRIORITIZED_IO ) 101 m_SC_SYNCHRONIZED_IO , 102  #_SC_SYNCHRONIZED_IO _SC_SYNCHRONIZED_IO ) 103 m_SC_FSYNC , 104  #_SC_FSYNC _SC_FSYNC ) 105 m_SC_MAPPED_FILES , 106  #_SC_MAPPED_FILES _SC_MAPPED_FILES ) 107 m_SC_MEMLOCK , 108  #_SC_MEMLOCK _SC_MEMLOCK ) 109 m_SC_MEMLOCK_RANGE , 110  #_SC_MEMLOCK_RANGE _SC_MEMLOCK_RANGE ) 111 m_SC_MEMORY_PROTECTION , 112  #_SC_MEMORY_PROTECTION _SC_MEMORY_PROTECTION ) 113 m_SC_MESSAGE_PASSING , 114  #_SC_MESSAGE_PASSING _SC_MESSAGE_PASSING ) 115 m_SC_SEMAPHORES , 116  #_SC_SEMAPHORES _SC_SEMAPHORES ) 117 m_SC_SHARED_MEMORY_OBJECTS , 118  #_SC_SHARED_MEMORY_OBJECTS _SC_SHARED_MEMORY_OBJECTS ) 119 m_SC_AIO_LISTIO_MAX , 120  #_SC_AIO_LISTIO_MAX _SC_AIO_LISTIO_MAX ) 121 m_SC_AIO_MAX , 122  #_SC_AIO_MAX _SC_AIO_MAX ) 123 m_SC_AIO_PRIO_DELTA_MAX , 124  #_SC_AIO_PRIO_DELTA_MAX _SC_AIO_PRIO_DELTA_MAX ) 125 m_SC_DELAYTIMER_MAX , 126  #_SC_DELAYTIMER_MAX _SC_DELAYTIMER_MAX ) 127 m_SC_MQ_OPEN_MAX , 128  #_SC_MQ_OPEN_MAX _SC_MQ_OPEN_MAX ) 129 m_SC_MQ_PRIO_MAX , 130  #_SC_MQ_PRIO_MAX _SC_MQ_PRIO_MAX ) 131 m_SC_VERSION , 132  #_SC_VERSION _SC_VERSION ) 133 m_SC_PAGESIZE , 134  #_SC_PAGESIZE _SC_PAGESIZE ) 135  #_SC_PAGE_SIZE _SC_PAGESIZE ) 136 m_SC_RTSIG_MAX , 137  #_SC_RTSIG_MAX _SC_RTSIG_MAX ) 138 m_SC_SEM_NSEMS_MAX , 139  #_SC_SEM_NSEMS_MAX _SC_SEM_NSEMS_MAX ) 140 m_SC_SEM_VALUE_MAX , 141  #_SC_SEM_VALUE_MAX _SC_SEM_VALUE_MAX ) 142 m_SC_SIGQUEUE_MAX , 143  #_SC_SIGQUEUE_MAX _SC_SIGQUEUE_MAX ) 144 m_SC_TIMER_MAX , 145  #_SC_TIMER_MAX _SC_TIMER_MAX ) 149 m_SC_BC_BASE_MAX , 150  #_SC_BC_BASE_MAX _SC_BC_BASE_MAX ) 151 m_SC_BC_DIM_MAX , 152  #_SC_BC_DIM_MAX _SC_BC_DIM_MAX ) 153 m_SC_BC_SCALE_MAX , 154  #_SC_BC_SCALE_MAX _SC_BC_SCALE_MAX ) 155 m_SC_BC_STRING_MAX , 156  #_SC_BC_STRING_MAX _SC_BC_STRING_MAX ) 157 m_SC_COLL_WEIGHTS_MAX , 158  #_SC_COLL_WEIGHTS_MAX _SC_COLL_WEIGHTS_MAX ) 159 m_SC_EQUIV_CLASS_MAX , 160  #_SC_EQUIV_CLASS_MAX _SC_EQUIV_CLASS_MAX ) 161 m_SC_EXPR_NEST_MAX , 162  #_SC_EXPR_NEST_MAX _SC_EXPR_NEST_MAX ) 163 m_SC_LINE_MAX , 164  #_SC_LINE_MAX _SC_LINE_MAX ) 165 m_SC_RE_DUP_MAX , 166  #_SC_RE_DUP_MAX _SC_RE_DUP_MAX ) 167 m_SC_CHARCLASS_NAME_MAX , 168  #_SC_CHARCLASS_NAME_MAX _SC_CHARCLASS_NAME_MAX ) 170 m_SC_2_VERSION , 171  #_SC_2_VERSION _SC_2_VERSION ) 172 m_SC_2_C_BIND , 173  #_SC_2_C_BIND _SC_2_C_BIND ) 174 m_SC_2_C_DEV , 175  #_SC_2_C_DEV _SC_2_C_DEV ) 176 m_SC_2_FORT_DEV , 177  #_SC_2_FORT_DEV _SC_2_FORT_DEV ) 178 m_SC_2_FORT_RUN , 179  #_SC_2_FORT_RUN _SC_2_FORT_RUN ) 180 m_SC_2_SW_DEV , 181  #_SC_2_SW_DEV _SC_2_SW_DEV ) 182 m_SC_2_LOCALEDEF , 183  #_SC_2_LOCALEDEF _SC_2_LOCALEDEF ) 185 m_SC_PII , 186  #_SC_PII _SC_PII ) 187 m_SC_PII_XTI , 188  #_SC_PII_XTI _SC_PII_XTI ) 189 m_SC_PII_SOCKET , 190  #_SC_PII_SOCKET _SC_PII_SOCKET ) 191 m_SC_PII_INTERNET , 192  #_SC_PII_INTERNET _SC_PII_INTERNET ) 193 m_SC_PII_OSI , 194  #_SC_PII_OSI _SC_PII_OSI ) 195 m_SC_POLL , 196  #_SC_POLL _SC_POLL ) 197 m_SC_SELECT , 198  #_SC_SELECT _SC_SELECT ) 199 m_SC_UIO_MAXIOV , 200  #_SC_UIO_MAXIOV _SC_UIO_MAXIOV ) 201 m_SC_IOV_MAX = _SC_UIO_MAXIOV , 202  #_SC_IOV_MAX _SC_IOV_MAX ) 203 m_SC_PII_INTERNET_STREAM , 204  #_SC_PII_INTERNET_STREAM _SC_PII_INTERNET_STREAM ) 205 m_SC_PII_INTERNET_DGRAM , 206  #_SC_PII_INTERNET_DGRAM _SC_PII_INTERNET_DGRAM ) 207 m_SC_PII_OSI_COTS , 208  #_SC_PII_OSI_COTS _SC_PII_OSI_COTS ) 209 m_SC_PII_OSI_CLTS , 210  #_SC_PII_OSI_CLTS _SC_PII_OSI_CLTS ) 211 m_SC_PII_OSI_M , 212  #_SC_PII_OSI_M _SC_PII_OSI_M ) 213 m_SC_T_IOV_MAX , 214  #_SC_T_IOV_MAX _SC_T_IOV_MAX ) 217 m_SC_THREADS , 218  #_SC_THREADS _SC_THREADS ) 219 m_SC_THREAD_SAFE_FUNCTIONS , 220  #_SC_THREAD_SAFE_FUNCTIONS _SC_THREAD_SAFE_FUNCTIONS ) 221 m_SC_GETGR_R_SIZE_MAX , 222  #_SC_GETGR_R_SIZE_MAX _SC_GETGR_R_SIZE_MAX ) 223 m_SC_GETPW_R_SIZE_MAX , 224  #_SC_GETPW_R_SIZE_MAX _SC_GETPW_R_SIZE_MAX ) 225 m_SC_LOGIN_NAME_MAX , 226  #_SC_LOGIN_NAME_MAX _SC_LOGIN_NAME_MAX ) 227 m_SC_TTY_NAME_MAX , 228  #_SC_TTY_NAME_MAX _SC_TTY_NAME_MAX ) 229 m_SC_THREAD_DESTRUCTOR_ITERATIONS , 230  #_SC_THREAD_DESTRUCTOR_ITERATIONS _SC_THREAD_DESTRUCTOR_ITERATIONS ) 231 m_SC_THREAD_KEYS_MAX , 232  #_SC_THREAD_KEYS_MAX _SC_THREAD_KEYS_MAX ) 233 m_SC_THREAD_STACK_MIN , 234  #_SC_THREAD_STACK_MIN _SC_THREAD_STACK_MIN ) 235 m_SC_THREAD_THREADS_MAX , 236  #_SC_THREAD_THREADS_MAX _SC_THREAD_THREADS_MAX ) 237 m_SC_THREAD_ATTR_STACKADDR , 238  #_SC_THREAD_ATTR_STACKADDR _SC_THREAD_ATTR_STACKADDR ) 239 m_SC_THREAD_ATTR_STACKSIZE , 240  #_SC_THREAD_ATTR_STACKSIZE _SC_THREAD_ATTR_STACKSIZE ) 241 m_SC_THREAD_PRIORITY_SCHEDULING , 242  #_SC_THREAD_PRIORITY_SCHEDULING _SC_THREAD_PRIORITY_SCHEDULING ) 243 m_SC_THREAD_PRIO_INHERIT , 244  #_SC_THREAD_PRIO_INHERIT _SC_THREAD_PRIO_INHERIT ) 245 m_SC_THREAD_PRIO_PROTECT , 246  #_SC_THREAD_PRIO_PROTECT _SC_THREAD_PRIO_PROTECT ) 247 m_SC_THREAD_PROCESS_SHARED , 248  #_SC_THREAD_PROCESS_SHARED _SC_THREAD_PROCESS_SHARED ) 250 m_SC_NPROCESSORS_CONF , 251  #_SC_NPROCESSORS_CONF _SC_NPROCESSORS_CONF ) 252 m_SC_NPROCESSORS_ONLN , 253  #_SC_NPROCESSORS_ONLN _SC_NPROCESSORS_ONLN ) 254 m_SC_PHYS_PAGES , 255  #_SC_PHYS_PAGES _SC_PHYS_PAGES ) 256 m_SC_AVPHYS_PAGES , 257  #_SC_AVPHYS_PAGES _SC_AVPHYS_PAGES ) 258 m_SC_ATEXIT_MAX , 259  #_SC_ATEXIT_MAX _SC_ATEXIT_MAX ) 260 m_SC_PASS_MAX , 261  #_SC_PASS_MAX _SC_PASS_MAX ) 263 m_SC_XOPEN_VERSION , 264  #_SC_XOPEN_VERSION _SC_XOPEN_VERSION ) 265 m_SC_XOPEN_XCU_VERSION , 266  #_SC_XOPEN_XCU_VERSION _SC_XOPEN_XCU_VERSION ) 267 m_SC_XOPEN_UNIX , 268  #_SC_XOPEN_UNIX _SC_XOPEN_UNIX ) 269 m_SC_XOPEN_CRYPT , 270  #_SC_XOPEN_CRYPT _SC_XOPEN_CRYPT ) 271 m_SC_XOPEN_ENH_I18N , 272  #_SC_XOPEN_ENH_I18N _SC_XOPEN_ENH_I18N ) 273 m_SC_XOPEN_SHM , 274  #_SC_XOPEN_SHM _SC_XOPEN_SHM ) 276 m_SC_2_CHAR_TERM , 277  #_SC_2_CHAR_TERM _SC_2_CHAR_TERM ) 278 m_SC_2_C_VERSION , 279  #_SC_2_C_VERSION _SC_2_C_VERSION ) 280 m_SC_2_UPE , 281  #_SC_2_UPE _SC_2_UPE ) 283 m_SC_XOPEN_XPG2 , 284  #_SC_XOPEN_XPG2 _SC_XOPEN_XPG2 ) 285 m_SC_XOPEN_XPG3 , 286  #_SC_XOPEN_XPG3 _SC_XOPEN_XPG3 ) 287 m_SC_XOPEN_XPG4 , 288  #_SC_XOPEN_XPG4 _SC_XOPEN_XPG4 ) 290 m_SC_CHAR_BIT , 291  #_SC_CHAR_BIT _SC_CHAR_BIT ) 292 m_SC_CHAR_MAX , 293  #_SC_CHAR_MAX _SC_CHAR_MAX ) 294 m_SC_CHAR_MIN , 295  #_SC_CHAR_MIN _SC_CHAR_MIN ) 296 m_SC_INT_MAX , 297  #_SC_INT_MAX _SC_INT_MAX ) 298 m_SC_INT_MIN , 299  #_SC_INT_MIN _SC_INT_MIN ) 300 m_SC_LONG_BIT , 301  #_SC_LONG_BIT _SC_LONG_BIT ) 302 m_SC_WORD_BIT , 303  #_SC_WORD_BIT _SC_WORD_BIT ) 304 m_SC_MB_LEN_MAX , 305  #_SC_MB_LEN_MAX _SC_MB_LEN_MAX ) 306 m_SC_NZERO , 307  #_SC_NZERO _SC_NZERO ) 308 m_SC_SSIZE_MAX , 309  #_SC_SSIZE_MAX _SC_SSIZE_MAX ) 310 m_SC_SCHAR_MAX , 311  #_SC_SCHAR_MAX _SC_SCHAR_MAX ) 312 m_SC_SCHAR_MIN , 313  #_SC_SCHAR_MIN _SC_SCHAR_MIN ) 314 m_SC_SHRT_MAX , 315  #_SC_SHRT_MAX _SC_SHRT_MAX ) 316 m_SC_SHRT_MIN , 317  #_SC_SHRT_MIN _SC_SHRT_MIN ) 318 m_SC_UCHAR_MAX , 319  #_SC_UCHAR_MAX _SC_UCHAR_MAX ) 320 m_SC_UINT_MAX , 321  #_SC_UINT_MAX _SC_UINT_MAX ) 322 m_SC_ULONG_MAX , 323  #_SC_ULONG_MAX _SC_ULONG_MAX ) 324 m_SC_USHRT_MAX , 325  #_SC_USHRT_MAX _SC_USHRT_MAX ) 327 m_SC_NL_ARGMAX , 328  #_SC_NL_ARGMAX _SC_NL_ARGMAX ) 329 m_SC_NL_LANGMAX , 330  #_SC_NL_LANGMAX _SC_NL_LANGMAX ) 331 m_SC_NL_MSGMAX , 332  #_SC_NL_MSGMAX _SC_NL_MSGMAX ) 333 m_SC_NL_NMAX , 334  #_SC_NL_NMAX _SC_NL_NMAX ) 335 m_SC_NL_SETMAX , 336  #_SC_NL_SETMAX _SC_NL_SETMAX ) 337 m_SC_NL_TEXTMAX , 338  #_SC_NL_TEXTMAX _SC_NL_TEXTMAX ) 340 m_SC_XBS5_ILP32_OFF32 , 341  #_SC_XBS5_ILP32_OFF32 _SC_XBS5_ILP32_OFF32 ) 342 m_SC_XBS5_ILP32_OFFBIG , 343  #_SC_XBS5_ILP32_OFFBIG _SC_XBS5_ILP32_OFFBIG ) 344 m_SC_XBS5_LP64_OFF64 , 345  #_SC_XBS5_LP64_OFF64 _SC_XBS5_LP64_OFF64 ) 346 m_SC_XBS5_LPBIG_OFFBIG , 347  #_SC_XBS5_LPBIG_OFFBIG _SC_XBS5_LPBIG_OFFBIG ) 349 m_SC_XOPEN_LEGACY , 350  #_SC_XOPEN_LEGACY _SC_XOPEN_LEGACY ) 351 m_SC_XOPEN_REALTIME , 352  #_SC_XOPEN_REALTIME _SC_XOPEN_REALTIME ) 353 m_SC_XOPEN_REALTIME_THREADS , 354  #_SC_XOPEN_REALTIME_THREADS _SC_XOPEN_REALTIME_THREADS ) 356 m_SC_ADVISORY_INFO , 357  #_SC_ADVISORY_INFO _SC_ADVISORY_INFO ) 358 m_SC_BARRIERS , 359  #_SC_BARRIERS _SC_BARRIERS ) 360 m_SC_BASE , 361  #_SC_BASE _SC_BASE ) 362 m_SC_C_LANG_SUPPORT , 363  #_SC_C_LANG_SUPPORT _SC_C_LANG_SUPPORT ) 364 m_SC_C_LANG_SUPPORT_R , 365  #_SC_C_LANG_SUPPORT_R _SC_C_LANG_SUPPORT_R ) 366 m_SC_CLOCK_SELECTION , 367  #_SC_CLOCK_SELECTION _SC_CLOCK_SELECTION ) 368 m_SC_CPUTIME , 369  #_SC_CPUTIME _SC_CPUTIME ) 370 m_SC_THREAD_CPUTIME , 371  #_SC_THREAD_CPUTIME _SC_THREAD_CPUTIME ) 372 m_SC_DEVICE_IO , 373  #_SC_DEVICE_IO _SC_DEVICE_IO ) 374 m_SC_DEVICE_SPECIFIC , 375  #_SC_DEVICE_SPECIFIC _SC_DEVICE_SPECIFIC ) 376 m_SC_DEVICE_SPECIFIC_R , 377  #_SC_DEVICE_SPECIFIC_R _SC_DEVICE_SPECIFIC_R ) 378 m_SC_FD_MGMT , 379  #_SC_FD_MGMT _SC_FD_MGMT ) 380 m_SC_FIFO , 381  #_SC_FIFO _SC_FIFO ) 382 m_SC_PIPE , 383  #_SC_PIPE _SC_PIPE ) 384 m_SC_FILE_ATTRIBUTES , 385  #_SC_FILE_ATTRIBUTES _SC_FILE_ATTRIBUTES ) 386 m_SC_FILE_LOCKING , 387  #_SC_FILE_LOCKING _SC_FILE_LOCKING ) 388 m_SC_FILE_SYSTEM , 389  #_SC_FILE_SYSTEM _SC_FILE_SYSTEM ) 390 m_SC_MONOTONIC_CLOCK , 391  #_SC_MONOTONIC_CLOCK _SC_MONOTONIC_CLOCK ) 392 m_SC_MULTI_PROCESS , 393  #_SC_MULTI_PROCESS _SC_MULTI_PROCESS ) 394 m_SC_SINGLE_PROCESS , 395  #_SC_SINGLE_PROCESS _SC_SINGLE_PROCESS ) 396 m_SC_NETWORKING , 397  #_SC_NETWORKING _SC_NETWORKING ) 398 m_SC_READER_WRITER_LOCKS , 399  #_SC_READER_WRITER_LOCKS _SC_READER_WRITER_LOCKS ) 400 m_SC_SPIN_LOCKS , 401  #_SC_SPIN_LOCKS _SC_SPIN_LOCKS ) 402 m_SC_REGEXP , 403  #_SC_REGEXP _SC_REGEXP ) 404 m_SC_REGEX_VERSION , 405  #_SC_REGEX_VERSION _SC_REGEX_VERSION ) 406 m_SC_SHELL , 407  #_SC_SHELL _SC_SHELL ) 408 m_SC_SIGNALS , 409  #_SC_SIGNALS _SC_SIGNALS ) 410 m_SC_SPAWN , 411  #_SC_SPAWN _SC_SPAWN ) 412 m_SC_SPORADIC_SERVER , 413  #_SC_SPORADIC_SERVER _SC_SPORADIC_SERVER ) 414 m_SC_THREAD_SPORADIC_SERVER , 415  #_SC_THREAD_SPORADIC_SERVER _SC_THREAD_SPORADIC_SERVER ) 416 m_SC_SYSTEM_DATABASE , 417  #_SC_SYSTEM_DATABASE _SC_SYSTEM_DATABASE ) 418 m_SC_SYSTEM_DATABASE_R , 419  #_SC_SYSTEM_DATABASE_R _SC_SYSTEM_DATABASE_R ) 420 m_SC_TIMEOUTS , 421  #_SC_TIMEOUTS _SC_TIMEOUTS ) 422 m_SC_TYPED_MEMORY_OBJECTS , 423  #_SC_TYPED_MEMORY_OBJECTS _SC_TYPED_MEMORY_OBJECTS ) 424 m_SC_USER_GROUPS , 425  #_SC_USER_GROUPS _SC_USER_GROUPS ) 426 m_SC_USER_GROUPS_R , 427  #_SC_USER_GROUPS_R _SC_USER_GROUPS_R ) 428 m_SC_2_PBS , 429  #_SC_2_PBS _SC_2_PBS ) 430 m_SC_2_PBS_ACCOUNTING , 431  #_SC_2_PBS_ACCOUNTING _SC_2_PBS_ACCOUNTING ) 432 m_SC_2_PBS_LOCATE , 433  #_SC_2_PBS_LOCATE _SC_2_PBS_LOCATE ) 434 m_SC_2_PBS_MESSAGE , 435  #_SC_2_PBS_MESSAGE _SC_2_PBS_MESSAGE ) 436 m_SC_2_PBS_TRACK , 437  #_SC_2_PBS_TRACK _SC_2_PBS_TRACK ) 438 m_SC_SYMLOOP_MAX , 439  #_SC_SYMLOOP_MAX _SC_SYMLOOP_MAX ) 440 m_SC_STREAMS , 441  #_SC_STREAMS _SC_STREAMS ) 442 m_SC_2_PBS_CHECKPOINT , 443  #_SC_2_PBS_CHECKPOINT _SC_2_PBS_CHECKPOINT ) 445 m_SC_V6_ILP32_OFF32 , 446  #_SC_V6_ILP32_OFF32 _SC_V6_ILP32_OFF32 ) 447 m_SC_V6_ILP32_OFFBIG , 448  #_SC_V6_ILP32_OFFBIG _SC_V6_ILP32_OFFBIG ) 449 m_SC_V6_LP64_OFF64 , 450  #_SC_V6_LP64_OFF64 _SC_V6_LP64_OFF64 ) 451 m_SC_V6_LPBIG_OFFBIG , 452  #_SC_V6_LPBIG_OFFBIG _SC_V6_LPBIG_OFFBIG ) 454 m_SC_HOST_NAME_MAX , 455  #_SC_HOST_NAME_MAX _SC_HOST_NAME_MAX ) 456 m_SC_TRACE , 457  #_SC_TRACE _SC_TRACE ) 458 m_SC_TRACE_EVENT_FILTER , 459  #_SC_TRACE_EVENT_FILTER _SC_TRACE_EVENT_FILTER ) 460 m_SC_TRACE_INHERIT , 461  #_SC_TRACE_INHERIT _SC_TRACE_INHERIT ) 462 m_SC_TRACE_LOG , 463  #_SC_TRACE_LOG _SC_TRACE_LOG ) 465 m_SC_LEVEL1_ICACHE_SIZE , 466  #_SC_LEVEL1_ICACHE_SIZE _SC_LEVEL1_ICACHE_SIZE ) 467 m_SC_LEVEL1_ICACHE_ASSOC , 468  #_SC_LEVEL1_ICACHE_ASSOC _SC_LEVEL1_ICACHE_ASSOC ) 469 m_SC_LEVEL1_ICACHE_LINESIZE , 470  #_SC_LEVEL1_ICACHE_LINESIZE _SC_LEVEL1_ICACHE_LINESIZE ) 471 m_SC_LEVEL1_DCACHE_SIZE , 472  #_SC_LEVEL1_DCACHE_SIZE _SC_LEVEL1_DCACHE_SIZE ) 473 m_SC_LEVEL1_DCACHE_ASSOC , 474  #_SC_LEVEL1_DCACHE_ASSOC _SC_LEVEL1_DCACHE_ASSOC ) 475 m_SC_LEVEL1_DCACHE_LINESIZE , 476  #_SC_LEVEL1_DCACHE_LINESIZE _SC_LEVEL1_DCACHE_LINESIZE ) 477 m_SC_LEVEL2_CACHE_SIZE , 478  #_SC_LEVEL2_CACHE_SIZE _SC_LEVEL2_CACHE_SIZE ) 479 m_SC_LEVEL2_CACHE_ASSOC , 480  #_SC_LEVEL2_CACHE_ASSOC _SC_LEVEL2_CACHE_ASSOC ) 481 m_SC_LEVEL2_CACHE_LINESIZE , 482  #_SC_LEVEL2_CACHE_LINESIZE _SC_LEVEL2_CACHE_LINESIZE ) 483 m_SC_LEVEL3_CACHE_SIZE , 484  #_SC_LEVEL3_CACHE_SIZE _SC_LEVEL3_CACHE_SIZE ) 485 m_SC_LEVEL3_CACHE_ASSOC , 486  #_SC_LEVEL3_CACHE_ASSOC _SC_LEVEL3_CACHE_ASSOC ) 487 m_SC_LEVEL3_CACHE_LINESIZE , 488  #_SC_LEVEL3_CACHE_LINESIZE _SC_LEVEL3_CACHE_LINESIZE ) 489 m_SC_LEVEL4_CACHE_SIZE , 490  #_SC_LEVEL4_CACHE_SIZE _SC_LEVEL4_CACHE_SIZE ) 491 m_SC_LEVEL4_CACHE_ASSOC , 492  #_SC_LEVEL4_CACHE_ASSOC _SC_LEVEL4_CACHE_ASSOC ) 493 m_SC_LEVEL4_CACHE_LINESIZE , 494  #_SC_LEVEL4_CACHE_LINESIZE _SC_LEVEL4_CACHE_LINESIZE ) 497 m_SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50, 498  #_SC_IPV6 _SC_IPV6 ) 499 m_SC_RAW_SOCKETS , 500  #_SC_RAW_SOCKETS _SC_RAW_SOCKETS ) 502 m_SC_V7_ILP32_OFF32 , 503  #_SC_V7_ILP32_OFF32 _SC_V7_ILP32_OFF32 ) 504 m_SC_V7_ILP32_OFFBIG , 505  #_SC_V7_ILP32_OFFBIG _SC_V7_ILP32_OFFBIG ) 506 m_SC_V7_LP64_OFF64 , 507  #_SC_V7_LP64_OFF64 _SC_V7_LP64_OFF64 ) 508 m_SC_V7_LPBIG_OFFBIG , 509  #_SC_V7_LPBIG_OFFBIG _SC_V7_LPBIG_OFFBIG ) 511 m_SC_SS_REPL_MAX , 512  #_SC_SS_REPL_MAX _SC_SS_REPL_MAX ) 514 m_SC_TRACE_EVENT_NAME_MAX , 515  #_SC_TRACE_EVENT_NAME_MAX _SC_TRACE_EVENT_NAME_MAX ) 516 m_SC_TRACE_NAME_MAX , 517  #_SC_TRACE_NAME_MAX _SC_TRACE_NAME_MAX ) 518 m_SC_TRACE_SYS_MAX , 519  #_SC_TRACE_SYS_MAX _SC_TRACE_SYS_MAX ) 520 m_SC_TRACE_USER_EVENT_MAX , 521  #_SC_TRACE_USER_EVENT_MAX _SC_TRACE_USER_EVENT_MAX ) 523 m_SC_XOPEN_STREAMS , 524  #_SC_XOPEN_STREAMS _SC_XOPEN_STREAMS ) 526 m_SC_THREAD_ROBUST_PRIO_INHERIT , 527  #_SC_THREAD_ROBUST_PRIO_INHERIT _SC_THREAD_ROBUST_PRIO_INHERIT ) 528 m_SC_THREAD_ROBUST_PRIO_PROTECT 529  #_SC_THREAD_ROBUST_PRIO_PROTECT _SC_THREAD_ROBUST_PRIO_PROTECT ) 535 m_CS_PATH , 536  #_CS_PATH _CS_PATH ) 538 m_CS_V6_WIDTH_RESTRICTED_ENVS , 539  #_CS_V6_WIDTH_RESTRICTED_ENVS _CS_V6_WIDTH_RESTRICTED_ENVS ) 540  #_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS _CS_V6_WIDTH_RESTRICTED_ENVS ) 542 m_CS_GNU_LIBC_VERSION , 543  #_CS_GNU_LIBC_VERSION _CS_GNU_LIBC_VERSION ) 544 m_CS_GNU_LIBPTHREAD_VERSION , 545  #_CS_GNU_LIBPTHREAD_VERSION _CS_GNU_LIBPTHREAD_VERSION ) 547 m_CS_V5_WIDTH_RESTRICTED_ENVS , 548  #_CS_V5_WIDTH_RESTRICTED_ENVS _CS_V5_WIDTH_RESTRICTED_ENVS ) 549  #_CS_POSIX_V5_WIDTH_RESTRICTED_ENVS _CS_V5_WIDTH_RESTRICTED_ENVS ) 551 m_CS_V7_WIDTH_RESTRICTED_ENVS , 552  #_CS_V7_WIDTH_RESTRICTED_ENVS _CS_V7_WIDTH_RESTRICTED_ENVS ) 553  #_CS_POSIX_V7_WIDTH_RESTRICTED_ENVS _CS_V7_WIDTH_RESTRICTED_ENVS ) 555 m_CS_LFS_CFLAGS = 1000, 556  #_CS_LFS_CFLAGS _CS_LFS_CFLAGS ) 557 m_CS_LFS_LDFLAGS , 558  #_CS_LFS_LDFLAGS _CS_LFS_LDFLAGS ) 559 m_CS_LFS_LIBS , 560  #_CS_LFS_LIBS _CS_LFS_LIBS ) 561 m_CS_LFS_LINTFLAGS , 562  #_CS_LFS_LINTFLAGS _CS_LFS_LINTFLAGS ) 563 m_CS_LFS64_CFLAGS , 564  #_CS_LFS64_CFLAGS _CS_LFS64_CFLAGS ) 565 m_CS_LFS64_LDFLAGS , 566  #_CS_LFS64_LDFLAGS _CS_LFS64_LDFLAGS ) 567 m_CS_LFS64_LIBS , 568  #_CS_LFS64_LIBS _CS_LFS64_LIBS ) 569 m_CS_LFS64_LINTFLAGS , 570  #_CS_LFS64_LINTFLAGS _CS_LFS64_LINTFLAGS ) 572 m_CS_XBS5_ILP32_OFF32_CFLAGS = 1100, 573  #_CS_XBS5_ILP32_OFF32_CFLAGS _CS_XBS5_ILP32_OFF32_CFLAGS ) 574 m_CS_XBS5_ILP32_OFF32_LDFLAGS , 575  #_CS_XBS5_ILP32_OFF32_LDFLAGS _CS_XBS5_ILP32_OFF32_LDFLAGS ) 576 m_CS_XBS5_ILP32_OFF32_LIBS , 577  #_CS_XBS5_ILP32_OFF32_LIBS _CS_XBS5_ILP32_OFF32_LIBS ) 578 m_CS_XBS5_ILP32_OFF32_LINTFLAGS , 579  #_CS_XBS5_ILP32_OFF32_LINTFLAGS _CS_XBS5_ILP32_OFF32_LINTFLAGS ) 580 m_CS_XBS5_ILP32_OFFBIG_CFLAGS , 581  #_CS_XBS5_ILP32_OFFBIG_CFLAGS _CS_XBS5_ILP32_OFFBIG_CFLAGS ) 582 m_CS_XBS5_ILP32_OFFBIG_LDFLAGS , 583  #_CS_XBS5_ILP32_OFFBIG_LDFLAGS _CS_XBS5_ILP32_OFFBIG_LDFLAGS ) 584 m_CS_XBS5_ILP32_OFFBIG_LIBS , 585  #_CS_XBS5_ILP32_OFFBIG_LIBS _CS_XBS5_ILP32_OFFBIG_LIBS ) 586 m_CS_XBS5_ILP32_OFFBIG_LINTFLAGS , 587  #_CS_XBS5_ILP32_OFFBIG_LINTFLAGS _CS_XBS5_ILP32_OFFBIG_LINTFLAGS ) 588 m_CS_XBS5_LP64_OFF64_CFLAGS , 589  #_CS_XBS5_LP64_OFF64_CFLAGS _CS_XBS5_LP64_OFF64_CFLAGS ) 590 m_CS_XBS5_LP64_OFF64_LDFLAGS , 591  #_CS_XBS5_LP64_OFF64_LDFLAGS _CS_XBS5_LP64_OFF64_LDFLAGS ) 592 m_CS_XBS5_LP64_OFF64_LIBS , 593  #_CS_XBS5_LP64_OFF64_LIBS _CS_XBS5_LP64_OFF64_LIBS ) 594 m_CS_XBS5_LP64_OFF64_LINTFLAGS , 595  #_CS_XBS5_LP64_OFF64_LINTFLAGS _CS_XBS5_LP64_OFF64_LINTFLAGS ) 596 m_CS_XBS5_LPBIG_OFFBIG_CFLAGS , 597  #_CS_XBS5_LPBIG_OFFBIG_CFLAGS _CS_XBS5_LPBIG_OFFBIG_CFLAGS ) 598 m_CS_XBS5_LPBIG_OFFBIG_LDFLAGS , 599  #_CS_XBS5_LPBIG_OFFBIG_LDFLAGS _CS_XBS5_LPBIG_OFFBIG_LDFLAGS ) 600 m_CS_XBS5_LPBIG_OFFBIG_LIBS , 601  #_CS_XBS5_LPBIG_OFFBIG_LIBS _CS_XBS5_LPBIG_OFFBIG_LIBS ) 602 m_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS , 603  #_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS ) 605 m_CS_POSIX_V6_ILP32_OFF32_CFLAGS , 606  #_CS_POSIX_V6_ILP32_OFF32_CFLAGS _CS_POSIX_V6_ILP32_OFF32_CFLAGS ) 607 m_CS_POSIX_V6_ILP32_OFF32_LDFLAGS , 608  #_CS_POSIX_V6_ILP32_OFF32_LDFLAGS _CS_POSIX_V6_ILP32_OFF32_LDFLAGS ) 609 m_CS_POSIX_V6_ILP32_OFF32_LIBS , 610  #_CS_POSIX_V6_ILP32_OFF32_LIBS _CS_POSIX_V6_ILP32_OFF32_LIBS ) 611 m_CS_POSIX_V6_ILP32_OFF32_LINTFLAGS , 612  #_CS_POSIX_V6_ILP32_OFF32_LINTFLAGS _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS ) 613 m_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS , 614  #_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS ) 615 m_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS , 616  #_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS ) 617 m_CS_POSIX_V6_ILP32_OFFBIG_LIBS , 618  #_CS_POSIX_V6_ILP32_OFFBIG_LIBS _CS_POSIX_V6_ILP32_OFFBIG_LIBS ) 619 m_CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS , 620  #_CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS ) 621 m_CS_POSIX_V6_LP64_OFF64_CFLAGS , 622  #_CS_POSIX_V6_LP64_OFF64_CFLAGS _CS_POSIX_V6_LP64_OFF64_CFLAGS ) 623 m_CS_POSIX_V6_LP64_OFF64_LDFLAGS , 624  #_CS_POSIX_V6_LP64_OFF64_LDFLAGS _CS_POSIX_V6_LP64_OFF64_LDFLAGS ) 625 m_CS_POSIX_V6_LP64_OFF64_LIBS , 626  #_CS_POSIX_V6_LP64_OFF64_LIBS _CS_POSIX_V6_LP64_OFF64_LIBS ) 627 m_CS_POSIX_V6_LP64_OFF64_LINTFLAGS , 628  #_CS_POSIX_V6_LP64_OFF64_LINTFLAGS _CS_POSIX_V6_LP64_OFF64_LINTFLAGS ) 629 m_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS , 630  #_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS ) 631 m_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS , 632  #_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS ) 633 m_CS_POSIX_V6_LPBIG_OFFBIG_LIBS , 634  #_CS_POSIX_V6_LPBIG_OFFBIG_LIBS _CS_POSIX_V6_LPBIG_OFFBIG_LIBS ) 635 m_CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS , 636  #_CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS ) 638 m_CS_POSIX_V7_ILP32_OFF32_CFLAGS , 639  #_CS_POSIX_V7_ILP32_OFF32_CFLAGS _CS_POSIX_V7_ILP32_OFF32_CFLAGS ) 640 m_CS_POSIX_V7_ILP32_OFF32_LDFLAGS , 641  #_CS_POSIX_V7_ILP32_OFF32_LDFLAGS _CS_POSIX_V7_ILP32_OFF32_LDFLAGS ) 642 m_CS_POSIX_V7_ILP32_OFF32_LIBS , 643  #_CS_POSIX_V7_ILP32_OFF32_LIBS _CS_POSIX_V7_ILP32_OFF32_LIBS ) 644 m_CS_POSIX_V7_ILP32_OFF32_LINTFLAGS , 645  #_CS_POSIX_V7_ILP32_OFF32_LINTFLAGS _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS ) 646 m_CS_POSIX_V7_ILP32_OFFBIG_CFLAGS , 647  #_CS_POSIX_V7_ILP32_OFFBIG_CFLAGS _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS ) 648 m_CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS , 649  #_CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS ) 650 m_CS_POSIX_V7_ILP32_OFFBIG_LIBS , 651  #_CS_POSIX_V7_ILP32_OFFBIG_LIBS _CS_POSIX_V7_ILP32_OFFBIG_LIBS ) 652 m_CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS , 653  #_CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS ) 654 m_CS_POSIX_V7_LP64_OFF64_CFLAGS , 655  #_CS_POSIX_V7_LP64_OFF64_CFLAGS _CS_POSIX_V7_LP64_OFF64_CFLAGS ) 656 m_CS_POSIX_V7_LP64_OFF64_LDFLAGS , 657  #_CS_POSIX_V7_LP64_OFF64_LDFLAGS _CS_POSIX_V7_LP64_OFF64_LDFLAGS ) 658 m_CS_POSIX_V7_LP64_OFF64_LIBS , 659  #_CS_POSIX_V7_LP64_OFF64_LIBS _CS_POSIX_V7_LP64_OFF64_LIBS ) 660 m_CS_POSIX_V7_LP64_OFF64_LINTFLAGS , 661  #_CS_POSIX_V7_LP64_OFF64_LINTFLAGS _CS_POSIX_V7_LP64_OFF64_LINTFLAGS ) 662 m_CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS , 663  #_CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS ) 664 m_CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS , 665  #_CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS ) 666 m_CS_POSIX_V7_LPBIG_OFFBIG_LIBS , 667  #_CS_POSIX_V7_LPBIG_OFFBIG_LIBS _CS_POSIX_V7_LPBIG_OFFBIG_LIBS ) 668 m_CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS , 669  #_CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS ) 671 m_CS_V6_ENV , 672  #_CS_V6_ENV _CS_V6_ENV ) 673 m_CS_V7_ENV 674  #_CS_V7_ENV _CS_V7_ENV ) @/usr/include/bits/environments.h 18 #ide _UNISTD_H 22  ~ 42 #i __WORDSIZE == 64 56  #_POSIX_V7_LPBIG_OFFBIG -1 ) 57  #_POSIX_V6_LPBIG_OFFBIG -1 ) 58  #_XBS5_LPBIG_OFFBIG -1 ) 61  #_POSIX_V7_LP64_OFF64 1 ) 62  #_POSIX_V6_LP64_OFF64 1 ) 63  #_XBS5_LP64_OFF64 1 ) 69  #_POSIX_V7_ILP32_OFFBIG 1 ) 70  #_POSIX_V6_ILP32_OFFBIG 1 ) 71  #_XBS5_ILP32_OFFBIG 1 ) 73 #ide __x86_64__ 75  #_POSIX_V7_ILP32_OFF32 1 ) 76  #_POSIX_V6_ILP32_OFF32 1 ) 77  #_XBS5_ILP32_OFF32 1 ) 95  #__ILP32_OFF32_CFLAGS "-m32" ) 96  #__ILP32_OFF32_LDFLAGS "-m32" ) 97 #i defed __x86_64__ && defed __ILP32__ 98  #__ILP32_OFFBIG_CFLAGS "-mx32" ) 99  #__ILP32_OFFBIG_LDFLAGS "-mx32" ) 101  #__ILP32_OFFBIG_CFLAGS "-m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" ) 102  #__ILP32_OFFBIG_LDFLAGS "-m32" ) 104  #__LP64_OFF64_CFLAGS "-m64" ) 105  #__LP64_OFF64_LDFLAGS "-m64" ) @/usr/include/bits/errno.h 19 #ifde _ERRNO_H 21 #unde EDOM 22 #unde EILSEQ 23 #unde ERANGE 24  ~ 27  #ENOTSUP EOPNOTSUPP ) 30 #ide ECANCELED 31  #ECANCELED 125 ) 35 #ide EOWNERDEAD 36  #EOWNERDEAD 130 ) 37  #ENOTRECOVERABLE 131 ) 40 #ide ERFKILL 41  #ERFKILL 132 ) 44 #ide EHWPOISON 45  #EHWPOISON 133 ) 48 #ide __ASSEMBLER__ 50 * $__o_loti ( __THROW `__ibu__ (( __cڡ__ )); 52 #i! defed _LIBC || defed _LIBC_REENTRANT 54  #o (* `__o_loti ()) ) 59 #i! defed _ERRNO_H && defed __ed_Emh 63  #EDOM 33 ) 64  #EILSEQ 84 ) 65  #ERANGE 34 ) @/usr/include/bits/fcntl.h 19 #ide _FCNTL_H 23 #ifde __x86_64__ 24  #__O_LARGEFILE 0 ) 27 #ifde __x86_64__ 29  #F_GETLK64 5 ) 30  #F_SETLK64 6 ) 31  #F_SETLKW64 7 ) 35  sock 37  ml_ty ; 38  ml_wh ; 39 #ide __USE_FILE_OFFSET64 40 __off_t ml_t ; 41 __off_t ml_n ; 43 __off64_t ml_t ; 44 __off64_t ml_n ; 46 __pid_t ml_pid ; 49 #ifde __USE_LARGEFILE64 50  sock64 52  ml_ty ; 53  ml_wh ; 54 __off64_t ml_t ; 55 __off64_t ml_n ; 56 __pid_t ml_pid ; 61  ~ @/usr/include/bits/fcntl2.h 19 #idef _FCNTL_H 25 #ide __USE_FILE_OFFSET64 26  $__ݒ_2 (cڡ * __th ,  __oag `__nnu ((1)); 27  `__REDIRECT ( __ݒ_s , (cڡ * __th ,  __oag , ...), 28 ݒ `__nnu ((1)); 30  `__REDIRECT ( __ݒ_2 , (cڡ * __th ,  __oag ), 31 __ݒ64_2 `__nnu ((1)); 32  `__REDIRECT ( __ݒ_s , (cڡ * __th ,  __oag , ...), 33 ݒ64 `__nnu ((1)); 35 `__rde ( __ݒ_too_my_gs , 37 `__rde ( __ݒ_missg_mode , 40 __ftify_funi  41 $ݒ (cڡ * __th ,  __oag , ...) 43 i( `__va_g_ck_n () > 1) 44 `__ݒ_too_my_gs (); 46 i( `__but_cڡt_p ( __oag )) 48 i( `__OPEN_NEEDS_MODE ( __oag && `__va_g_ck_n () < 1) 50 `__ݒ_missg_mode (); 51  `__ݒ_2 ( __th , __oag ); 53  `__ݒ_s ( __th , __oag , `__va_g_ck ()); 56 i( `__va_g_ck_n () < 1) 57  `__ݒ_2 ( __th , __oag ); 59  `__ݒ_s ( __th , __oag , `__va_g_ck ()); 60 } } 63 #ifde __USE_LARGEFILE64 64  $__ݒ64_2 (cڡ * __th ,  __oag `__nnu ((1)); 65  `__REDIRECT ( __ݒ64_s , (cڡ * __th ,  __oag , 66 ...), ݒ64 `__nnu ((1)); 67 `__rde ( __ݒ64_too_my_gs , 69 `__rde ( __ݒ64_missg_mode , 72 __ftify_funi  73 $ݒ64 (cڡ * __th ,  __oag , ...) 75 i( `__va_g_ck_n () > 1) 76 `__ݒ64_too_my_gs (); 78 i( `__but_cڡt_p ( __oag )) 80 i( `__OPEN_NEEDS_MODE ( __oag && `__va_g_ck_n () < 1) 82 `__ݒ64_missg_mode (); 83  `__ݒ64_2 ( __th , __oag ); 85  `__ݒ64_s ( __th , __oag , `__va_g_ck ()); 88 i( `__va_g_ck_n () < 1) 89  `__ݒ64_2 ( __th , __oag ); 91  `__ݒ64_s ( __th , __oag , `__va_g_ck ()); 92 } } 96 #ifde __USE_ATFILE 97 #ide __USE_FILE_OFFSET64 98  $__ݒ_2 ( __fd , cڡ * __th ,  __oag ) 99 `__nnu ((2)); 100  `__REDIRECT ( __ݒ_s , ( __fd , cڡ * __th , 101  __oag , ...), ݒ ) 102 `__nnu ((2)); 104  `__REDIRECT ( __ݒ_2 , ( __fd , cڡ * __th , 105  __oag ), __ݒ64_2 ) 106 `__nnu ((2)); 107  `__REDIRECT ( __ݒ_s , ( __fd , cڡ * __th , 108  __oag , ...), ݒ64 ) 109 `__nnu ((2)); 111 `__rde ( __ݒ_too_my_gs , 113 `__rde ( __ݒ_missg_mode , 116 __ftify_funi  117 $ݒ ( __fd , cڡ * __th ,  __oag , ...) 119 i( `__va_g_ck_n () > 1) 120 `__ݒ_too_my_gs (); 122 i( `__but_cڡt_p ( __oag )) 124 i( `__OPEN_NEEDS_MODE ( __oag && `__va_g_ck_n () < 1) 126 `__ݒ_missg_mode (); 127  `__ݒ_2 ( __fd , __th , __oag ); 129  `__ݒ_s ( __fd , __th , __oag , `__va_g_ck ()); 132 i( `__va_g_ck_n () < 1) 133  `__ݒ_2 ( __fd , __th , __oag ); 135  `__ݒ_s ( __fd , __th , __oag , `__va_g_ck ()); 136 } } 139 #ifde __USE_LARGEFILE64 140  $__ݒ64_2 ( __fd , cڡ * __th ,  __oag ) 141 `__nnu ((2)); 142  `__REDIRECT ( __ݒ64_s , ( __fd , cڡ * __th , 143  __oag , ...), ݒ64 ) 144 `__nnu ((2)); 145 `__rde ( __ݒ64_too_my_gs , 147 `__rde ( __ݒ64_missg_mode , 150 __ftify_funi  151 $ݒ64 ( __fd , cڡ * __th ,  __oag , ...) 153 i( `__va_g_ck_n () > 1) 154 `__ݒ64_too_my_gs (); 156 i( `__but_cڡt_p ( __oag )) 158 i( `__OPEN_NEEDS_MODE ( __oag && `__va_g_ck_n () < 1) 160 `__ݒ64_missg_mode (); 161  `__ݒ64_2 ( __fd , __th , __oag ); 163  `__ݒ64_s ( __fd , __th , __oag , `__va_g_ck ()); 166 i( `__va_g_ck_n () < 1) 167  `__ݒ64_2 ( __fd , __th , __oag ); 169  `__ݒ64_s ( __fd , __th , __oag , `__va_g_ck ()); 170 } } @/usr/include/bits/huge_val.h 20 #ide _MATH_H 26 #i __GNUC_PREREQ (3,3) 27  #HUGE_VAL ( `__but_huge_v ()) ) 28 #i __GNUC_PREREQ (2,96) 29  #HUGE_VAL ( __exnsi__ 0x1.0 p2047 ) ) 30 #i defed __GNUC__ 32  #HUGE_VAL \ 33 ( __exnsi__ \ 34 ((uni {  __l `__ibu__ (( `__mode__ ( __DI__ )));  __d ; }) \ 35 { __l : 0x7ff0000000000000ULL }). __d ) ) 39  ~ 41 uni {  m__c [8];  m__d ; } t__huge_v_t ; 43 #i __BYTE_ORDER = __BIG_ENDIAN 44  #__HUGE_VAL_bys { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 } ) 46 #i __BYTE_ORDER = __LITTLE_ENDIAN 47  #__HUGE_VAL_bys { 0, 0, 0, 0, 0, 0, 0xf0, 0x7} ) 50  __huge_v_t g__huge_v = { __HUGE_VAL_bys }; 51  #HUGE_VAL ( __huge_v . __d ) ) @/usr/include/bits/huge_valf.h 20 #ide _MATH_H 26 #i __GNUC_PREREQ (3,3) 27  #HUGE_VALF ( `__but_huge_vf ()) ) 28 #i __GNUC_PREREQ (2,96) 29  #HUGE_VALF ( __exnsi__ 0x1.0 p255f ) ) 30 #i defed __GNUC__ 32  #HUGE_VALF \ 33 ( __exnsi__ \ 34 ((uni {  __l `__ibu__ (( `__mode__ ( __SI__ )));  __d ; }) \ 35 { __l : 0x7f800000UL }). __d ) ) 39 uni {  m__c [4];  m__f ; } t__huge_vf_t ; 41 #i __BYTE_ORDER = __BIG_ENDIAN 42  #__HUGE_VALF_bys { 0x7f, 0x80, 0, 0 } ) 44 #i __BYTE_ORDER = __LITTLE_ENDIAN 45  #__HUGE_VALF_bys { 0, 0, 0x80, 0x7} ) 48  __huge_vf_t g__huge_vf = { __HUGE_VALF_bys }; 49  #HUGE_VALF ( __huge_vf . __f ) ) @/usr/include/bits/huge_vall.h 20 #ide _MATH_H 24 #i __GNUC_PREREQ (3,3) 25  #HUGE_VALL ( `__but_huge_vl ()) ) 26 #i __GNUC_PREREQ (2,96) 27  #HUGE_VALL ( __exnsi__ 0x1.0 p32767L ) ) 30  #__HUGE_VALL_bys { 0, 0, 0, 0, 0, 0, 0, 0x80, 0xff, 0x7f, 0, 0 } ) 32  #__huge_vl_t uni {  __c [12];  __ld ; } ) 33 #ifde __GNUC__ 34  #HUGE_VALL ( __exnsi__ \ 35 (( __huge_vl_t { __c : __HUGE_VALL_bys }). __ld ) ) 37  __huge_vl_t g__huge_vl = { __HUGE_VALL_bys }; 38  #HUGE_VALL ( __huge_vl . __ld ) ) @/usr/include/bits/in.h 20 #ide _NETINET_IN_H 29 #i defed _UAPI_LINUX_IN6_H || defed _UAPI_IPV6_H 33  #__USE_KERNEL_IPV6_DEFS ) 39  #IP_OPTIONS 4 ) 40  #IP_HDRINCL 3 ) 41  #IP_TOS 1 ) 42  #IP_TTL 2 ) 43  #IP_RECVOPTS 6 ) 45  #IP_RECVRETOPTS IP_RETOPTS ) 46  #IP_RETOPTS 7 ) 47  #IP_MULTICAST_IF 32 ) 48  #IP_MULTICAST_TTL 33 ) 49  #IP_MULTICAST_LOOP 34 ) 50  #IP_ADD_MEMBERSHIP 35 ) 51  #IP_DROP_MEMBERSHIP 36 ) 52  #IP_UNBLOCK_SOURCE 37 ) 53  #IP_BLOCK_SOURCE 38 ) 54  #IP_ADD_SOURCE_MEMBERSHIP 39 ) 55  #IP_DROP_SOURCE_MEMBERSHIP 40 ) 56  #IP_MSFILTER 41 ) 57 #ifde __USE_MISC 58  #MCAST_JOIN_GROUP 42 ) 59  #MCAST_BLOCK_SOURCE 43 ) 60  #MCAST_UNBLOCK_SOURCE 44 ) 61  #MCAST_LEAVE_GROUP 45 ) 62  #MCAST_JOIN_SOURCE_GROUP 46 ) 63  #MCAST_LEAVE_SOURCE_GROUP 47 ) 64  #MCAST_MSFILTER 48 ) 65  #IP_MULTICAST_ALL 49 ) 66  #IP_UNICAST_IF 50 ) 68  #MCAST_EXCLUDE 0 ) 69  #MCAST_INCLUDE 1 ) 72  #IP_ROUTER_ALERT 5 ) 73  #IP_PKTINFO 8 ) 74  #IP_PKTOPTIONS 9 ) 75  #IP_PMTUDISC 10 ) 76  #IP_MTU_DISCOVER 10 ) 77  #IP_RECVERR 11 ) 78  #IP_RECVTTL 12 ) 79  #IP_RECVTOS 13 ) 80  #IP_MTU 14 ) 81  #IP_FREEBIND 15 ) 82  #IP_IPSEC_POLICY 16 ) 83  #IP_XFRM_POLICY 17 ) 84  #IP_PASSSEC 18 ) 85  #IP_TRANSPARENT 19 ) 86  #IP_MULTICAST_ALL 49 ) 89  #IP_ORIGDSTADDR 20 ) 90  #IP_RECVORIGDSTADDR IP_ORIGDSTADDR ) 92  #IP_MINTTL 21 ) 93  #IP_NODEFRAG 22 ) 94  #IP_CHECKSUM 23 ) 95  #IP_BIND_ADDRESS_NO_PORT 24 ) 98  #IP_PMTUDISC_DONT 0 ) 99  #IP_PMTUDISC_WANT 1 ) 100  #IP_PMTUDISC_DO 2 ) 101  #IP_PMTUDISC_PROBE 3 ) 105  #IP_PMTUDISC_INTERFACE 4 ) 107  #IP_PMTUDISC_OMIT 5 ) 109  #IP_MULTICAST_IF 32 ) 110  #IP_MULTICAST_TTL 33 ) 111  #IP_MULTICAST_LOOP 34 ) 112  #IP_ADD_MEMBERSHIP 35 ) 113  #IP_DROP_MEMBERSHIP 36 ) 114  #IP_UNBLOCK_SOURCE 37 ) 115  #IP_BLOCK_SOURCE 38 ) 116  #IP_ADD_SOURCE_MEMBERSHIP 39 ) 117  #IP_DROP_SOURCE_MEMBERSHIP 40 ) 118  #IP_MSFILTER 41 ) 119  #IP_MULTICAST_ALL 49 ) 120  #IP_UNICAST_IF 50 ) 123  #SOL_IP 0 ) 125  #IP_DEFAULT_MULTICAST_TTL 1 ) 126  #IP_DEFAULT_MULTICAST_LOOP 1 ) 127  #IP_MAX_MEMBERSHIPS 20 ) 129 #ifde __USE_MISC 133  s_ts 135  _addr m_d ; 136  m_ts [40]; 140  s_mqn 142  _addr mimr_muɟddr ; 143  _addr mimr_addss ; 144  mimr_ifdex ; 148  s_pktfo 150  mi_ifdex ; 151  _addr mi_ec_d ; 152  _addr mi_addr ; 159  #IPV6_ADDRFORM 1 ) 160  #IPV6_2292PKTINFO 2 ) 161  #IPV6_2292HOPOPTS 3 ) 162  #IPV6_2292DSTOPTS 4 ) 163  #IPV6_2292RTHDR 5 ) 164  #IPV6_2292PKTOPTIONS 6 ) 165  #IPV6_CHECKSUM 7 ) 166  #IPV6_2292HOPLIMIT 8 ) 168  #SCM_SRCRT IPV6_RXSRCRT ) 170  #IPV6_NEXTHOP 9 ) 171  #IPV6_AUTHHDR 10 ) 172  #IPV6_UNICAST_HOPS 16 ) 173  #IPV6_MULTICAST_IF 17 ) 174  #IPV6_MULTICAST_HOPS 18 ) 175  #IPV6_MULTICAST_LOOP 19 ) 176  #IPV6_JOIN_GROUP 20 ) 177  #IPV6_LEAVE_GROUP 21 ) 178  #IPV6_ROUTER_ALERT 22 ) 179  #IPV6_MTU_DISCOVER 23 ) 180  #IPV6_MTU 24 ) 181  #IPV6_RECVERR 25 ) 182  #IPV6_V6ONLY 26 ) 183  #IPV6_JOIN_ANYCAST 27 ) 184  #IPV6_LEAVE_ANYCAST 28 ) 185  #IPV6_IPSEC_POLICY 34 ) 186  #IPV6_XFRM_POLICY 35 ) 189  #IPV6_RECVPKTINFO 49 ) 190  #IPV6_PKTINFO 50 ) 191  #IPV6_RECVHOPLIMIT 51 ) 192  #IPV6_HOPLIMIT 52 ) 193  #IPV6_RECVHOPOPTS 53 ) 194  #IPV6_HOPOPTS 54 ) 195  #IPV6_RTHDRDSTOPTS 55 ) 196  #IPV6_RECVRTHDR 56 ) 197  #IPV6_RTHDR 57 ) 198  #IPV6_RECVDSTOPTS 58 ) 199  #IPV6_DSTOPTS 59 ) 200  #IPV6_RECVPATHMTU 60 ) 201  #IPV6_PATHMTU 61 ) 202  #IPV6_DONTFRAG 62 ) 205  #IPV6_RECVTCLASS 66 ) 206  #IPV6_TCLASS 67 ) 209  #IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP ) 210  #IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP ) 211  #IPV6_RXHOPOPTS IPV6_HOPOPTS ) 212  #IPV6_RXDSTOPTS IPV6_DSTOPTS ) 215  #IPV6_PMTUDISC_DONT 0 ) 216  #IPV6_PMTUDISC_WANT 1 ) 217  #IPV6_PMTUDISC_DO 2 ) 218  #IPV6_PMTUDISC_PROBE 3 ) 219  #IPV6_PMTUDISC_INTERFACE 4 ) 220  #IPV6_PMTUDISC_OMIT 5 ) 223  #SOL_IPV6 41 ) 224  #SOL_ICMPV6 58 ) 227  #IPV6_RTHDR_LOOSE 0 ) 228  #IPV6_RTHDR_STRICT 1 ) 230  #IPV6_RTHDR_TYPE_0 0 ) @/usr/include/bits/inf.h 19 #ide _MATH_H 25 #i __GNUC_PREREQ (3,3) 26  #INFINITY ( `__but_ff ()) ) 28  #INFINITY HUGE_VALF ) @/usr/include/bits/math-finite.h 19 #ide _MATH_H 24  __REDIRECT_NTH ( acos , (), __acos_fe ); 25 #ifde __USE_ISOC99 26  __REDIRECT_NTH ( acosf , (), __acosf_fe ); 27 #ifde __MATH_DECLARE_LDOUBLE 28 #ifde __NO_LONG_DOUBLE_MATH 29  __REDIRECT_NTH ( aco , (), __acos_fe ); 31  __REDIRECT_NTH ( aco , (), __aco_fe ); 36 #i defed __USE_XOPEN_EXTENDED || defed __USE_ISOC99 38  __REDIRECT_NTH ( acosh , (), __acosh_fe ); 40 #ifde __USE_ISOC99 41  __REDIRECT_NTH ( acoshf , (), __acoshf_fe ); 42 #ifde __MATH_DECLARE_LDOUBLE 43 #ifde __NO_LONG_DOUBLE_MATH 44  __REDIRECT_NTH ( acoshl , (), __acosh_fe ); 46  __REDIRECT_NTH ( acoshl , (), __acoshl_fe ); 52  __REDIRECT_NTH ( as , (), __as_fe ); 53 #ifde __USE_ISOC99 54  __REDIRECT_NTH ( asf , (), __asf_fe ); 55 #ifde __MATH_DECLARE_LDOUBLE 56 #ifde __NO_LONG_DOUBLE_MATH 57  __REDIRECT_NTH ( asl , (), __as_fe ); 59  __REDIRECT_NTH ( asl , (), __asl_fe ); 65  __REDIRECT_NTH ( 2 , (, ), __2_fe ); 66 #ifde __USE_ISOC99 67  __REDIRECT_NTH ( 2f , (, ), __2f_fe ); 68 #ifde __MATH_DECLARE_LDOUBLE 69 #ifde __NO_LONG_DOUBLE_MATH 70  __REDIRECT_NTH ( 2l , (, ), 71 __2_fe ); 73  __REDIRECT_NTH ( 2l , (, ), 74 __2l_fe ); 79 #i defed __USE_XOPEN_EXTENDED || defed __USE_ISOC99 81  __REDIRECT_NTH ( h , (), __h_fe ); 83 #ifde __USE_ISOC99 84  __REDIRECT_NTH ( hf , (), __hf_fe ); 85 #ifde __MATH_DECLARE_LDOUBLE 86 #ifde __NO_LONG_DOUBLE_MATH 87  __REDIRECT_NTH ( hl , (), __h_fe ); 89  __REDIRECT_NTH ( hl , (), __hl_fe ); 95  __REDIRECT_NTH ( cosh , (), __cosh_fe ); 96 #ifde __USE_ISOC99 97  __REDIRECT_NTH ( coshf , (), __coshf_fe ); 98 #ifde __MATH_DECLARE_LDOUBLE 99 #ifde __NO_LONG_DOUBLE_MATH 100  __REDIRECT_NTH ( coshl , (), __cosh_fe ); 102  __REDIRECT_NTH ( coshl , (), __coshl_fe ); 108  __REDIRECT_NTH ( exp , (), __exp_fe ); 109 #ifde __USE_ISOC99 110  __REDIRECT_NTH ( expf , (), __expf_fe ); 111 #ifde __MATH_DECLARE_LDOUBLE 112 #ifde __NO_LONG_DOUBLE_MATH 113  __REDIRECT_NTH ( ex , (), __exp_fe ); 115  __REDIRECT_NTH ( ex , (), __ex_fe ); 120 #ifde __USE_GNU 122  __REDIRECT_NTH ( exp10 , (), __exp10_fe ); 123  __REDIRECT_NTH ( exp10f , (), __exp10f_fe ); 124 #ifde __MATH_DECLARE_LDOUBLE 125 #ifde __NO_LONG_DOUBLE_MATH 126  __REDIRECT_NTH ( exp10l , (), __exp10_fe ); 128  __REDIRECT_NTH ( exp10l , (), __exp10l_fe ); 133  __REDIRECT_NTH ( pow10 , (), __exp10_fe ); 134  __REDIRECT_NTH ( pow10f , (), __exp10f_fe ); 135 #ifde __MATH_DECLARE_LDOUBLE 136 #ifde __NO_LONG_DOUBLE_MATH 137  __REDIRECT_NTH ( pow10l , (), __exp10_fe ); 139  __REDIRECT_NTH ( pow10l , (), __exp10l_fe ); 144 #ifde __USE_ISOC99 146  __REDIRECT_NTH ( exp2 , (), __exp2_fe ); 147  __REDIRECT_NTH ( exp2f , (), __exp2f_fe ); 148 #ifde __MATH_DECLARE_LDOUBLE 149 #ifde __NO_LONG_DOUBLE_MATH 150  __REDIRECT_NTH ( exp2l , (), __exp2_fe ); 152  __REDIRECT_NTH ( exp2l , (), __exp2l_fe ); 158  __REDIRECT_NTH ( fmod , (, ), __fmod_fe ); 159 #ifde __USE_ISOC99 160  __REDIRECT_NTH ( fmodf , (, ), __fmodf_fe ); 161 #ifde __MATH_DECLARE_LDOUBLE 162 #ifde __NO_LONG_DOUBLE_MATH 163  __REDIRECT_NTH ( fmodl , (, ), 164 __fmod_fe ); 166  __REDIRECT_NTH ( fmodl , (, ), 167 __fmodl_fe ); 172 #i defed __USE_XOPEN || defed __USE_ISOC99 174  __REDIRECT_NTH ( hyp , (, ), __hyp_fe ); 176 #ifde __USE_ISOC99 177  __REDIRECT_NTH ( hypf , (, ), __hypf_fe ); 178 #ifde __MATH_DECLARE_LDOUBLE 179 #ifde __NO_LONG_DOUBLE_MATH 180  __REDIRECT_NTH ( hypl , (, ), 181 __hyp_fe ); 183  __REDIRECT_NTH ( hypl , (, ), 184 __hypl_fe ); 189 #i defed __USE_MISC || defed __USE_XOPEN 191  __REDIRECT_NTH ( j0 , (), __j0_fe ); 193 #i defed __USE_MISC && defed __USE_ISOC99 194  __REDIRECT_NTH ( j0f , (), __j0f_fe ); 195 #ifde __MATH_DECLARE_LDOUBLE 196 #ifde __NO_LONG_DOUBLE_MATH 197  __REDIRECT_NTH ( j0l , (), __j0_fe ); 199  __REDIRECT_NTH ( j0l , (), __j0l_fe ); 204 #i defed __USE_MISC || defed __USE_XOPEN 206  __REDIRECT_NTH ( y0 , (), __y0_fe ); 208 #i defed __USE_MISC && defed __USE_ISOC99 209  __REDIRECT_NTH ( y0f , (), __y0f_fe ); 210 #ifde __MATH_DECLARE_LDOUBLE 211 #ifde __NO_LONG_DOUBLE_MATH 212  __REDIRECT_NTH ( y0l , (), __y0_fe ); 214  __REDIRECT_NTH ( y0l , (), __y0l_fe ); 219 #i defed __USE_MISC || defed __USE_XOPEN 221  __REDIRECT_NTH ( j1 , (), __j1_fe ); 223 #i defed __USE_MISC && defed __USE_ISOC99 224  __REDIRECT_NTH ( j1f , (), __j1f_fe ); 225 #ifde __MATH_DECLARE_LDOUBLE 226 #ifde __NO_LONG_DOUBLE_MATH 227  __REDIRECT_NTH ( j1l , (), __j1_fe ); 229  __REDIRECT_NTH ( j1l , (), __j1l_fe ); 234 #i defed __USE_MISC || defed __USE_XOPEN 236  __REDIRECT_NTH ( y1 , (), __y1_fe ); 238 #i defed __USE_MISC && defed __USE_ISOC99 239  __REDIRECT_NTH ( y1f , (), __y1f_fe ); 240 #ifde __MATH_DECLARE_LDOUBLE 241 #ifde __NO_LONG_DOUBLE_MATH 242  __REDIRECT_NTH ( y1l , (), __y1_fe ); 244  __REDIRECT_NTH ( y1l , (), __y1l_fe ); 249 #i defed __USE_MISC || defed __USE_XOPEN 251  __REDIRECT_NTH ( jn , (, ), __jn_fe ); 253 #i defed __USE_MISC && defed __USE_ISOC99 254  __REDIRECT_NTH ( jnf , (, ), __jnf_fe ); 255 #ifde __MATH_DECLARE_LDOUBLE 256 #ifde __NO_LONG_DOUBLE_MATH 257  __REDIRECT_NTH ( j , (, ), __jn_fe ); 259  __REDIRECT_NTH ( j , (, ), __j_fe ); 264 #i defed __USE_MISC || defed __USE_XOPEN 266  __REDIRECT_NTH ( yn , (, ), __yn_fe ); 268 #i defed __USE_MISC && defed __USE_ISOC99 269  __REDIRECT_NTH ( ynf , (, ), __ynf_fe ); 270 #ifde __MATH_DECLARE_LDOUBLE 271 #ifde __NO_LONG_DOUBLE_MATH 272  __REDIRECT_NTH ( y , (, ), __yn_fe ); 274  __REDIRECT_NTH ( y , (, ), __y_fe ); 279 #ifde __USE_MISC 281  __REDIRECT_NTH ( lgamma_r , (, *), __lgamma_r_fe ); 282 #ifde __USE_ISOC99 283  __REDIRECT_NTH ( lgammaf_r , (, *), __lgammaf_r_fe ); 284 #ifde __MATH_DECLARE_LDOUBLE 285 #ifde __NO_LONG_DOUBLE_MATH 286  __REDIRECT_NTH ( lgamm_r , (, *), 287 __lgamma_r_fe ); 289  __REDIRECT_NTH ( lgamm_r , (, *), 290 __lgamm_r_fe ); 296  __lgamma_r_fe (, *); 297  __lgammaf_r_fe (, *); 298 #ifde __NO_LONG_DOUBLE_MATH 299  __REDIRECT_NTH ( __lgamm_r_fe , (, *), 300 __lgamma_r_fe ); 302  __lgamm_r_fe (, *); 305 #i(( defed __USE_XOPEN || defed __USE_ISOC99 ) \ 306 && defed g__ex_ways_le ) 308 __ex_ways_le  __NTH ( $lgamma ( __d )) 310 #i defed __USE_MISC || defed __USE_XOPEN 311  `__lgamma_r_fe ( __d , & signgam ); 313  __lol_signgam = 0; 314  `__lgamma_r_fe ( __d , & __lol_signgam ); 316 } } 318 #i defed __USE_ISOC99 && defed __ex_ways_le 319 __ex_ways_le  __NTH ( $lgammaf ( __d )) 321 #i defed __USE_MISC || defed __USE_XOPEN 322  `__lgammaf_r_fe ( __d , & signgam ); 324  __lol_signgam = 0; 325  `__lgammaf_r_fe ( __d , & __lol_signgam ); 327 } } 328 #ifde __MATH_DECLARE_LDOUBLE 329 __ex_ways_le  __NTH ( $lgamm ( __d )) 331 #i defed __USE_MISC || defed __USE_XOPEN 332  `__lgamm_r_fe ( __d , & signgam ); 334  __lol_signgam = 0; 335  `__lgamm_r_fe ( __d , & __lol_signgam ); 337 } } 341 #i(( defed __USE_MISC || (defed __USE_XOPEN && !defed __USE_XOPEN2K )) \ 342 && defed g__ex_ways_le ) 344 __ex_ways_le  __NTH ( $gamma ( __d )) 346  `__lgamma_r_fe ( __d , & signgam ); 347 } } 348 #ifde __USE_ISOC99 349 __ex_ways_le  __NTH ( $gammaf ( __d )) 351  `__lgammaf_r_fe ( __d , & signgam ); 352 } } 353 #ifde __MATH_DECLARE_LDOUBLE 354 __ex_ways_le  __NTH ( $gamm ( __d )) 356  `__lgamm_r_fe ( __d , & signgam ); 357 } } 363  __REDIRECT_NTH ( log , (), __log_fe ); 364 #ifde __USE_ISOC99 365  __REDIRECT_NTH ( logf , (), __logf_fe ); 366 #ifde __MATH_DECLARE_LDOUBLE 367 #ifde __NO_LONG_DOUBLE_MATH 368  __REDIRECT_NTH ( logl , (), __log_fe ); 370  __REDIRECT_NTH ( logl , (), __logl_fe ); 376  __REDIRECT_NTH ( log10 , (), __log10_fe ); 377 #ifde __USE_ISOC99 378  __REDIRECT_NTH ( log10f , (), __log10f_fe ); 379 #ifde __MATH_DECLARE_LDOUBLE 380 #ifde __NO_LONG_DOUBLE_MATH 381  __REDIRECT_NTH ( log10l , (), __log10_fe ); 383  __REDIRECT_NTH ( log10l , (), __log10l_fe ); 388 #ifde __USE_ISOC99 390  __REDIRECT_NTH ( log2 , (), __log2_fe ); 391  __REDIRECT_NTH ( log2f , (), __log2f_fe ); 392 #ifde __MATH_DECLARE_LDOUBLE 393 #ifde __NO_LONG_DOUBLE_MATH 394  __REDIRECT_NTH ( log2l , (), __log2_fe ); 396  __REDIRECT_NTH ( log2l , (), __log2l_fe ); 402  __REDIRECT_NTH ( pow , (, ), __pow_fe ); 403 #ifde __USE_ISOC99 404  __REDIRECT_NTH ( powf , (, ), __powf_fe ); 405 #ifde __MATH_DECLARE_LDOUBLE 406 #ifde __NO_LONG_DOUBLE_MATH 407  __REDIRECT_NTH ( powl , (, ), 408 __pow_fe ); 410  __REDIRECT_NTH ( powl , (, ), 411 __powl_fe ); 416 #i defed __USE_XOPEN_EXTENDED || defed __USE_ISOC99 418  __REDIRECT_NTH ( mad , (, ), __mad_fe ); 420 #ifde __USE_ISOC99 421  __REDIRECT_NTH ( madf , (, ), __madf_fe ); 422 #ifde __MATH_DECLARE_LDOUBLE 423 #ifde __NO_LONG_DOUBLE_MATH 424  __REDIRECT_NTH ( madl , (, ), 425 __mad_fe ); 427  __REDIRECT_NTH ( madl , (, ), 428 __madl_fe ); 433 #i( defed __USE_MISC \ 434 || ( defed g__USE_XOPEN_EXTENDED && !defed g__USE_XOPEN2K8 )) 436  __REDIRECT_NTH ( slb , (, ), __slb_fe ); 438 #i defed __USE_MISC && defed __USE_ISOC99 439  __REDIRECT_NTH ( slbf , (, ), __slbf_fe ); 440 #ifde __MATH_DECLARE_LDOUBLE 441 #ifde __NO_LONG_DOUBLE_MATH 442  __REDIRECT_NTH ( slbl , (, ), 443 __slb_fe ); 445  __REDIRECT_NTH ( slbl , (, ), 446 __slbl_fe ); 452  __REDIRECT_NTH ( sh , (), __sh_fe ); 453 #ifde __USE_ISOC99 454  __REDIRECT_NTH ( shf , (), __shf_fe ); 455 #ifde __MATH_DECLARE_LDOUBLE 456 #ifde __NO_LONG_DOUBLE_MATH 457  __REDIRECT_NTH ( shl , (), __sh_fe ); 459  __REDIRECT_NTH ( shl , (), __shl_fe ); 465  __REDIRECT_NTH ( sq , (), __sq_fe ); 466 #ifde __USE_ISOC99 467  __REDIRECT_NTH ( sqf , (), __sqf_fe ); 468 #ifde __MATH_DECLARE_LDOUBLE 469 #ifde __NO_LONG_DOUBLE_MATH 470  __REDIRECT_NTH ( sql , (), __sq_fe ); 472  __REDIRECT_NTH ( sql , (), __sql_fe ); 477 #i defed __USE_ISOC99 && defed __ex_ways_le 479  __gamma_r_fe (, *); 480 __ex_ways_le  __NTH ( $tgamma ( __d )) 482  __lol_signgam = 0; 483  __s = `__gamma_r_fe ( __d , & __lol_signgam ); 484  __lol_signgam < 0 ? - __s : __res; 485 } } 486  __gammaf_r_fe (, *); 487 __ex_ways_le  __NTH ( $tgammaf ( __d )) 489  __lol_signgam = 0; 490  __s = `__gammaf_r_fe ( __d , & __lol_signgam ); 491  __lol_signgam < 0 ? - __s : __res; 492 } } 493 #ifde __MATH_DECLARE_LDOUBLE 494  __gamm_r_fe (, *); 495 __ex_ways_le  __NTH ( $tgamm ( __d )) 497  __lol_signgam = 0; 498 #ifde __NO_LONG_DOUBLE_MATH 499  __s = `__gamma_r_fe ( __d , & __lol_signgam ); 501  __s = `__gamm_r_fe ( __d , & __lol_signgam ); 503  __lol_signgam < 0 ? - __s : __res; 504 } } @/usr/include/bits/math-vector.h 19 #ide _MATH_H 25  ~ 27 #i defed __x86_64__ && defed __FAST_MATH__ 28 #i defed _OPENMP && _OPENMP >= 201307 30  #__DECL_SIMD_x86_64 `_Pgma ("omdesimdٚbnch") ) 31 #i __GNUC_PREREQ (6,0) 33  #__DECL_SIMD_x86_64 `__ibu__ (( `__simd__ ("nٚbnch"))) ) 36 #ifde __DECL_SIMD_x86_64 37 #unde __DECL_SIMD_cos 38  #__DECL_SIMD_cos __DECL_SIMD_x86_64 ) 39 #unde __DECL_SIMD_cosf 40  #__DECL_SIMD_cosf __DECL_SIMD_x86_64 ) 41 #unde __DECL_SIMD_s 42  #__DECL_SIMD_s __DECL_SIMD_x86_64 ) 43 #unde __DECL_SIMD_sf 44  #__DECL_SIMD_sf __DECL_SIMD_x86_64 ) 45 #unde __DECL_SIMD_scos 46  #__DECL_SIMD_scos __DECL_SIMD_x86_64 ) 47 #unde __DECL_SIMD_scosf 48  #__DECL_SIMD_scosf __DECL_SIMD_x86_64 ) 49 #unde __DECL_SIMD_log 50  #__DECL_SIMD_log __DECL_SIMD_x86_64 ) 51 #unde __DECL_SIMD_logf 52  #__DECL_SIMD_logf __DECL_SIMD_x86_64 ) 53 #unde __DECL_SIMD_exp 54  #__DECL_SIMD_exp __DECL_SIMD_x86_64 ) 55 #unde __DECL_SIMD_expf 56  #__DECL_SIMD_expf __DECL_SIMD_x86_64 ) 57 #unde __DECL_SIMD_pow 58  #__DECL_SIMD_pow __DECL_SIMD_x86_64 ) 59 #unde __DECL_SIMD_powf 60  #__DECL_SIMD_powf __DECL_SIMD_x86_64 ) @/usr/include/bits/mathcalls.h 45 #ide _MATH_H 52 _Mdoub_BEGIN_NAMESPACE 54 __MATHCALL ( acos ,, ( _Mdoub_ __x )); 56 __MATHCALL ( as ,, ( _Mdoub_ __x )); 58 __MATHCALL ( ,, ( _Mdoub_ __x )); 60 __MATHCALL ( 2 ,, ( _Mdoub_ __y , _Mdoub_ __x )); 63 __MATHCALL_VEC ( cos ,, ( _Mdoub_ __x )); 65 __MATHCALL_VEC ( s ,, ( _Mdoub_ __x )); 67 __MATHCALL ( n ,, ( _Mdoub_ __x )); 72 __MATHCALL ( cosh ,, ( _Mdoub_ __x )); 74 __MATHCALL ( sh ,, ( _Mdoub_ __x )); 76 __MATHCALL ( nh ,, ( _Mdoub_ __x )); 77 g_Mdoub_END_NAMESPACE 79 #ifde __USE_GNU 81 __MATHDECL_VEC (, scos ,, 82 ( _Mdoub_ __x , _Mdoub_ * __sx , _Mdoub_ * __cosx )); 85 #i defed __USE_XOPEN_EXTENDED || defed __USE_ISOC99 86 __BEGIN_NAMESPACE_C99 88 __MATHCALL ( acosh ,, ( _Mdoub_ __x )); 90 __MATHCALL ( ash ,, ( _Mdoub_ __x )); 92 __MATHCALL ( h ,, ( _Mdoub_ __x )); 93 g__END_NAMESPACE_C99 98 _Mdoub_BEGIN_NAMESPACE 100 __MATHCALL_VEC ( exp ,, ( _Mdoub_ __x )); 103 __MATHCALL ( exp ,, ( _Mdoub_ __x , * __expڒt )); 106 __MATHCALL ( ldexp ,, ( _Mdoub_ __x ,  __expڒt )); 109 __MATHCALL_VEC ( log ,, ( _Mdoub_ __x )); 112 __MATHCALL ( log10 ,, ( _Mdoub_ __x )); 115 __MATHCALL ( modf ,, ( _Mdoub_ __x , _Mdoub_ * __ ) __nnu ((2)); 116 g_Mdoub_END_NAMESPACE 118 #ifde __USE_GNU 120 __MATHCALL ( exp10 ,, ( _Mdoub_ __x )); 122 __MATHCALL ( pow10 ,, ( _Mdoub_ __x )); 125 #i defed __USE_XOPEN_EXTENDED || defed __USE_ISOC99 126 __BEGIN_NAMESPACE_C99 128 __MATHCALL ( expm1 ,, ( _Mdoub_ __x )); 131 __MATHCALL ( log1p ,, ( _Mdoub_ __x )); 134 __MATHCALL ( logb ,, ( _Mdoub_ __x )); 135 g__END_NAMESPACE_C99 138 #ifde __USE_ISOC99 139 __BEGIN_NAMESPACE_C99 141 __MATHCALL ( exp2 ,, ( _Mdoub_ __x )); 144 __MATHCALL ( log2 ,, ( _Mdoub_ __x )); 145 g__END_NAMESPACE_C99 151 _Mdoub_BEGIN_NAMESPACE 153 __MATHCALL_VEC ( pow ,, ( _Mdoub_ __x , _Mdoub_ __y )); 156 __MATHCALL ( sq ,, ( _Mdoub_ __x )); 157 g_Mdoub_END_NAMESPACE 159 #i defed __USE_XOPEN || defed __USE_ISOC99 160 __BEGIN_NAMESPACE_C99 162 __MATHCALL ( hyp ,, ( _Mdoub_ __x , _Mdoub_ __y )); 163 g__END_NAMESPACE_C99 166 #i defed __USE_XOPEN_EXTENDED || defed __USE_ISOC99 167 __BEGIN_NAMESPACE_C99 169 __MATHCALL ( cb ,, ( _Mdoub_ __x )); 170 g__END_NAMESPACE_C99 176 _Mdoub_BEGIN_NAMESPACE 178 __MATHCALLX ( ,, ( _Mdoub_ __x ), ( __cڡ__ )); 181 __MATHCALLX ( bs ,, ( _Mdoub_ __x ), ( __cڡ__ )); 184 __MATHCALLX ( o ,, ( _Mdoub_ __x ), ( __cڡ__ )); 187 __MATHCALL ( fmod ,, ( _Mdoub_ __x , _Mdoub_ __y )); 192 __MATHDECL_1 (, __isf ,, ( _Mdoub_ __vue ) __ibu__ (( __cڡ__ )); 195 __MATHDECL_1 (, __fe ,, ( _Mdoub_ __vue ) __ibu__ (( __cڡ__ )); 196 g_Mdoub_END_NAMESPACE 198 #ifde __USE_MISC 199 #i(! defed __lulus \ 200 || g__lulus < 201103L \ 201 || g__MATH_DECLARING_DOUBLE == 0) 204 __MATHDECL_1 (, isf ,, ( _Mdoub_ __vue ) __ibu__ (( __cڡ__ )); 208 __MATHDECL_1 (, fe ,, ( _Mdoub_ __vue ) __ibu__ (( __cڡ__ )); 211 __MATHCALL ( dm ,, ( _Mdoub_ __x , _Mdoub_ __y )); 215 __MATHCALL ( signifind ,, ( _Mdoub_ __x )); 218 #ifde __USE_ISOC99 219 __BEGIN_NAMESPACE_C99 221 __MATHCALLX ( cysign ,, ( _Mdoub_ __x , _Mdoub_ __y ), ( __cڡ__ )); 222 g__END_NAMESPACE_C99 225 #ifde __USE_ISOC99 226 __BEGIN_NAMESPACE_C99 228 __MATHCALLX ( n ,, (cڡ * __gb ), ( __cڡ__ )); 229 g__END_NAMESPACE_C99 234 __MATHDECL_1 (, __i ,, ( _Mdoub_ __vue ) __ibu__ (( __cڡ__ )); 236 #i defed __USE_MISC || (defed __USE_XOPEN && !defed __USE_XOPEN2K ) 237 #i(! defed __lulus \ 238 || g__lulus < 201103L \ 239 || g__MATH_DECLARING_DOUBLE == 0) 241 __MATHDECL_1 (, i ,, ( _Mdoub_ __vue ) __ibu__ (( __cڡ__ )); 245 #i defed __USE_MISC || (defed __USE_XOPEN && __MATH_DECLARING_DOUBLE ) 247 __MATHCALL ( j0 ,, ( _Mdoub_ )); 248 __MATHCALL ( j1 ,, ( _Mdoub_ )); 249 __MATHCALL ( jn ,, (, _Mdoub_ )); 250 __MATHCALL ( y0 ,, ( _Mdoub_ )); 251 __MATHCALL ( y1 ,, ( _Mdoub_ )); 252 __MATHCALL ( yn ,, (, _Mdoub_ )); 256 #i defed __USE_XOPEN || defed __USE_ISOC99 257 __BEGIN_NAMESPACE_C99 259 __MATHCALL ( f ,, ( _Mdoub_ )); 260 __MATHCALL ( fc ,, ( _Mdoub_ )); 261 __MATHCALL ( lgamma ,, ( _Mdoub_ )); 262 g__END_NAMESPACE_C99 265 #ifde __USE_ISOC99 266 __BEGIN_NAMESPACE_C99 268 __MATHCALL ( tgamma ,, ( _Mdoub_ )); 269 g__END_NAMESPACE_C99 272 #i defed __USE_MISC || (defed __USE_XOPEN && !defed __USE_XOPEN2K ) 274 __MATHCALL ( gamma ,, ( _Mdoub_ )); 277 #ifde __USE_MISC 281 __MATHCALL ( lgamma , _r , ( _Mdoub_ , * __signgamp )); 285 #i defed __USE_XOPEN_EXTENDED || defed __USE_ISOC99 286 __BEGIN_NAMESPACE_C99 289 __MATHCALL ( rt ,, ( _Mdoub_ __x )); 292 __MATHCALLX ( x ,, ( _Mdoub_ __x , _Mdoub_ __y ), ( __cڡ__ )); 293 #i defed __USE_ISOC99 && !defed __LDBL_COMPAT 294 __MATHCALLX ( xowd ,, ( _Mdoub_ __x ,  __y ), ( __cڡ__ )); 298 __MATHCALL ( mad ,, ( _Mdoub_ __x , _Mdoub_ __y )); 300 #ifde __USE_ISOC99 302 __MATHCALL ( slbn ,, ( _Mdoub_ __x ,  __n )); 306 __MATHDECL (, ogb ,, ( _Mdoub_ __x )); 309 #ifde __USE_ISOC99 311 __MATHCALL ( slb ,, ( _Mdoub_ __x ,  __n )); 315 __MATHCALL ( ìbyt ,, ( _Mdoub_ __x )); 319 __MATHCALLX ( round ,, ( _Mdoub_ __x ), ( __cڡ__ )); 323 __MATHCALLX ( unc ,, ( _Mdoub_ __x ), ( __cڡ__ )); 328 __MATHCALL ( mquo ,, ( _Mdoub_ __x , _Mdoub_ __y , * __quo )); 335 __MATHDECL (, ̚t ,, ( _Mdoub_ __x )); 336 __exnsi__ 337 __MATHDECL (, rt ,, ( _Mdoub_ __x )); 341 __MATHDECL (, ound ,, ( _Mdoub_ __x )); 342 __exnsi__ 343 __MATHDECL (, round ,, ( _Mdoub_ __x )); 347 __MATHCALL ( fdim ,, ( _Mdoub_ __x , _Mdoub_ __y )); 350 __MATHCALLX ( fmax ,, ( _Mdoub_ __x , _Mdoub_ __y ), ( __cڡ__ )); 353 __MATHCALLX ( fm ,, ( _Mdoub_ __x , _Mdoub_ __y ), ( __cڡ__ )); 357 __MATHDECL_1 (, __assify ,, ( _Mdoub_ __vue )) 358 __ibu__ (( __cڡ__ )); 361 __MATHDECL_1 (, __signb ,, ( _Mdoub_ __vue )) 362 __ibu__ (( __cڡ__ )); 366 __MATHCALL ( fma ,, ( _Mdoub_ __x , _Mdoub_ __y , _Mdoub_ __z )); 369 #i defed __USE_XOPEN_EXTENDED || defed __USE_ISOC99 370 g__END_NAMESPACE_C99 373 #ifde __USE_GNU 375 __MATHDECL_1 (, __issiglg ,, ( _Mdoub_ __vue )) 376 __ibu__ (( __cڡ__ )); 379 #i defed __USE_MISC || (defed __USE_XOPEN_EXTENDED \ 380 && g__MATH_DECLARING_DOUBLE \ 381 && ! defed g__USE_XOPEN2K8 ) 383 __MATHCALL ( slb ,, ( _Mdoub_ __x , _Mdoub_ __n )); @/usr/include/bits/mathdef.h 18 #i! defed _MATH_H && !defed _COMPLEX_H 22 #i defed __USE_ISOC99 && defed _MATH_H && !defed _MATH_H_MATHDEF 23  #_MATH_H_MATHDEF 1 ) 25 #i defed __x86_64__ || (defed __FLT_EVAL_METHOD__ && __FLT_EVAL_METHOD__ == 0) 28  tt_t ; 29  tdoub_t ; 35  tt_t ; 37  tdoub_t ; 42  #FP_ILOGB0 (-2147483647 - 1) ) 43  #FP_ILOGBNAN (-2147483647 - 1) ) 47 #ifde __FP_FAST_FMA 48  #FP_FAST_FMA 1 ) 51 #ifde __FP_FAST_FMAF 52  #FP_FAST_FMAF 1 ) 55 #ifde __FP_FAST_FMAL 56  #FP_FAST_FMAL 1 ) @/usr/include/bits/mathinline.h 19 #ide _MATH_H 23 #ide __ex_ways_le 24  #__MATH_INLINE __le ) 26  #__MATH_INLINE __ex_ways_le ) 30 #i defed __USE_ISOC99 && defed __GNUC__ && __GNUC__ >= 2 32 #i! __GNUC_PREREQ (2,97) 37 #unde isg 38 #unde isgequ 39 #unde iess 40 #unde iesqu 41 #unde iessg 42 #unde isunded 43 #ifde __i686__ 46  #isg ( x , y ) \ 47 ({  __su ; \ 48 `__asm__ ("fucomip %%st(1), %%st; seta %%al" \ 49 : "" ( __su : "u" ( y ), "t" ( x ) : "cc", "st"); \ 50 __su ; }) ) 51  #isgequ ( x , y ) \ 52 ({  __su ; \ 53 `__asm__ ("fucomip %%st(1), %%st; setae %%al" \ 54 : "" ( __su : "u" ( y ), "t" ( x ) : "cc", "st"); \ 55 __su ; }) ) 57  #iess ( x , y ) \ 58 ({  __su ; \ 59 `__asm__ ("fucomip %%st(1), %%st; seta %%al" \ 60 : "" ( __su : "u" ( x ), "t" ( y ) : "cc", "st"); \ 61 __su ; }) ) 63  #iesqu ( x , y ) \ 64 ({  __su ; \ 65 `__asm__ ("fucomip %%st(1), %%st; setae %%al" \ 66 : "" ( __su : "u" ( x ), "t" ( y ) : "cc", "st"); \ 67 __su ; }) ) 69  #iessg ( x , y ) \ 70 ({  __su ; \ 71 `__asm__ ("fucomip %%st(1), %%st; setne %%al" \ 72 : "" ( __su : "u" ( y ), "t" ( x ) : "cc", "st"); \ 73 __su ; }) ) 75  #isunded ( x , y ) \ 76 ({  __su ; \ 77 `__asm__ ("fucomip %%st(1), %%st; setp %%al" \ 78 : "" ( __su : "u" ( y ), "t" ( x ) : "cc", "st"); \ 79 __su ; }) ) 82  #isg ( x , y ) \ 83 ({  __su ; \ 84 `__asm__ ("fucompp; fnstsw;estb $0x45, %%ah; setz %%al" \ 85 : "" ( __su : "u" ( y ), "t" ( x ) : "cc", "st", "st(1)"); \ 86 __su ; }) ) 88  #isgequ ( x , y ) \ 89 ({  __su ; \ 90 `__asm__ ("fucompp; fnstsw;estb $0x05, %%ah; setz %%al" \ 91 : "" ( __su : "u" ( y ), "t" ( x ) : "cc", "st", "st(1)"); \ 92 __su ; }) ) 94  #iess ( x , y ) \ 95 ({  __su ; \ 96 `__asm__ ("fucompp; fnstsw;estb $0x45, %%ah; setz %%al" \ 97 : "" ( __su : "u" ( x ), "t" ( y ) : "cc", "st", "st(1)"); \ 98 __su ; }) ) 100  #iesqu ( x , y ) \ 101 ({  __su ; \ 102 `__asm__ ("fucompp; fnstsw;estb $0x05, %%ah; setz %%al" \ 103 : "" ( __su : "u" ( x ), "t" ( y ) : "cc", "st", "st(1)"); \ 104 __su ; }) ) 106  #iessg ( x , y ) \ 107 ({  __su ; \ 108 `__asm__ ("fucompp; fnstsw;estb $0x44, %%ah; setz %%al" \ 109 : "" ( __su : "u" ( y ), "t" ( x ) : "cc", "st", "st(1)"); \ 110 __su ; }) ) 112  #isunded ( x , y ) \ 113 ({  __su ; \ 114 `__asm__ ("fucompp; fnstsw; sahf; setp %%al" \ 115 : "" ( __su : "u" ( y ), "t" ( x ) : "cc", "st", "st(1)"); \ 116 __su ; }) ) 122 #i __GNUC_PREREQ (2, 8) 123 __BEGIN_NAMESPACE_C99 126 __MATH_INLINE  127 __NTH ( $__signbf ( __x )) 129 #ifde __SSE2_MATH__ 130  __m ; 131 `__asm ("pmovmskb %1, %0" : "" ( __m : "x" ( __x )); 132  ( __m & 0x8) != 0; 134 __exnsi__ uni {  __f ;  __i ; } __u = { __f: __x }; 135  __u . __i < 0; 137 } } 138 __MATH_INLINE  139 __NTH ( $__signb ( __x )) 141 #ifde __SSE2_MATH__ 142  __m ; 143 `__asm ("pmovmskb %1, %0" : "" ( __m : "x" ( __x )); 144  ( __m & 0x80) != 0; 146 __exnsi__ uni {  __d ;  __i [2]; } __u = { __d: __x }; 147  __u . __i [1] < 0; 149 } } 150 __MATH_INLINE  151 __NTH ( $__signbl ( __x )) 153 __exnsi__ uni {  __l ;  __i [3]; } __u = { __l: __x }; 154  ( __u . __i [2] & 0x8000) != 0; 155 } } 157 g__END_NAMESPACE_C99 164 #i __GNUC_PREREQ (2, 8) 165 #i! __GNUC_PREREQ (3, 4&& ! defed __NO_MATH_INLINES \ 166 && defed g__OPTIMIZE__ 170 #ifde __USE_ISOC99 171 g__BEGIN_NAMESPACE_C99 174 #ifde __SSE_MATH__ 175 __MATH_INLINE  176 __NTH ( $̚tf ( __x )) 178  __s ; 183 __asm `__vީe__ ("cvtss2s%1, %0" : "" ( __s : "xm" ( __x )); 184  __s ; 185 } } 187 #ifde __SSE2_MATH__ 188 __MATH_INLINE  189 __NTH ( $̚t ( __x )) 191  __s ; 196 __asm `__vީe__ ("cvtsd2s%1, %0" : "" ( __s : "xm" ( __x )); 197  __s ; 198 } } 200 #ifde __x86_64__ 201 __exnsi__ 202 __MATH_INLINE  203 __NTH ( $rtf ( __x )) 205  __s ; 210 __asm `__vީe__ ("cvtss2s%1, %0" : "" ( __s : "xm" ( __x )); 211  __s ; 212 } } 213 __exnsi__ 214 __MATH_INLINE  215 __NTH ( $rt ( __x )) 217  __s ; 222 __asm `__vީe__ ("cvtsd2s%1, %0" : "" ( __s : "xm" ( __x )); 223  __s ; 224 } } 227 #i defed __FINITE_MATH_ONLY__ && __FINITE_MATH_ONLY__ > 0 \ 228 && defed __SSE2_MATH__ 230 __MATH_INLINE  231 __NTH ( $fmaxf ( __x ,  __y )) 233 #ifde __AVX__ 234  __s ; 235 `__asm ("vmaxs%2, %1, %0" : "=x" ( __s : "x" ( x ), "xm" ( __y )); 236  __s ; 238 `__asm ("maxs%1, %0" : "+x" ( __x : "xm" ( __y )); 239  __x ; 241 } } 242 __MATH_INLINE  243 __NTH ( $fmax ( __x ,  __y )) 245 #ifde __AVX__ 246  __s ; 247 `__asm ("vmaxsd %2, %1, %0" : "=x" ( __s : "x" ( x ), "xm" ( __y )); 248  __s ; 250 `__asm ("maxsd %1, %0" : "+x" ( __x : "xm" ( __y )); 251  __x ; 253 } } 256 __MATH_INLINE  257 __NTH ( $fmf ( __x ,  __y )) 259 #ifde __AVX__ 260  __s ; 261 `__asm ("vms%2, %1, %0" : "=x" ( __s : "x" ( x ), "xm" ( __y )); 262  __s ; 264 `__asm ("ms%1, %0" : "+x" ( __x : "xm" ( __y )); 265  __x ; 267 } } 268 __MATH_INLINE  269 __NTH ( $fm ( __x ,  __y )) 271 #ifde __AVX__ 272  __s ; 273 `__asm ("vmsd %2, %1, %0" : "=x" ( __s : "x" ( x ), "xm" ( __y )); 274  __s ; 276 `__asm ("msd %1, %0" : "+x" ( __x : "xm" ( __y )); 277  __x ; 279 } } 282 g__END_NAMESPACE_C99 285 #i defed __SSE4_1__ && defed __SSE2_MATH__ 286 #i defed __USE_XOPEN_EXTENDED || defed __USE_ISOC99 287 __BEGIN_NAMESPACE_C99 290 __MATH_INLINE  291 __NTH ( $rt ( __x )) 293  __s ; 298 __asm `__vީe__ ("roundsd $4, %1, %0" : "=x" ( __s : "xm" ( __x )); 299  __s ; 300 } } 301 __MATH_INLINE  302 __NTH ( $rtf ( __x )) 304  __s ; 309 __asm `__vީe__ ("rounds$4, %1, %0" : "=x" ( __s : "xm" ( __x )); 310  __s ; 311 } } 313 #ifde __USE_ISOC99 315 __MATH_INLINE  316 __NTH ( $ìbyt ( __x )) 318  __s ; 323 __asm `__vީe__ ("roundsd $0xc, %1, %0" : "=x" ( __s : "xm" ( __x )); 324  __s ; 325 } } 326 __MATH_INLINE  327 __NTH ( $ìbytf ( __x )) 329  __s ; 334 __asm `__vީe__ ("rounds$0xc, %1, %0" : "=x" ( __s : "xm" ( __x )); 335  __s ; 336 } } 339 g__END_NAMESPACE_C99 342 __BEGIN_NAMESPACE_STD 344 __MATH_INLINE  345 __NTH ( $ ( __x )) 347  __s ; 348 `__asm ("roundsd $2, %1, %0" : "=x" ( __s : "xm" ( __x )); 349  __s ; 350 } } 351 __END_NAMESPACE_STD 353 __BEGIN_NAMESPACE_C99 354 __MATH_INLINE  355 __NTH ( $f ( __x )) 357  __s ; 358 `__asm ("rounds$2, %1, %0" : "=x" ( __s : "xm" ( __x )); 359  __s ; 360 } } 361 __END_NAMESPACE_C99 363 __BEGIN_NAMESPACE_STD 365 __MATH_INLINE  366 __NTH ( $o ( __x )) 368  __s ; 369 `__asm ("roundsd $1, %1, %0" : "=x" ( __s : "xm" ( __x )); 370  __s ; 371 } } 372 __END_NAMESPACE_STD 374 __BEGIN_NAMESPACE_C99 375 __MATH_INLINE  376 __NTH ( $of ( __x )) 378  __s ; 379 `__asm ("rounds$1, %1, %0" : "=x" ( __s : "xm" ( __x )); 380  __s ; 381 } } 382 g__END_NAMESPACE_C99 390 #i! defed __SSE2_MATH__ && !defed __x86_64__ 391 #i((! defed __NO_MATH_INLINES || defed __LIBC_INTERNAL_MATH_INLINES ) \ 392 && defed g__OPTIMIZE__ ) 396 #unde mh_rhdlg 405 #ifde __USE_ISOC99 406  #__le_mh ( func , ) \ 407 `__le_mh_ (, func , ) \ 408 `__le_mh_ (, `__CONCAT ( func , f ), ) \ 409 `__le_mh_ (, `__CONCAT ( func , l ), ) ) 410  #__le_mhNP ( func , ) \ 411 `__le_mhNP_ (, func , ) \ 412 `__le_mhNP_ (, `__CONCAT ( func , f ), ) \ 413 `__le_mhNP_ (, `__CONCAT ( func , l ), ) ) 415  #__le_mh ( func , ) \ 416 `__le_mh_ (, func , ) ) 417  #__le_mhNP ( func , ) \ 418 `__le_mhNP_ (, func , ) ) 421  #__le_mh_ ( t_ty , func , ) \ 422 `__le_mh_de_ ( t_ty , func , , "0" ( __x )) ) 423  #__le_mhNP_ ( t_ty , func , ) \ 424 `__le_mh_deNP_ ( t_ty , func , , "0" ( __x )) ) 427 #ifde __USE_ISOC99 428  #__le_mh_de ( func , , ms ...) \ 429 `__le_mh_de_ (, func , , ms ) \ 430 `__le_mh_de_ (, `__CONCAT ( func , f ), , ms ) \ 431 `__le_mh_de_ (, `__CONCAT ( func , l ), , ms ) ) 432  #__le_mh_deNP ( func , , ms ...) \ 433 `__le_mh_deNP_ (, func , , ms ) \ 434 `__le_mh_deNP_ (, `__CONCAT ( func , f ), , ms ) \ 435 `__le_mh_deNP_ (, `__CONCAT ( func , l ), , ms ) ) 437  #__le_mh_de ( func , , ms ...) \ 438 `__le_mh_de_ (, func , , ms ) ) 439  #__le_mh_deNP ( func , , ms ...) \ 440 `__le_mh_deNP_ (, func , , ms ) ) 443  #__le_mh_de_ ( t_ty , func , , ms ...) \ 444 __MATH_INLINE t_ty `func (t_ty __THROW ; \ 445 `__le_mh_deNP_ ( t_ty , func , , ms ) ) 447  #__le_mh_deNP_ ( t_ty , func , , ms ...) \ 448 __MATH_INLINE t_ty `__NTH ( `func (t_ty __x )) \ 450  t_ty __su ; \ 451 __asm `__vީe__ ( : "" ( __su : ms ); \ 452  __su ; \ 453 } ) 456 #ifde __USE_ISOC99 457  #__le_mhcode ( func , g , code ) \ 458 `__le_mhcode_ (, func , g , code ) \ 459 `__le_mhcode_ (, `__CONCAT ( func , f ), g , code ) \ 460 `__le_mhcode_ (, `__CONCAT ( func , l ), g , code ) ) 461  #__le_mhcodeNP ( func , g , code ) \ 462 `__le_mhcodeNP_ (, func , g , code ) \ 463 `__le_mhcodeNP_ (, `__CONCAT ( func , f ), g , code ) \ 464 `__le_mhcodeNP_ (, `__CONCAT ( func , l ), g , code ) ) 465  #__le_mhcode2 ( func , g1 , g2 , code ) \ 466 `__le_mhcode2_ (, func , g1 , g2 , code ) \ 467 `__le_mhcode2_ (, `__CONCAT ( func , f ), g1 , g2 , code ) \ 468 `__le_mhcode2_ (, `__CONCAT ( func , l ), g1 , g2 , code ) ) 469  #__le_mhcodeNP2 ( func , g1 , g2 , code ) \ 470 `__le_mhcodeNP2_ (, func , g1 , g2 , code ) \ 471 `__le_mhcodeNP2_ (, `__CONCAT ( func , f ), g1 , g2 , code ) \ 472 `__le_mhcodeNP2_ (, `__CONCAT ( func , l ), g1 , g2 , code ) ) 473  #__le_mhcode3 ( func , g1 , g2 , g3 , code ) \ 474 `__le_mhcode3_ (, func , g1 , g2 , g3 , code ) \ 475 `__le_mhcode3_ (, `__CONCAT ( func , f ), g1 , g2 , g3 , code ) \ 476 `__le_mhcode3_ (, `__CONCAT ( func , l ), g1 , g2 , g3 , code ) ) 477  #__le_mhcodeNP3 ( func , g1 , g2 , g3 , code ) \ 478 `__le_mhcodeNP3_ (, func , g1 , g2 , g3 , code ) \ 479 `__le_mhcodeNP3_ (, `__CONCAT ( func , f ), g1 , g2 , g3 , code ) \ 480 `__le_mhcodeNP3_ (, `__CONCAT ( func , l ), g1 , g2 , g3 , code ) ) 482  #__le_mhcode ( func , g , code ) \ 483 `__le_mhcode_ (, func , ( g ), code ) ) 484  #__le_mhcodeNP ( func , g , code ) \ 485 `__le_mhcodeNP_ (, func , ( g ), code ) ) 486  #__le_mhcode2 ( func , g1 , g2 , code ) \ 487 `__le_mhcode2_ (, func , g1 , g2 , code ) ) 488  #__le_mhcodeNP2 ( func , g1 , g2 , code ) \ 489 `__le_mhcodeNP2_ (, func , g1 , g2 , code ) ) 490  #__le_mhcode3 ( func , g1 , g2 , g3 , code ) \ 491 `__le_mhcode3_ (, func , g1 , g2 , g3 , code ) ) 492  #__le_mhcodeNP3 ( func , g1 , g2 , g3 , code ) \ 493 `__le_mhcodeNP3_ (, func , g1 , g2 , g3 , code ) ) 496  #__le_mhcode_ ( t_ty , func , g , code ) \ 497 __MATH_INLINE t_ty `func (t_ty __THROW ; \ 498 `__le_mhcodeNP_ ( t_ty , func , g , code ) ) 500  #__le_mhcodeNP_ ( t_ty , func , g , code ) \ 501 __MATH_INLINE t_ty `__NTH ( `func (t_ty g )) \ 503 code ; \ 504 } ) 507  #__le_mhcode2_ ( t_ty , func , g1 , g2 , code ) \ 508 __MATH_INLINE t_ty `func (t_ty, flt_ty __THROW ; \ 509 `__le_mhcodeNP2_ ( t_ty , func , g1 , g2 , code ) ) 511  #__le_mhcodeNP2_ ( t_ty , func , g1 , g2 , code ) \ 512 __MATH_INLINE t_ty `__NTH ( `func (t_ty g1 , flt_ty g2 )) \ 514 code ; \ 515 } ) 517  #__le_mhcode3_ ( t_ty , func , g1 , g2 , g3 , code ) \ 518 __MATH_INLINE t_ty `func (t_ty, flt_ty, flt_ty __THROW ; \ 519 `__le_mhcodeNP3_ ( t_ty , func , g1 , g2 , g3 , code ) ) 521  #__le_mhcodeNP3_ ( t_ty , func , g1 , g2 , g3 , code ) \ 522 __MATH_INLINE t_ty `__NTH ( `func (t_ty g1 , flt_ty g2 , \ 523 t_ty g3 )) \ 525 code ; \ 526 } ) 530 #i! defed __NO_MATH_INLINES && defed __OPTIMIZE__ 534 #ifde __FAST_MATH__ 535 #ifde __USE_GNU 536  #__scos_code \ 537  __co ; \ 538  __sr ; \ 539  __swtmp ; \ 540 __asm __vީe__ \ 555 : "" ( __co ), "=u" ( __sr ), "" ( __swtmp : "0" ( __x )); \ 556 * __sx = __sr ; \ 557 * __cosx = __co ) 559 __MATH_INLINE  560 __NTH ( $__scos ( __x , * __sx , * __cosx )) 562 __scos_code ; 563 } } 565 __MATH_INLINE  566 __NTH ( $__scosf ( __x , * __sx , * __cosx )) 568 __scos_code ; 569 } } 571 __MATH_INLINE  572 __NTH ( $__sco ( __x , * __sx , * __cosx )) 574 __scos_code ; 575 } } 582 #i __GNUC_PREREQ (3, 5) 583  #__expm1_code \ 584  __mp ; \ 585 __mp = `__but_expm1l ( __x ); \ 586  __mp ? __m: __x ) 588  #__expm1_code \ 589  __vue ; \ 590  __expڒt ; \ 591  __mp ; \ 592 __asm __vީe__ \ 601 : "" ( __vue ), "=u" ( __expڒt : "0" ( __x )); \ 602 __asm __vީe__ \ 604 : "" ( __mp : "0" (1.0), "u" ( __expڒt )); \ 605 __mp -= 1.0; \ 606 __mp + __vue ; \ 607  __mp ? __m: __x ) 609 $__le_mhcodeNP_ (, __expm1l , __x , __expm1_code ) 611 #i `__GNUC_PREREQ (3, 4) 612 `__le_mhcodeNP_ (, __ex , __x ,  $__but_ex ( __x )) 614  #__exp_code \ 615  __vue ; \ 616  __expڒt ; \ 617 __asm __vީe__ \ 625 : "" ( __vue ), "=u" ( __expڒt : "0" ( __x )); \ 626 __vue += 1.0; \ 627 __asm __vީe__ \ 629 : "" ( __vue : "0" (__vue), "u" ( __expڒt )); \ 630  __vue ) 631 $__le_mhcodeNP ( exp , __x , __exp_code ) 632 $__le_mhcodeNP_ (, __ex , __x , __exp_code ) 636 #i! `__GNUC_PREREQ (3, 5) 637 `__le_mhcodeNP ( n , __x , \ 638  __vue ; \ 639  __vue2 `__ibu__ (( __unud__ )); \ 640 __asm __vީe__ \ 642 : "" ( __vue2 ), "=u" ( __vue : "0" ( __x )); \ 643  __vue ) 648 #i `__GNUC_PREREQ (3, 4) 649 `__le_mhcodeNP2_ (, __2l , __y , __x , 650  $__but_2l ( __y , __x )) 652  #__2_code \ 653  __vue ; \ 654 __asm __vީe__ \ 656 : "" ( __vue : "0" ( __x ), "u" ( __y ) : "st(1)"); \ 657  __vue ) 658 #ifde __FAST_MATH__ 659 $__le_mhcodeNP2 ( 2 , __y , __x , __2_code ) 661 $__le_mhcodeNP2_ (, __2l , __y , __x , __2_code ) 665 #i defed __FAST_MATH__ && ! `__GNUC_PREREQ (3, 5) 666 `__le_mhcodeNP2 ( fmod , __x , __y , \ 667  __vue ; \ 668 __asm __vީe__ \ 673 : "" ( __vue : "0" ( __x ), "u" ( __y ) : "ax", "cc"); \ 674  __vue ) 678 #ifde __FAST_MATH__ 679 #i! `__GNUC_PREREQ (3,3) 680 `__le_mhNP ( sq , "fsqrt") 681 `__le_mhNP_ (, __sql , "fsqrt") 682  #__libc_sql ( n `__sql (n) ) 684  #__libc_sql ( n `__but_sql (n) ) 688 #i `__GNUC_PREREQ (2, 8) 689 `__le_mhcodeNP_ (, bs , __x ,  $__but_bs ( __x )) 690 #ifde __USE_ISOC99 691 `__le_mhcodeNP_ (, bsf , __x ,  $__but_bsf ( __x )) 692 `__le_mhcodeNP_ (, b , __x ,  $__but_b ( __x )) 694 `__le_mhcodeNP_ (, __b , __x ,  $__but_b ( __x )) 696 `__le_mh ( bs , "fabs") 697 `__le_mh_ (, __b , "fabs") 700 #ifde __FAST_MATH__ 701 #i! `__GNUC_PREREQ (3, 4) 703 `__le_mhNP ( s , "fsin") 705 `__le_mhNP ( cos , "fcos") 707 `__le_mh_deNP ( log , "d2; fxch; fyl2x", "0" ( __x ) : "st(1)") 710 #i! `__GNUC_PREREQ (3, 5) 711 `__le_mh_deNP ( log10 , "dlg2; fxch; fyl2x", "0" ( __x ) : "st(1)") 713 `__le_mhcodeNP ( as , __x ,  `__2l (__x, `__libc_sql (1.0 - __x * __x))) 714 `__le_mhcodeNP ( acos , __x ,  `__2l ( `__libc_sql (1.0 - __x * __x), __x)) 717 #i! `__GNUC_PREREQ (3, 4) 718 `__le_mh_deNP ( , "d1; fn", "0" ( __x ) : "st(1)") 722 `__le_mhcode_ (, __sgn1l , __x , \ 723 __exnsi__ uni {  __xld ;  __xi [3]; } __n = \ 724 { __xld : __x } }; \ 725 g__n . g__xi [2] = ( __n . __xi [2] & 0x8000) | 0x3fff; \ 726 g__n . g__xi [1] = 0x80000000; \ 727 g__n . g__xi [0] = 0; \ 728  g__n . g__xld ) 731 #ifde __FAST_MATH__ 733 __le_mhcodeNP ( sh , __x , \ 734  __exm1 = __expm1l ( __b ( __x )); \ 735  0.5 * ( __exm1 / (__exm1 + 1.0+ __exm1* $__sgn1l ( __x )) 737 `__le_mhcodeNP ( cosh , __x , \ 738  __ex = `__ex ( __x ); \ 739  0.5 * ( __ex + 1.0 / __ex)) 741 `__le_mhcodeNP ( nh , __x , \ 742  __exm1 = `__expm1l (- `__b ( __x + __x)); \ 743  __exm1 / (__exm1 + 2.0* `__sgn1l (- __x )) 746 `__le_mhcodeNP ( o , __x , \ 747  __vue ; \ 748  __igne ; \ 749  __cw ; \ 750  __cwtmp ; \ 751 __asm `__vީe ("fnstcw %3\n\t" \ 759 : "" ( __vue ), "=&q" ( __igne ), "=m" ( __cwtmp ), \ 760 "=m" ( __cw ) \ 761 : "0" ( __x )); \ 762  __vue ) 764 `__le_mhcodeNP ( , __x , \ 765  __vue ; \ 766  __igne ; \ 767  __cw ; \ 768  __cwtmp ; \ 769 __asm `__vީe ("fnstcw %3\n\t" \ 777 : "" ( __vue ), "=&q" ( __igne ), "=m" ( __cwtmp ), \ 778 "=m" ( __cw ) \ 779 : "0" ( __x )); \ 780  __vue ) 782 #ifde __FAST_MATH__ 783  #__ldexp_code \ 784  __vue ; \ 785 __asm __vީe__ \ 787 : "" ( __vue : "0" ( __x ), "u" (( __y )); \ 788  __vue ) 790 __MATH_INLINE  791 `__NTH ( $ldexp ( __x ,  __y )) 793 __ldexp_code ; 794 } } 799 #ifde __USE_ISOC99 801 #ifde __FAST_MATH__ 802 $__le_mhcodeNP ( expm1 , __x , __expm1_code ) 806  #__M_SQRT2 1.41421356237309504880L ) 808 #i! `__GNUC_PREREQ (3, 5) 809 `__le_mhcodeNP ( log1p , __x , \ 810  __vue ; \ 811 i( `__b ( __x >1.0 - 0.5 * __M_SQRT2 ) \ 812 __vue = `logl (1.0 + __x ); \ 814 __asm __vީe__ \ 818 : "" ( __vue : "0" ( __x ) : "st(1)"); \ 819  __vue ) 824 `__le_mhcodeNP ( ash , __x , \ 825  __y = `__b ( __x ); \ 826  ( `log1 ( __y * __y / ( `__libc_sql (__y * __y + 1.0) + 1.0) + __y) \ 827 * $__sgn1l ( __x ))) 829 `__le_mhcodeNP ( acosh , __x , \ 830  `logl ( __x + `__libc_sql (__x - 1.0) * __libc_sqrtl (__x + 1.0))) 832 `__le_mhcodeNP ( h , __x , \ 833  __y = `__b ( __x ); \ 834  -0.5 * `log1 (-( __y + __y/ (1.0 + __y)* $__sgn1l ( __x )) 837 `__le_mhcodeNP2 ( hyp , __x , __y , 838  `__libc_sql ( __x * __x + __y * __y)) 840 #i! `__GNUC_PREREQ (3, 5) 841 `__le_mhcodeNP ( logb , __x , \ 842  __vue ; \ 843  __junk ; \ 844 __asm __vީe__ \ 846 : "" ( __junk ), "=u" ( __vue : "0" ( __x )); \ 847  __vue ) 853 #ifde __USE_ISOC99 854 #ifde __FAST_MATH__ 856 #i! `__GNUC_PREREQ (3, 5) 857 `__le_mh_deNP ( log2 , "d1; fxch; fyl2x", "0" ( __x ) : "st(1)") 860 __MATH_INLINE  861 `__NTH ( $ldexpf ( __x ,  __y )) 863 __ldexp_code ; 864 } } 866 __MATH_INLINE  867 __NTH ( $ldex ( __x ,  __y )) 869 __ldexp_code ; 870 } } 872 __le_mhNP ( rt , "frndint") 875  #__̚t_code \ 876  __̚es ; \ 877 __asm__ __vީe__ \ 879 : "=m" ( __̚es : "t" ( __x ) : "st"); \ 880  __̚es ) 881 __MATH_INLINE  882 __NTH ( $̚tf ( __x )) 884 __̚t_code ; 885 } } 886 __MATH_INLINE  887 __NTH ( $̚t ( __x )) 889 __̚t_code ; 890 } } 891 __MATH_INLINE  892 __NTH ( $̚ ( __x )) 894 __̚t_code ; 895 } } 896 #unde __̚t_code 898  #__rt_code \ 899  __res ; \ 900 __asm__ __vީe__ \ 902 : "=m" ( __res : "t" ( __x ) : "st"); \ 903  __res ) 904 __exnsi__ 905 __MATH_INLINE  906 __NTH ( $rtf ( __x )) 908 __rt_code ; 909 } } 910 __exnsi__ 911 __MATH_INLINE  912 __NTH ( $rt ( __x )) 914 __rt_code ; 915 } } 916 __exnsi__ 917 __MATH_INLINE  918 __NTH ( $r ( __x )) 920 __rt_code ; 921 } } 922 #unde __rt_code 927 #ifde __USE_MISC 929 #i defed __FAST_MATH__ && ! __GNUC_PREREQ (3, 5) 930 __le_mhcodeNP2 ( dm , __x , __y , \ 931  __vue ; \ 932  __obbed ; \ 933 __asm __vީe__ \ 938 : "" ( __vue ), "=&a" ( __obbed : "0" ( __x ), "u" ( __y ) : "cc"); \ 939  __vue ) 944 __MATH_INLINE  945 __NTH ( $__fe ( __x )) 947  ( __exnsi__ 948 (((((uni {  __d ;  __i [2]; }{__d: __x }).__i[1] 950 } } 955 #unde __2_code 956 #ifde __FAST_MATH__ 957 #unde __expm1_code 958 #unde __exp_code 959 #unde __scos_code 966 #ifde __LIBC_INTERNAL_MATH_INLINES 967 __le_mh ( __754_sq , "fsqrt") 968 __le_mhcode2_ (, __754_2l , __y , __x , 969  __vue ; 970 __asm __vީe__ ("fpatan\n\t" 971 : "" ( __vue ) 972 : "0" ( __x ), "u" ( __y ) : "st(1)"); 973  __vue ;) @/usr/include/bits/nan.h 19 #ide _MATH_H 26 #i __GNUC_PREREQ (3,3) 28  #NAN ( `__but_nf ("")) ) 30 #i defed __GNUC__ 32  #NAN \ 33 ( __exnsi__ \ 34 ((uni {  __l `__ibu__ (( `__mode__ ( __SI__ )));  __d ; }) \ 35 { __l : 0x7fc00000UL }). __d ) ) 39  ~ 41 #i __BYTE_ORDER = __BIG_ENDIAN 42  #__qn_bys { 0x7f, 0xc0, 0, 0 } ) 44 #i __BYTE_ORDER = __LITTLE_ENDIAN 45  #__qn_bys { 0, 0, 0xc0, 0x7} ) 48 uni {  m__c [4];  m__d ; } __qn_uni 49 __ibu__ (( __unud__ ){ __qn_bys }; 50  #NAN ( __qn_uni . __d ) ) @/usr/include/bits/param.h 19 #ide _SYS_PARAM_H 23 #ide ARG_MAX 24  #__undef_ARG_MAX ) 27  ~ 28  ~ 31 #ifde __undef_ARG_MAX 32 #unde ARG_MAX 33 #unde __undef_ARG_MAX 36  #MAXSYMLINKS 20 ) 41  #NOFILE 256 ) 42  #NCARGS 131072 ) @/usr/include/bits/posix_opt.h 19 #idef _BITS_POSIX_OPT_H 20  #_BITS_POSIX_OPT_H 1 ) 23  #_POSIX_JOB_CONTROL 1 ) 26  #_POSIX_SAVED_IDS 1 ) 29  #_POSIX_PRIORITY_SCHEDULING 200809L ) 32  #_POSIX_SYNCHRONIZED_IO 200809L ) 35  #_POSIX_FSYNC 200809L ) 38  #_POSIX_MAPPED_FILES 200809L ) 41  #_POSIX_MEMLOCK 200809L ) 44  #_POSIX_MEMLOCK_RANGE 200809L ) 47  #_POSIX_MEMORY_PROTECTION 200809L ) 50  #_POSIX_CHOWN_RESTRICTED 0 ) 54  #_POSIX_VDISABLE '\0' ) 57  #_POSIX_NO_TRUNC 1 ) 60  #_XOPEN_REALTIME 1 ) 63  #_XOPEN_REALTIME_THREADS 1 ) 66  #_XOPEN_SHM 1 ) 69  #_POSIX_THREADS 200809L ) 72  #_POSIX_REENTRANT_FUNCTIONS 1 ) 73  #_POSIX_THREAD_SAFE_FUNCTIONS 200809L ) 76  #_POSIX_THREAD_PRIORITY_SCHEDULING 200809L ) 79  #_POSIX_THREAD_ATTR_STACKSIZE 200809L ) 82  #_POSIX_THREAD_ATTR_STACKADDR 200809L ) 85  #_POSIX_THREAD_PRIO_INHERIT 200809L ) 89  #_POSIX_THREAD_PRIO_PROTECT 200809L ) 91 #ifde __USE_XOPEN2K8 93  #_POSIX_THREAD_ROBUST_PRIO_INHERIT 200809L ) 96  #_POSIX_THREAD_ROBUST_PRIO_PROTECT -1 ) 100  #_POSIX_SEMAPHORES 200809L ) 103  #_POSIX_REALTIME_SIGNALS 200809L ) 106  #_POSIX_ASYNCHRONOUS_IO 200809L ) 107  #_POSIX_ASYNC_IO 1 ) 109  #_LFS_ASYNCHRONOUS_IO 1 ) 111  #_POSIX_PRIORITIZED_IO 200809L ) 114  #_LFS64_ASYNCHRONOUS_IO 1 ) 117  #_LFS_LARGEFILE 1 ) 118  #_LFS64_LARGEFILE 1 ) 119  #_LFS64_STDIO 1 ) 122  #_POSIX_SHARED_MEMORY_OBJECTS 200809L ) 125  #_POSIX_CPUTIME 0 ) 128  #_POSIX_THREAD_CPUTIME 0 ) 131  #_POSIX_REGEXP 1 ) 134  #_POSIX_READER_WRITER_LOCKS 200809L ) 137  #_POSIX_SHELL 1 ) 140  #_POSIX_TIMEOUTS 200809L ) 143  #_POSIX_SPIN_LOCKS 200809L ) 146  #_POSIX_SPAWN 200809L ) 149  #_POSIX_TIMERS 200809L ) 152  #_POSIX_BARRIERS 200809L ) 155  #_POSIX_MESSAGE_PASSING 200809L ) 158  #_POSIX_THREAD_PROCESS_SHARED 200809L ) 161  #_POSIX_MONOTONIC_CLOCK 0 ) 164  #_POSIX_CLOCK_SELECTION 200809L ) 167  #_POSIX_ADVISORY_INFO 200809L ) 170  #_POSIX_IPV6 200809L ) 173  #_POSIX_RAW_SOCKETS 200809L ) 176  #_POSIX2_CHAR_TERM 200809L ) 179  #_POSIX_SPORADIC_SERVER -1 ) 180  #_POSIX_THREAD_SPORADIC_SERVER -1 ) 183  #_POSIX_TRACE -1 ) 184  #_POSIX_TRACE_EVENT_FILTER -1 ) 185  #_POSIX_TRACE_INHERIT -1 ) 186  #_POSIX_TRACE_LOG -1 ) 189  #_POSIX_TYPED_MEMORY_OBJECTS -1 ) @/usr/include/bits/pthreadtypes.h 18 #ide _BITS_PTHREADTYPES_H 19  #_BITS_PTHREADTYPES_H 1 ) 21  ~ 23 #ifde __x86_64__ 24 #i __WORDSIZE == 64 25  #__SIZEOF_PTHREAD_ATTR_T 56 ) 26  #__SIZEOF_PTHREAD_MUTEX_T 40 ) 27  #__SIZEOF_PTHREAD_MUTEXATTR_T 4 ) 28  #__SIZEOF_PTHREAD_COND_T 48 ) 29  #__SIZEOF_PTHREAD_CONDATTR_T 4 ) 30  #__SIZEOF_PTHREAD_RWLOCK_T 56 ) 31  #__SIZEOF_PTHREAD_RWLOCKATTR_T 8 ) 32  #__SIZEOF_PTHREAD_BARRIER_T 32 ) 33  #__SIZEOF_PTHREAD_BARRIERATTR_T 4 ) 35  #__SIZEOF_PTHREAD_ATTR_T 32 ) 36  #__SIZEOF_PTHREAD_MUTEX_T 32 ) 37  #__SIZEOF_PTHREAD_MUTEXATTR_T 4 ) 38  #__SIZEOF_PTHREAD_COND_T 48 ) 39  #__SIZEOF_PTHREAD_CONDATTR_T 4 ) 40  #__SIZEOF_PTHREAD_RWLOCK_T 44 ) 41  #__SIZEOF_PTHREAD_RWLOCKATTR_T 8 ) 42  #__SIZEOF_PTHREAD_BARRIER_T 20 ) 43  #__SIZEOF_PTHREAD_BARRIERATTR_T 4 ) 46  #__SIZEOF_PTHREAD_ATTR_T 36 ) 47  #__SIZEOF_PTHREAD_MUTEX_T 24 ) 48  #__SIZEOF_PTHREAD_MUTEXATTR_T 4 ) 49  #__SIZEOF_PTHREAD_COND_T 48 ) 50  #__SIZEOF_PTHREAD_CONDATTR_T 4 ) 51  #__SIZEOF_PTHREAD_RWLOCK_T 32 ) 52  #__SIZEOF_PTHREAD_RWLOCKATTR_T 8 ) 53  #__SIZEOF_PTHREAD_BARRIER_T 20 ) 54  #__SIZEOF_PTHREAD_BARRIERATTR_T 4 ) 60  thad_t ; 63  uhad__t 65  m__size [ __SIZEOF_PTHREAD_ATTR_T ]; 66  m__ign ; 68 #ide __have_had__t 69  had__t thad__t ; 70  #__have_had__t 1 ) 74 #ifde __x86_64__ 75  s__had__li 77  __had__li * m__ev ; 78  __had__li * m__xt ; 79 } t__had_li_t ; 81  s__had__i 83  __had__i * m__xt ; 84 } t__had_i_t ; 92  s__had_mux_s 94  m__lock ; 95  m__cou ; 96  m__owr ; 97 #ifde __x86_64__ 98  m__nurs ; 102  m__kd ; 103 #ifde __x86_64__ 104  m__s ; 105  m__isi ; 106 __had_li_t m__li ; 107  #__PTHREAD_MUTEX_HAVE_PREV 1 ) 109  #__PTHREAD_SPINS 0, 0 ) 111  m__nurs ; 112 __exnsi__ union 116  m__es ; 117  m__isi ; 118  #__s __isi_da . __es ) 119  #__isi __isi_da . __isi ) 120  #__PTHREAD_SPINS { 0, 0 } ) 121 } m__isi_da ; 122 __had_i_t m__li ; 125 } m__da ; 126  m__size [ __SIZEOF_PTHREAD_MUTEX_T ]; 127  m__ign ; 128 } thad_mux_t ; 132  m__size [ __SIZEOF_PTHREAD_MUTEXATTR_T ]; 133  m__ign ; 134 } thad_mux_t ; 143  m__lock ; 144  m__fux ; 145 __exnsi__  m__tٮ_q ; 146 __exnsi__  m__wakeup_q ; 147 __exnsi__  m__wok_q ; 148 * m__mux ; 149  m__nwas ; 150  m__brd_q ; 151 } m__da ; 152  m__size [ __SIZEOF_PTHREAD_COND_T ]; 153 __exnsi__  m__ign ; 154 } thad_cd_t ; 158  m__size [ __SIZEOF_PTHREAD_CONDATTR_T ]; 159  m__ign ; 160 } thad_cd_t ; 164  thad_key_t ; 168  thad__t ; 171 #i defed __USE_UNIX98 || defed __USE_XOPEN2K 176 #ifde __x86_64__ 179  m__lock ; 180  m___ads ; 181  m__ads_wakeup ; 182  m__wr_wakeup ; 183  m___ads_queued ; 184  m___wrs_queued ; 185  m__wr ; 186  m__shed ; 187 sigd  m__rwisi ; 188 #ifde __ILP32__ 189  m__d1 [3]; 190  #__PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0 } ) 192  m__d1 [7]; 193  #__PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0, 0, 0, 0, 0 } ) 195  m__d2 ; 198  m__ags ; 199  #__PTHREAD_RWLOCK_INT_FLAGS_SHARED 1 ) 200 } m__da ; 204  m__lock ; 205  m___ads ; 206  m__ads_wakeup ; 207  m__wr_wakeup ; 208  m___ads_queued ; 209  m___wrs_queued ; 212  m__ags ; 213  m__shed ; 214 sigd  m__rwisi ; 215  #__PTHREAD_RWLOCK_ELISION_EXTRA 0 ) 216  m__d2 ; 217  m__wr ; 218 } m__da ; 220  m__size [ __SIZEOF_PTHREAD_RWLOCK_T ]; 221  m__ign ; 222 } thad_rwlock_t ; 226  m__size [ __SIZEOF_PTHREAD_RWLOCKATTR_T ]; 227  m__ign ; 228 } thad_rwlock_t ; 232 #ifde __USE_XOPEN2K 234 vީ thad_lock_t ; 241  m__size [ __SIZEOF_PTHREAD_BARRIER_T ]; 242  m__ign ; 243 } thad_brr_t ; 247  m__size [ __SIZEOF_PTHREAD_BARRIERATTR_T ]; 248  m__ign ; 249 } thad_brr_t ; 253 #ide __x86_64__ 255  #__nup_f_ibu `__ibu__ (( `__grm__ (1))) ) @/usr/include/bits/setjmp.h 19 #ide _BITS_SETJMP_H 20  #_BITS_SETJMP_H 1 ) 22 #i! defed _SETJMP_H && !defed _PTHREAD_H 26  ~ 28 #ide _ASM 30 #i __WORDSIZE == 64 31  t__jmp_buf [8]; 32 #i defed __x86_64__ 33 __exnsi__  t__jmp_buf [8]; 35  t__jmp_buf [6]; @/usr/include/bits/setjmp2.h 19 #ide _SETJMP_H 24 #ifde __REDIRECT_NTH 25  __REDIRECT_NTHNL ( lgjmp , 26 ( __jmp_buf_g __v [1],  __v ), 27 __lgjmp_chk __ibu__ (( __nܑu__ )); 28  __REDIRECT_NTHNL ( _lgjmp , 29 ( __jmp_buf_g __v [1],  __v ), 30 __lgjmp_chk __ibu__ (( __nܑu__ )); 31  __REDIRECT_NTHNL ( siglgjmp , 32 ( __jmp_buf_g __v [1],  __v ), 33 __lgjmp_chk __ibu__ (( __nܑu__ )); 35  __lgjmp_chk ( __jmp_buf_g __v [1],  __v ), 36 __THROWNL __ibu__ (( __nܑu__ )); 37  #lgjmp __lgjmp_chk ) 38  #_lgjmp __lgjmp_chk ) 39  #siglgjmp __lgjmp_chk ) @/usr/include/bits/sigaction.h 19 #ide _SIGNAL_H 24  ssigai 27 #ifde __USE_POSIX199309 31 __sighdr_t m_hdr ; 33 (* m_sigai (, msigfo_t *, *); 35 m__sigai_hdr ; 36  #_hdr __sigai_hdr . _hdr ) 37  #_sigai __sigai_hdr . _sigai ) 39 __sighdr_t m_hdr ; 43 __sigt_t m_mask ; 46  m_ags ; 49 (* m_ܔ ) (); 53  #SA_NOCLDSTOP 1 ) 54  #SA_NOCLDWAIT 2 ) 55  #SA_SIGINFO 4 ) 57 #i defed __USE_UNIX98 || defed __USE_MISC 58  #SA_ONSTACK 0x08000000 ) 60 #i defed __USE_UNIX98 || defed __USE_XOPEN2K8 61  #SA_RESTART 0x10000000 ) 62  #SA_NODEFER 0x40000000 ) 64  #SA_RESETHAND 0x80000000 ) 66 #ifde __USE_MISC 67  #SA_INTERRUPT 0x20000000 ) 70  #SA_NOMASK SA_NODEFER ) 71  #SA_ONESHOT SA_RESETHAND ) 72  #SA_STACK SA_ONSTACK ) 76  #SIG_BLOCK 0 ) 77  #SIG_UNBLOCK 1 ) 78  #SIG_SETMASK 2 ) @/usr/include/bits/sigcontext.h 18 #ide _BITS_SIGCONTEXT_H 19  #_BITS_SIGCONTEXT_H 1 ) 21 #i! defed _SIGNAL_H && !defed _SYS_UCONTEXT_H 25  #FP_XSTATE_MAGIC1 0x46505853U ) 26  #FP_XSTATE_MAGIC2 0x46505845U ) 27  #FP_XSTATE_MAGIC2_SIZE ( FP_XSTATE_MAGIC2 ) ) 29  s_x_sw_bys 31 __ut32_t mmagic1 ; 32 __ut32_t mexnded_size ; 33 __ut64_t mxe_bv ; 34 __ut32_t mxe_size ; 35 __ut32_t mddg [7]; 38  s_g 40  msignifind [4]; 41  mexpڒt ; 44  s_xg 46  msignifind [4]; 47  mexpڒt ; 48  mddg [3]; 51  s_xmmg 53 __ut32_t memt [4]; 58 #ide __x86_64__ 60  s_塩e 63 __ut32_t mcw ; 64 __ut32_t msw ; 65 __ut32_t mg ; 66 __ut32_t moff ; 67 __ut32_t mcsl ; 68 __ut32_t mdaoff ; 69 __ut32_t mdal ; 70  _g m_ [8]; 71  mus ; 72  mmagic ; 75 __ut32_t m_fx_v [6]; 76 __ut32_t mmxc ; 77 __ut32_t mrved ; 78  _xg m_fx_ [8]; 79  _xmmg m_xmm [8]; 80 __ut32_t mddg [56]; 83 #ide sigcڋxt_ru 88  #sigcڋxt_ru sigcڋxt ) 91  #X86_FXSR_MAGIC 0x0000 ) 93  ssigcڋxt 95  mgs , m__gsh ; 96  mfs , m__fsh ; 97  mes , m__esh ; 98  mds , m__dsh ; 99  medi ; 100  mesi ; 101  mebp ; 102  me ; 103  mebx ; 104  medx ; 105  mecx ; 106  mx ; 107  mno ; 108  mr ; 109  me ; 110  mcs , m__csh ; 111  meags ; 112  me__sigl ; 113  mss , m__ssh ; 114  _塩e * m塩e ; 115  mdmask ; 116  m2 ; 121  s_塩e 124 __ut16_t mcwd ; 125 __ut16_t mswd ; 126 __ut16_t mw ; 127 __ut16_t mf ; 128 __ut64_t mr ; 129 __ut64_t mrdp ; 130 __ut32_t mmxc ; 131 __ut32_t mmx_mask ; 132  _xg m_ [8]; 133  _xmmg m_xmm [16]; 134 __ut32_t mddg [24]; 137  ssigcڋxt 139 __ut64_t mr8 ; 140 __ut64_t mr9 ; 141 __ut64_t mr10 ; 142 __ut64_t mr11 ; 143 __ut64_t mr12 ; 144 __ut64_t mr13 ; 145 __ut64_t mr14 ; 146 __ut64_t mr15 ; 147 __ut64_t mrdi ; 148 __ut64_t mrsi ; 149 __ut64_t mrbp ; 150 __ut64_t mrbx ; 151 __ut64_t mrdx ; 152 __ut64_t mx ; 153 __ut64_t mrcx ; 154 __ut64_t mr ; 155 __ut64_t mr ; 156 __ut64_t meags ; 157  mcs ; 158  mgs ; 159  mfs ; 160  m__d0 ; 161 __ut64_t mr ; 162 __ut64_t mno ; 163 __ut64_t mdmask ; 164 __ut64_t m2 ; 165 __exnsi__ union 167  _塩e * m塩e ; 168 __ut64_t m__塩e_wd ; 170 __ut64_t m__rved1 [8]; 175  s_xve_hdr 177 __ut64_t mxe_bv ; 178 __ut64_t mrved1 [2]; 179 __ut64_t mrved2 [5]; 182  s_ymmh_e 184 __ut32_t mymmh_a [64]; 187  s_xe 189  _塩e m塩e ; 190  _xve_hdr mxe_hdr ; 191  _ymmh_e mymmh ; @/usr/include/bits/siginfo.h 19 #i! defed _SIGNAL_H && !defed __ed_sigfo_t \ 20 && ! defed g__ed_sigevt_t 24  ~ 26 #i(! defed __have_sigv_t \ 27 && ( defed g_SIGNAL_H || defed g__ed_sigfo_t \ 28 || defed g__ed_sigevt_t )) 29  #__have_sigv_t 1 ) 32  usigv 34  msiv_t ; 35 * msiv_r ; 36 } tsigv_t ; 39 #i(! defed __have_sigfo_t \ 40 && ( defed g_SIGNAL_H || defed g__ed_sigfo_t )) 41  #__have_sigfo_t 1 ) 43  #__SI_MAX_SIZE 128 ) 44 #i __WORDSIZE == 64 45  #__SI_PAD_SIZE (( __SI_MAX_SIZE /  ()- 4) ) 47  #__SI_PAD_SIZE (( __SI_MAX_SIZE /  ()- 3) ) 50 #i defed __x86_64__ && __WORDSIZE == 32 55  __ock_t t__ibu__ (( t__igd__ (4)) t__sigchld_ock_t ; 56  #__SI_ALIGNMENT `__ibu__ (( `__igd__ (8))) ) 58  __ock_t t__sigchld_ock_t ; 59  #__SI_ALIGNMENT ) 64  si_signo ; 65  si_o ; 67  si_code ; 71  _d [ __SI_PAD_SIZE ]; 76 __pid_t si_pid ; 77 __uid_t si_uid ; 78 } _kl ; 83  si_tid ; 84  si_ovrun ; 85 sigv_t si_sigv ; 86 } _tim ; 91 __pid_t si_pid ; 92 __uid_t si_uid ; 93 sigv_t si_sigv ; 94 } _ ; 99 __pid_t si_pid ; 100 __uid_t si_uid ; 101  si_us ; 102 __sigchld_ock_t si_utime ; 103 __sigchld_ock_t si_ime ; 104 } _sigchld ; 109 * si_addr ; 110  si_addr_lsb ; 113 * _low ; 114 * _u ; 115 } si_addr_bnd ; 116 } _sigu ; 121  si_bd ; 122  si_fd ; 123 } _sigpl ; 128 * __addr ; 129  _sys ; 130  _ch ; 131 } _sigsys ; 132 } _siflds ; 133 } tsigfo_t t__SI_ALIGNMENT ; 137  #si_pid _siflds . _kl . si_pid ) 138  #si_uid _siflds . _kl . si_uid ) 139  #si_timid _siflds . _tim . si_tid ) 140  #si_ovrun _siflds . _tim . si_ovrun ) 141  #si_us _siflds . _sigchld . si_us ) 142  #si_utime _siflds . _sigchld . si_utime ) 143  #si_ime _siflds . _sigchld . si_ime ) 144  #si_vue _siflds . _ . si_sigv ) 145  #si_t _siflds . _ . si_sigv . siv_t ) 146  #si_r _siflds . _ . si_sigv . siv_r ) 147  #si_addr _siflds . _sigu . si_addr ) 148  #si_addr_lsb _siflds . _sigu . si_addr_lsb ) 149  #si_low _siflds . _sigu . si_addr_bnd . _low ) 150  #si_u _siflds . _sigu . si_addr_bnd . _u ) 151  #si_bd _siflds . _sigpl . si_bd ) 152  #si_fd _siflds . _sigpl . si_fd ) 153  #si__addr _siflds . _sigsys . __addr ) 154  #si_sys _siflds . _sigsys . _sys ) 155  #si_ch _siflds . _sigsys . _ch ) 162 SI_ASYNCNL = -60, 163  #SI_ASYNCNL SI_ASYNCNL ) 164 SI_TKILL = -6, 165  #SI_TKILL SI_TKILL ) 166 SI_SIGIO , 167  #SI_SIGIO SI_SIGIO ) 168 SI_ASYNCIO , 169  #SI_ASYNCIO SI_ASYNCIO ) 170 SI_MESGQ , 171  #SI_MESGQ SI_MESGQ ) 172 SI_TIMER , 173  #SI_TIMER SI_TIMER ) 174 SI_QUEUE , 175  #SI_QUEUE SI_QUEUE ) 176 SI_USER , 177  #SI_USER SI_USER ) 178 SI_KERNEL = 0x80 179  #SI_KERNEL SI_KERNEL ) 183 #i defed __USE_XOPEN_EXTENDED || defed __USE_XOPEN2K8 187 ILL_ILLOPC = 1, 188  #ILL_ILLOPC ILL_ILLOPC ) 189 ILL_ILLOPN , 190  #ILL_ILLOPN ILL_ILLOPN ) 191 ILL_ILLADR , 192  #ILL_ILLADR ILL_ILLADR ) 193 ILL_ILLTRP , 194  #ILL_ILLTRP ILL_ILLTRP ) 195 ILL_PRVOPC , 196  #ILL_PRVOPC ILL_PRVOPC ) 197 ILL_PRVREG , 198  #ILL_PRVREG ILL_PRVREG ) 199 ILL_COPROC , 200  #ILL_COPROC ILL_COPROC ) 201 ILL_BADSTK 202  #ILL_BADSTK ILL_BADSTK ) 208 FPE_INTDIV = 1, 209  #FPE_INTDIV FPE_INTDIV ) 210 FPE_INTOVF , 211  #FPE_INTOVF FPE_INTOVF ) 212 FPE_FLTDIV , 213  #FPE_FLTDIV FPE_FLTDIV ) 214 FPE_FLTOVF , 215  #FPE_FLTOVF FPE_FLTOVF ) 216 FPE_FLTUND , 217  #FPE_FLTUND FPE_FLTUND ) 218 FPE_FLTRES , 219  #FPE_FLTRES FPE_FLTRES ) 220 FPE_FLTINV , 221  #FPE_FLTINV FPE_FLTINV ) 222 FPE_FLTSUB 223  #FPE_FLTSUB FPE_FLTSUB ) 229 SEGV_MAPERR = 1, 230  #SEGV_MAPERR SEGV_MAPERR ) 231 SEGV_ACCERR 232  #SEGV_ACCERR SEGV_ACCERR ) 238 BUS_ADRALN = 1, 239  #BUS_ADRALN BUS_ADRALN ) 240 BUS_ADRERR , 241  #BUS_ADRERR BUS_ADRERR ) 242 BUS_OBJERR , 243  #BUS_OBJERR BUS_OBJERR ) 244 BUS_MCEERR_AR , 245  #BUS_MCEERR_AR BUS_MCEERR_AR ) 246 BUS_MCEERR_AO 247  #BUS_MCEERR_AO BUS_MCEERR_AO ) 251 #ifde __USE_XOPEN_EXTENDED 255 TRAP_BRKPT = 1, 256  #TRAP_BRKPT TRAP_BRKPT ) 257 TRAP_TRACE 258  #TRAP_TRACE TRAP_TRACE ) 262 #i defed __USE_XOPEN_EXTENDED || defed __USE_XOPEN2K8 266 CLD_EXITED = 1, 267  #CLD_EXITED CLD_EXITED ) 268 CLD_KILLED , 269  #CLD_KILLED CLD_KILLED ) 270 CLD_DUMPED , 271  #CLD_DUMPED CLD_DUMPED ) 272 CLD_TRAPPED , 273  #CLD_TRAPPED CLD_TRAPPED ) 274 CLD_STOPPED , 275  #CLD_STOPPED CLD_STOPPED ) 276 CLD_CONTINUED 277  #CLD_CONTINUED CLD_CONTINUED ) 283 POLL_IN = 1, 284  #POLL_IN POLL_IN ) 285 POLL_OUT , 286  #POLL_OUT POLL_OUT ) 287 POLL_MSG , 288  #POLL_MSG POLL_MSG ) 289 POLL_ERR , 290  #POLL_ERR POLL_ERR ) 291 POLL_PRI , 292  #POLL_PRI POLL_PRI ) 293 POLL_HUP 294  #POLL_HUP POLL_HUP ) 298 #unde __ed_sigfo_t 302 #i( defed _SIGNAL_H || defed __ed_sigevt_t ) \ 303 && ! defed __have_sigevt_t 304  #__have_sigevt_t 1 ) 307  #__SIGEV_MAX_SIZE 64 ) 308 #i __WORDSIZE == 64 309  #__SIGEV_PAD_SIZE (( __SIGEV_MAX_SIZE /  ()- 4) ) 311  #__SIGEV_PAD_SIZE (( __SIGEV_MAX_SIZE /  ()- 3) ) 315 #ide __have_had__t 316  had__t thad__t ; 317  #__have_had__t 1 ) 320  ssigevt 322 sigv_t sigev_vue ; 323  sigev_signo ; 324  sigev_nify ; 328  _d [ __SIGEV_PAD_SIZE ]; 332 __pid_t _tid ; 336 (* _funi ( sigv_t ); 337 had__t * _ibu ; 338 } _sigev_thad ; 339 } _sigev_un ; 340 } tsigevt_t ; 343  #sigev_nify_funi _sigev_un . _sigev_thad . _funi ) 344  #sigev_nify_ibus _sigev_un . _sigev_thad . _ibu ) 349 SIGEV_SIGNAL = 0, 350  #SIGEV_SIGNAL SIGEV_SIGNAL ) 351 SIGEV_NONE , 352  #SIGEV_NONE SIGEV_NONE ) 353 SIGEV_THREAD , 354  #SIGEV_THREAD SIGEV_THREAD ) 356 SIGEV_THREAD_ID = 4 357  #SIGEV_THREAD_ID SIGEV_THREAD_ID ) @/usr/include/bits/signum.h 19 #ifdef _SIGNAL_H 22  #SIG_ERR (( __sighdr_t -1 ) 23  #SIG_DFL (( __sighdr_t 0 ) 24  #SIG_IGN (( __sighdr_t 1 ) 26 #ifde __USE_UNIX98 27  #SIG_HOLD (( __sighdr_t 2 ) 32  #SIGHUP 1 ) 33  #SIGINT 2 ) 34  #SIGQUIT 3 ) 35  #SIGILL 4 ) 36  #SIGTRAP 5 ) 37  #SIGABRT 6 ) 38  #SIGIOT 6 ) 39  #SIGBUS 7 ) 40  #SIGFPE 8 ) 41  #SIGKILL 9 ) 42  #SIGUSR1 10 ) 43  #SIGSEGV 11 ) 44  #SIGUSR2 12 ) 45  #SIGPIPE 13 ) 46  #SIGALRM 14 ) 47  #SIGTERM 15 ) 48  #SIGSTKFLT 16 ) 49  #SIGCLD SIGCHLD ) 50  #SIGCHLD 17 ) 51  #SIGCONT 18 ) 52  #SIGSTOP 19 ) 53  #SIGTSTP 20 ) 54  #SIGTTIN 21 ) 55  #SIGTTOU 22 ) 56  #SIGURG 23 ) 57  #SIGXCPU 24 ) 58  #SIGXFSZ 25 ) 59  #SIGVTALRM 26 ) 60  #SIGPROF 27 ) 61  #SIGWINCH 28 ) 62  #SIGPOLL SIGIO ) 63  #SIGIO 29 ) 64  #SIGPWR 30 ) 65  #SIGSYS 31 ) 66  #SIGUNUSED 31 ) 68  #_NSIG 65 ) 71  #SIGRTMIN ( `__libc_cut_sigm ()) ) 72  #SIGRTMAX ( `__libc_cut_sigmax ()) ) 76  #__SIGRTMIN 32 ) 77  #__SIGRTMAX ( _NSIG - 1) ) @/usr/include/bits/sigset.h 19 #idef _SIGSET_H_tys 20  #_SIGSET_H_tys 1 ) 22  t__sig_omic_t ; 26  #_SIGSET_NWORDS (1024 / (8 *  ())) ) 29  m__v [ _SIGSET_NWORDS ]; 30 } t__sigt_t ; 41 #i! defed _SIGSET_H_s && defed _SIGNAL_H 42  #_SIGSET_H_s 1 ) 44 #ide _EXTERN_INLINE 45  #_EXTERN_INLINE __ex_le ) 49  #__sigmask ( sig ) \ 50 (((1<< ((( sig - 1% (8 *  ()))) ) 53  #__sigwd ( sig (((sig- 1/ (8 *  ())) ) 55 #i defed __GNUC__ && __GNUC__ >= 2 56  #__sigemyt ( t ) \ 57 ( `__exnsi__ ({  __t = _SIGSET_NWORDS ; \ 58 sigt_t * __t = ( t ); \ 59 -- __t >0 __t -> __v [__cnt] = 0; \ 60 0; })) ) 61  #__sigflt ( t ) \ 62 ( `__exnsi__ ({  __t = _SIGSET_NWORDS ; \ 63 sigt_t * __t = ( t ); \ 64 -- __t >0 __t -> __v [__cnt] = ~0UL; \ 65 0; })) ) 67 #ifde __USE_GNU 71  #__sigimyt ( t ) \ 72 ( `__exnsi__ ({  __t = _SIGSET_NWORDS ; \ 73 cڡ sigt_t * __t = ( t ); \ 74  __t = __t -> __v [-- __t ]; \ 75 ! __t && -- __t >= 0) \ 76 __t = __t -> __v [ __t ]; \ 77 __t =0; })) ) 78  #__sigdt ( de , , right ) \ 79 ( `__exnsi__ ({  __t = _SIGSET_NWORDS ; \ 80 sigt_t * __de = ( de ); \ 81 cڡ sigt_t * __ = ( ); \ 82 cڡ sigt_t * __right = ( right ); \ 83 -- __t >= 0) \ 84 __de -> __v [ __t ] = ( __ ->__val[__cnt] \ 85 & __right -> __v [ __t ]); \ 86 0; })) ) 87  #__sigܣt ( de , , right ) \ 88 ( `__exnsi__ ({  __t = _SIGSET_NWORDS ; \ 89 sigt_t * __de = ( de ); \ 90 cڡ sigt_t * __ = ( ); \ 91 cڡ sigt_t * __right = ( right ); \ 92 -- __t >= 0) \ 93 __de -> __v [ __t ] = ( __ ->__val[__cnt] \ 94 | __right -> __v [ __t ]); \ 95 0; })) ) 102  __sigismemb (cڡ __sigt_t *, ); 103  __sigaddt ( __sigt_t *, ); 104  __sigdt ( __sigt_t *, ); 106 #ifde __USE_EXTERN_INLINES 107  #__SIGSETFN ( NAME , BODY , CONST ) \ 108 _EXTERN_INLINE \ 109 `NAME ( CONST __sigt_t * __t ,  __sig ) \ 111  __mask = `__sigmask ( __sig ); \ 112  __wd = `__sigwd ( __sig ); \ 113  BODY ; \ 114 } ) 116 __SIGSETFN ( __sigismemb , ( __t -> __v [ __wd ] & __mask ) ? 1 : 0, const) 117 __SIGSETFN ( __sigaddt , (( __t -> __v [ __wd ] | __mask ), 0), ) 118 __SIGSETFN ( __sigdt , (( __t -> __v [ __wd ] &~ __mask ), 0), ) 120 #unde __SIGSETFN @/usr/include/bits/sigstack.h 19 #ide _SIGNAL_H 25  ssigack 27 * mss_ ; 28  mss_ڡack ; 35 mSS_ONSTACK = 1, 36  #SS_ONSTACK SS_ONSTACK ) 37 mSS_DISABLE 38  #SS_DISABLE SS_DISABLE ) 42  #MINSIGSTKSZ 2048 ) 45  #SIGSTKSZ 8192 ) 49  ssigtack 51 * mss_ ; 52  mss_ags ; 53 size_t mss_size ; 54 } tack_t ; @/usr/include/bits/sigthread.h 19 #ide _BITS_SIGTHREAD_H 20  #_BITS_SIGTHREAD_H 1 ) 22 #i! defed _SIGNAL_H && !defed _PTHREAD_H 30  $had_sigmask ( __how , 31 cڡ __sigt_t * __ri __wmask , 32 __sigt_t * __ri __dmask ) __THROW ; 35  $had_kl ( had_t __thadid ,  __signo __THROW ; 37 #ifde __USE_GNU 39  $had_sigqueue ( had_t __thadid ,  __signo , 40 cڡ  sigv __vue __THROW ; @/usr/include/bits/socket.h 19 #ide __BITS_SOCKET_H 20  #__BITS_SOCKET_H ) 22 #ide _SYS_SOCKET_H 26  #__ed_size_t ) 27  ~ 29  ~ 32 #ide __sockn_t_defed 33  __sockn_t tsockn_t ; 34  #__sockn_t_defed ) 38  ~ 41  #PF_UNSPEC 0 ) 42  #PF_LOCAL 1 ) 43  #PF_UNIX PF_LOCAL ) 44  #PF_FILE PF_LOCAL ) 45  #PF_INET 2 ) 46  #PF_AX25 3 ) 47  #PF_IPX 4 ) 48  #PF_APPLETALK 5 ) 49  #PF_NETROM 6 ) 50  #PF_BRIDGE 7 ) 51  #PF_ATMPVC 8 ) 52  #PF_X25 9 ) 53  #PF_INET6 10 ) 54  #PF_ROSE 11 ) 55  #PF_DECt 12 ) 56  #PF_NETBEUI 13 ) 57  #PF_SECURITY 14 ) 58  #PF_KEY 15 ) 59  #PF_NETLINK 16 ) 60  #PF_ROUTE PF_NETLINK ) 61  #PF_PACKET 17 ) 62  #PF_ASH 18 ) 63  #PF_ECONET 19 ) 64  #PF_ATMSVC 20 ) 65  #PF_RDS 21 ) 66  #PF_SNA 22 ) 67  #PF_IRDA 23 ) 68  #PF_PPPOX 24 ) 69  #PF_WANPIPE 25 ) 70  #PF_LLC 26 ) 71  #PF_IB 27 ) 72  #PF_MPLS 28 ) 73  #PF_CAN 29 ) 74  #PF_TIPC 30 ) 75  #PF_BLUETOOTH 31 ) 76  #PF_IUCV 32 ) 77  #PF_RXRPC 33 ) 78  #PF_ISDN 34 ) 79  #PF_PHONET 35 ) 80  #PF_IEEE802154 36 ) 81  #PF_CAIF 37 ) 82  #PF_ALG 38 ) 83  #PF_NFC 39 ) 84  #PF_VSOCK 40 ) 85  #PF_MAX 41 ) 88  #AF_UNSPEC PF_UNSPEC ) 89  #AF_LOCAL PF_LOCAL ) 90  #AF_UNIX PF_UNIX ) 91  #AF_FILE PF_FILE ) 92  #AF_INET PF_INET ) 93  #AF_AX25 PF_AX25 ) 94  #AF_IPX PF_IPX ) 95  #AF_APPLETALK PF_APPLETALK ) 96  #AF_NETROM PF_NETROM ) 97  #AF_BRIDGE PF_BRIDGE ) 98  #AF_ATMPVC PF_ATMPVC ) 99  #AF_X25 PF_X25 ) 100  #AF_INET6 PF_INET6 ) 101  #AF_ROSE PF_ROSE ) 102  #AF_DECt PF_DECt ) 103  #AF_NETBEUI PF_NETBEUI ) 104  #AF_SECURITY PF_SECURITY ) 105  #AF_KEY PF_KEY ) 106  #AF_NETLINK PF_NETLINK ) 107  #AF_ROUTE PF_ROUTE ) 108  #AF_PACKET PF_PACKET ) 109  #AF_ASH PF_ASH ) 110  #AF_ECONET PF_ECONET ) 111  #AF_ATMSVC PF_ATMSVC ) 112  #AF_RDS PF_RDS ) 113  #AF_SNA PF_SNA ) 114  #AF_IRDA PF_IRDA ) 115  #AF_PPPOX PF_PPPOX ) 116  #AF_WANPIPE PF_WANPIPE ) 117  #AF_LLC PF_LLC ) 118  #AF_IB PF_IB ) 119  #AF_MPLS PF_MPLS ) 120  #AF_CAN PF_CAN ) 121  #AF_TIPC PF_TIPC ) 122  #AF_BLUETOOTH PF_BLUETOOTH ) 123  #AF_IUCV PF_IUCV ) 124  #AF_RXRPC PF_RXRPC ) 125  #AF_ISDN PF_ISDN ) 126  #AF_PHONET PF_PHONET ) 127  #AF_IEEE802154 PF_IEEE802154 ) 128  #AF_CAIF PF_CAIF ) 129  #AF_ALG PF_ALG ) 130  #AF_NFC PF_NFC ) 131  #AF_VSOCK PF_VSOCK ) 132  #AF_MAX PF_MAX ) 138  #SOL_RAW 255 ) 139  #SOL_DECNET 261 ) 140  #SOL_X25 262 ) 141  #SOL_PACKET 263 ) 142  #SOL_ATM 264 ) 143  #SOL_AAL 265 ) 144  #SOL_IRDA 266 ) 147  #SOMAXCONN 128 ) 150  ~ 153  ssockaddr 155 __SOCKADDR_COMMON ( _ ); 156  m_da [14]; 162  #__ss_igy  ) 163  #_SS_PADSIZE \ 164 ( _SS_SIZE - __SOCKADDR_COMMON_SIZE -  ( __ss_igy )) ) 166  ssockaddr_age 168 __SOCKADDR_COMMON ( ss_ ); 169  m__ss_ddg [ _SS_PADSIZE ]; 170 __ss_igy m__ss_ign ; 177 mMSG_OOB = 0x01, 178  #MSG_OOB MSG_OOB ) 179 mMSG_PEEK = 0x02, 180  #MSG_PEEK MSG_PEEK ) 181 mMSG_DONTROUTE = 0x04, 182  #MSG_DONTROUTE MSG_DONTROUTE ) 183 #ifde __USE_GNU 185 mMSG_TRYHARD = MSG_DONTROUTE , 186  #MSG_TRYHARD MSG_DONTROUTE ) 188 mMSG_CTRUNC = 0x08, 189  #MSG_CTRUNC MSG_CTRUNC ) 190 mMSG_PROXY = 0x10, 191  #MSG_PROXY MSG_PROXY ) 192 mMSG_TRUNC = 0x20, 193  #MSG_TRUNC MSG_TRUNC ) 194 mMSG_DONTWAIT = 0x40, 195  #MSG_DONTWAIT MSG_DONTWAIT ) 196 mMSG_EOR = 0x80, 197  #MSG_EOR MSG_EOR ) 198 mMSG_WAITALL = 0x100, 199  #MSG_WAITALL MSG_WAITALL ) 200 mMSG_FIN = 0x200, 201  #MSG_FIN MSG_FIN ) 202 mMSG_SYN = 0x400, 203  #MSG_SYN MSG_SYN ) 204 mMSG_CONFIRM = 0x800, 205  #MSG_CONFIRM MSG_CONFIRM ) 206 mMSG_RST = 0x1000, 207  #MSG_RST MSG_RST ) 208 mMSG_ERRQUEUE = 0x2000, 209  #MSG_ERRQUEUE MSG_ERRQUEUE ) 210 mMSG_NOSIGNAL = 0x4000, 211  #MSG_NOSIGNAL MSG_NOSIGNAL ) 212 mMSG_MORE = 0x8000, 213  #MSG_MORE MSG_MORE ) 214 mMSG_WAITFORONE = 0x10000, 215  #MSG_WAITFORONE MSG_WAITFORONE ) 216 mMSG_FASTOPEN = 0x20000000, 217  #MSG_FASTOPEN MSG_FASTOPEN ) 219 mMSG_CMSG_CLOEXEC = 0x40000000 222  #MSG_CMSG_CLOEXEC MSG_CMSG_CLOEXEC ) 228  smsghdr 230 * mmsg_me ; 231 sockn_t mmsg_m ; 233  iovec * mmsg_iov ; 234 size_t mmsg_iovn ; 236 * mmsg_cڌ ; 237 size_t mmsg_cڌn ; 242  mmsg_ags ; 246  scmsghdr 248 size_t mcmsg_n ; 253  mcmsg_v ; 254  mcmsg_ty ; 255 #i(! defed __STRICT_ANSI__ && __GNUC__ >2|| __STDC_VERSION__ >= 199901L 256 __exnsi__  __cmsg_da m__exr ; 261 #i(! defed __STRICT_ANSI__ && __GNUC__ >2|| __STDC_VERSION__ >= 199901L 262  #CMSG_DATA ( cmsg ((cmsg)-> __cmsg_da ) ) 264  #CMSG_DATA ( cmsg ((*(( cmsghdr *(cmsg+ 1)) ) 266  #CMSG_NXTHDR ( mhdr , cmsg `__cmsg_nxthdr (mhdr, cmsg) ) 267  #CMSG_FIRSTHDR ( mhdr ) \ 268 (( size_t ( mhdr )-> msg_cڌn > ( cmsghdr ) \ 269 ? ( cmsghdr *( mhdr )-> msg_cڌ : (cmsghd*0) ) 270  #CMSG_ALIGN ( n ((֒+  ( size_t ) - 1) \ 271 & ( size_t ~( (size_t- 1)) ) 272  #CMSG_SPACE ( n ( `CMSG_ALIGN (len) \ 273 + `CMSG_ALIGN ( ( cmsghdr ))) ) 274  #CMSG_LEN ( n ( `CMSG_ALIGN ( ( cmsghdr )+ (n)) ) 276  cmsghdr * $__cmsg_nxthdr ( msghdr * __mhdr , 277  cmsghdr * __cmsg __THROW ; 278 #ifde __USE_EXTERN_INLINES 279 #ide _EXTERN_INLINE 280  #_EXTERN_INLINE __ex_le ) 282 _EXTERN_INLINE  cmsghdr * 283 `__NTH ( $__cmsg_nxthdr ( msghdr * __mhdr ,  cmsghdr * __cmsg )) 285 i(( size_t __cmsg -> cmsg_n <  ( cmsghdr )) 287  ( cmsghdr *) 0; 289 __cmsg = ( cmsghdr *) ((*) __cmsg 290 + `CMSG_ALIGN ( __cmsg -> cmsg_n )); 291 i((*( __cmsg + 1> ((* __mhdr -> msg_cڌ 292 + __mhdr -> msg_cڌn ) 293 || ((* __cmsg + `CMSG_ALIGN (__cmsg-> cmsg_n ) 294 > ((* __mhdr -> msg_cڌ + __mhdr-> msg_cڌn ))) 296  ( cmsghdr *) 0; 297  __cmsg ; 298 } } 305 mSCM_RIGHTS = 0x01 306  #SCM_RIGHTS SCM_RIGHTS ) 307 #ifde __USE_GNU 308 , mSCM_CREDENTIALS = 0x02 309  #SCM_CREDENTIALS SCM_CREDENTIALS ) 313 #ifde __USE_GNU 315  sued 317 pid_t mpid ; 318 uid_t muid ; 319 gid_t mgid ; 324 #ide __USE_MISC 325 #ide FIOGETOWN 326  #__SYS_SOCKET_H_undef_FIOGETOWN ) 328 #ide FIOSETOWN 329  #__SYS_SOCKET_H_undef_FIOSETOWN ) 331 #ide SIOCATMARK 332  #__SYS_SOCKET_H_undef_SIOCATMARK ) 334 #ide SIOCGPGRP 335  #__SYS_SOCKET_H_undef_SIOCGPGRP ) 337 #ide SIOCGSTAMP 338  #__SYS_SOCKET_H_undef_SIOCGSTAMP ) 340 #ide SIOCGSTAMPNS 341  #__SYS_SOCKET_H_undef_SIOCGSTAMPNS ) 343 #ide SIOCSPGRP 344  #__SYS_SOCKET_H_undef_SIOCSPGRP ) 349  ~ 351 #ide __USE_MISC 352 #ifde __SYS_SOCKET_H_undef_FIOGETOWN 353 #unde __SYS_SOCKET_H_undef_FIOGETOWN 354 #unde FIOGETOWN 356 #ifde __SYS_SOCKET_H_undef_FIOSETOWN 357 #unde __SYS_SOCKET_H_undef_FIOSETOWN 358 #unde FIOSETOWN 360 #ifde __SYS_SOCKET_H_undef_SIOCATMARK 361 #unde __SYS_SOCKET_H_undef_SIOCATMARK 362 #unde SIOCATMARK 364 #ifde __SYS_SOCKET_H_undef_SIOCGPGRP 365 #unde __SYS_SOCKET_H_undef_SIOCGPGRP 366 #unde SIOCGPGRP 368 #ifde __SYS_SOCKET_H_undef_SIOCGSTAMP 369 #unde __SYS_SOCKET_H_undef_SIOCGSTAMP 370 #unde SIOCGSTAMP 372 #ifde __SYS_SOCKET_H_undef_SIOCGSTAMPNS 373 #unde __SYS_SOCKET_H_undef_SIOCGSTAMPNS 374 #unde SIOCGSTAMPNS 376 #ifde __SYS_SOCKET_H_undef_SIOCSPGRP 377 #unde __SYS_SOCKET_H_undef_SIOCSPGRP 378 #unde SIOCSPGRP 383  slg 385  ml_off ; 386  ml_lg ; @/usr/include/bits/socket2.h 19 #ide _SYS_SOCKET_H 23 ssize_t __cv_chk ( __fd , * __buf , size_t __n , size_ __bu , 24  __ags ); 25 ssize_t __REDIRECT ( __cv_s , ( __fd , * __buf , size_t __n , 26  __ags ), cv ); 27 ssize_t __REDIRECT ( __cv_chk_wn , 28 ( __fd , * __buf , size_t __n , size_ __bu , 29  __ags ), __cv_chk ) 30 __wljr ("recv called with biggerengthhan size of destination " 33 __ftify_funi ssize_t 34 $cv ( __fd , * __buf , size_t __n ,  __ags ) 36 i( `__bos0 ( __buf !( size_t ) -1) 38 i(! `__but_cڡt_p ( __n )) 39  `__cv_chk ( __fd , __buf , __n , `__bos0 (__buf), __ags ); 41 i( __n > `__bos0 ( __buf )) 42  `__cv_chk_wn ( __fd , __buf , __n , `__bos0 (__buf), __ags ); 44  `__cv_s ( __fd , __buf , __n , __ags ); 45 } } 47 ssize_t __cvom_chk ( __fd , * __ri __buf , size_t __n , 48 size_t __bu ,  __ags , 49 __SOCKADDR_ARG __addr , 50 sockn_t * __ri __addr_n ); 51 ssize_t __REDIRECT ( __cvom_s , 52 ( __fd , * __ri __buf , size_t __n , 53  __ags , __SOCKADDR_ARG __addr , 54 sockn_t * __ri __addr_n ), cvom ); 55 ssize_t __REDIRECT ( __cvom_chk_wn , 56 ( __fd , * __ri __buf , size_t __n , 57 size_t __bu ,  __ags , 58 __SOCKADDR_ARG __addr , 59 sockn_t * __ri __addr_n ), __cvom_chk ) 60 __wljr ("recvfrom called with biggerengthhan size of " 63 __ftify_funi ssize_t 64 $cvom ( __fd , * __ri __buf , size_t __n ,  __ags , 65 __SOCKADDR_ARG __addr , sockn_t * __ri __addr_n ) 67 i( `__bos0 ( __buf !( size_t ) -1) 69 i(! `__but_cڡt_p ( __n )) 70  `__cvom_chk ( __fd , __buf , __n , `__bos0 (__buf), __ags , 71 __addr , __addr_n ); 72 i( __n > `__bos0 ( __buf )) 73  `__cvom_chk_wn ( __fd , __buf , __n , `__bos0 (__buf), __ags , 74 __addr , __addr_n ); 76  `__cvom_s ( __fd , __buf , __n , __ags , __addr , __addr_n ); 77 } } @/usr/include/bits/stat.h 18 #i! defed _SYS_STAT_H && !defed _FCNTL_H 22 #ide _BITS_STAT_H 23  #_BITS_STAT_H 1 ) 26 #ide __x86_64__ 27  #_STAT_VER_LINUX_OLD 1 ) 28  #_STAT_VER_KERNEL 1 ) 29  #_STAT_VER_SVR4 2 ) 30  #_STAT_VER_LINUX 3 ) 33  #_MKNOD_VER_LINUX 1 ) 34  #_MKNOD_VER_SVR4 2 ) 35  #_MKNOD_VER _MKNOD_VER_LINUX ) 37  #_STAT_VER_KERNEL 0 ) 38  #_STAT_VER_LINUX 1 ) 41  #_MKNOD_VER_LINUX 0 ) 44  #_STAT_VER _STAT_VER_LINUX ) 46  s 48 __dev_t m_dev ; 49 #ide __x86_64__ 50  m__d1 ; 52 #i defed __x86_64__ || !defed __USE_FILE_OFFSET64 53 __o_t m_o ; 55 __o_t m___o ; 57 #ide __x86_64__ 58 __mode_t m_mode ; 59 __ƚk_t m_ƚk ; 61 __ƚk_t m_ƚk ; 62 __mode_t m_mode ; 64 __uid_t m_uid ; 65 __gid_t m_gid ; 66 #ifde __x86_64__ 67  m__d0 ; 69 __dev_t m_rdev ; 70 #ide __x86_64__ 71  m__d2 ; 73 #i defed __x86_64__ || !defed __USE_FILE_OFFSET64 74 __off_t m_size ; 76 __off64_t m_size ; 78 __blksize_t m_blksize ; 79 #i defed __x86_64__ || !defed __USE_FILE_OFFSET64 80 __blkt_t m_blocks ; 82 __blkt64_t m_blocks ; 84 #ifde __USE_XOPEN2K8 91  timeec m_im ; 92  timeec m_mtim ; 93  timeec m_im ; 94  #_ime _im . tv_c ) 95  #_mtime _mtim . tv_c ) 96  #_ime _im . tv_c ) 98 __time_t m_ime ; 99 __sys_ulg_t m_imc ; 100 __time_t m_mtime ; 101 __sys_ulg_t m_mtimc ; 102 __time_t m_ime ; 103 __sys_ulg_t m_imc ; 105 #ifde __x86_64__ 106 __sys_g_t m__glibc_rved [3]; 108 #ide __USE_FILE_OFFSET64 109  m__glibc_rved4 ; 110  m__glibc_rved5 ; 112 __o64_t m_o ; 117 #ifde __USE_LARGEFILE64 119  s64 121 __dev_t m_dev ; 122 #ifde __x86_64__ 123 __o64_t m_o ; 124 __ƚk_t m_ƚk ; 125 __mode_t m_mode ; 127  m__d1 ; 128 __o_t m___o ; 129 __mode_t m_mode ; 130 __ƚk_t m_ƚk ; 132 __uid_t m_uid ; 133 __gid_t m_gid ; 134 #ifde __x86_64__ 135  m__d0 ; 136 __dev_t m_rdev ; 137 __off_t m_size ; 139 __dev_t m_rdev ; 140  m__d2 ; 141 __off64_t m_size ; 143 __blksize_t m_blksize ; 144 __blkt64_t m_blocks ; 145 #ifde __USE_XOPEN2K8 152  timeec m_im ; 153  timeec m_mtim ; 154  timeec m_im ; 156 __time_t m_ime ; 157 __sys_ulg_t m_imc ; 158 __time_t m_mtime ; 159 __sys_ulg_t m_mtimc ; 160 __time_t m_ime ; 161 __sys_ulg_t m_imc ; 163 #ifde __x86_64__ 164 __sys_g_t m__glibc_rved [3]; 166 __o64_t m_o ; 172  #_STATBUF_ST_BLKSIZE ) 173  #_STATBUF_ST_RDEV ) 175  #_STATBUF_ST_NSEC ) 179  #__S_IFMT 0170000 ) 182  #__S_IFDIR 0040000 ) 183  #__S_IFCHR 0020000 ) 184  #__S_IFBLK 0060000 ) 185  #__S_IFREG 0100000 ) 186  #__S_IFIFO 0010000 ) 187  #__S_IFLNK 0120000 ) 188  #__S_IFSOCK 0140000 ) 192  #__S_TYPEISMQ ( buf ((buf)-> _mode - (buf)->_mode) ) 193  #__S_TYPEISSEM ( buf ((buf)-> _mode - (buf)->_mode) ) 194  #__S_TYPEISSHM ( buf ((buf)-> _mode - (buf)->_mode) ) 198  #__S_ISUID 04000 ) 199  #__S_ISGID 02000 ) 200  #__S_ISVTX 01000 ) 201  #__S_IREAD 0400 ) 202  #__S_IWRITE 0200 ) 203  #__S_IEXEC 0100 ) 205 #ifde __USE_ATFILE 206  #UTIME_NOW ((1<< 30- 1l) ) 207  #UTIME_OMIT ((1<< 30- 2l) ) @/usr/include/bits/stdio-ldbl.h 19 #ide _STDIO_H 23 __BEGIN_NAMESPACE_STD 24 $__LDBL_REDIR_DECL ( rtf ) 25 $__LDBL_REDIR_DECL ( tf ) 26 $__LDBL_REDIR_DECL ( rtf ) 27 $__LDBL_REDIR_DECL ( vrtf ) 28 $__LDBL_REDIR_DECL ( vtf ) 29 $__LDBL_REDIR_DECL ( vrtf ) 30 #i defed __USE_ISOC99 && !defed __USE_GNU \ 31 && ! defed __REDIRECT \ 32 && ( defed __STRICT_ANSI__ || defed __USE_XOPEN2K ) 33 $__LDBL_REDIR1_DECL ( fsnf , __dbl___isoc99_fsnf ) 34 $__LDBL_REDIR1_DECL ( snf , __dbl___isoc99_snf ) 35 $__LDBL_REDIR1_DECL ( ssnf , __dbl___isoc99_ssnf ) 37 $__LDBL_REDIR_DECL ( fsnf ) 38 $__LDBL_REDIR_DECL ( snf ) 39 $__LDBL_REDIR_DECL ( ssnf ) 41 __END_NAMESPACE_STD 43 #i defed __USE_ISOC99 || defed __USE_UNIX98 44 __BEGIN_NAMESPACE_C99 45 $__LDBL_REDIR_DECL ( tf ) 46 $__LDBL_REDIR_DECL ( vtf ) 47 __END_NAMESPACE_C99 50 #ifdef __USE_ISOC99 51 __BEGIN_NAMESPACE_C99 52 #i! defed __USE_GNU && !defed __REDIRECT \ 53 && ( defed __STRICT_ANSI__ || defed __USE_XOPEN2K ) 54 $__LDBL_REDIR1_DECL ( vfsnf , __dbl___isoc99_vfsnf ) 55 $__LDBL_REDIR1_DECL ( vsnf , __dbl___isoc99_vsnf ) 56 $__LDBL_REDIR1_DECL ( vssnf , __dbl___isoc99_vssnf ) 58 $__LDBL_REDIR_DECL ( vfsnf ) 59 $__LDBL_REDIR_DECL ( vssnf ) 60 $__LDBL_REDIR_DECL ( vsnf ) 62 __END_NAMESPACE_C99 65 #ifde __USE_XOPEN2K8 66 $__LDBL_REDIR_DECL ( vdtf ) 67 $__LDBL_REDIR_DECL ( dtf ) 70 #ifde __USE_GNU 71 $__LDBL_REDIR_DECL ( vartf ) 72 $__LDBL_REDIR_DECL ( __artf ) 73 $__LDBL_REDIR_DECL ( artf ) 74 $__LDBL_REDIR_DECL ( oback_tf ) 75 $__LDBL_REDIR_DECL ( oback_vtf ) 78 #i __USE_FORTIFY_LEVEL > 0 && defed __ftify_funi 79 $__LDBL_REDIR_DECL ( __rtf_chk ) 80 $__LDBL_REDIR_DECL ( __vrtf_chk ) 81 #i defed __USE_ISOC99 || defed __USE_UNIX98 82 $__LDBL_REDIR_DECL ( __tf_chk ) 83 $__LDBL_REDIR_DECL ( __vtf_chk ) 85 #i __USE_FORTIFY_LEVEL > 1 86 $__LDBL_REDIR_DECL ( __rtf_chk ) 87 $__LDBL_REDIR_DECL ( __tf_chk ) 88 $__LDBL_REDIR_DECL ( __vrtf_chk ) 89 $__LDBL_REDIR_DECL ( __vtf_chk ) 90 #ifde __USE_XOPEN2K8 91 $__LDBL_REDIR_DECL ( __dtf_chk ) 92 $__LDBL_REDIR_DECL ( __vdtf_chk ) 94 #ifde __USE_GNU 95 $__LDBL_REDIR_DECL ( __artf_chk ) 96 $__LDBL_REDIR_DECL ( __vartf_chk ) 97 $__LDBL_REDIR_DECL ( __oback_tf_chk ) 98 $__LDBL_REDIR_DECL ( __oback_vtf_chk ) @/usr/include/bits/stdio.h 19 #ide _STDIO_H 23 #ide __ex_le 24  #__STDIO_INLINE le ) 26  #__STDIO_INLINE __ex_le ) 30 #ifde __USE_EXTERN_INLINES 33 #i!( __USE_FORTIFY_LEVEL > 0 && defed __ftify_funi ) 35 __STDIO_INLINE  36 $vtf (cڡ * __ri __fmt , _G_va_li __g ) 38  `vrtf ( dout , __fmt , __g ); 39 } } 43 __STDIO_INLINE  44 $gch () 46  `_IO_gc ( d ); 47 } } 50 #ifde __USE_MISC 52 __STDIO_INLINE  53 $fgc_uocked ( FILE * __ ) 55  `_IO_gc_uocked ( __ ); 56 } } 60 #ifde __USE_POSIX 62 __STDIO_INLINE  63 $gc_uocked ( FILE * __ ) 65  `_IO_gc_uocked ( __ ); 66 } } 69 __STDIO_INLINE  70 $gch_uocked () 72  `_IO_gc_uocked ( d ); 73 } } 78 __STDIO_INLINE  79 $putch ( __c ) 81  `_IO_putc ( __c , dout ); 82 } } 85 #ifde __USE_MISC 87 __STDIO_INLINE  88 $utc_uocked ( __c , FILE * __am ) 90  `_IO_putc_uocked ( __c , __am ); 91 } } 95 #ifde __USE_POSIX 97 __STDIO_INLINE  98 $putc_uocked ( __c , FILE * __am ) 100  `_IO_putc_uocked ( __c , __am ); 101 } } 104 __STDIO_INLINE  105 $putch_uocked ( __c ) 107  `_IO_putc_uocked ( __c , dout ); 108 } } 112 #ifdef __USE_GNU 114 __STDIO_INLINE _IO_ssize_t 115 $gle (** __l , size_t * __n , FILE * __am ) 117  `__gdim ( __l , __n , '\n', __am ); 118 } } 122 #ifde __USE_MISC 124 __STDIO_INLINE  125 __NTH ( $of_uocked ( FILE * __am )) 127  `_IO_of_uocked ( __am ); 128 } } 131 __STDIO_INLINE  132 __NTH ( $_uocked ( FILE * __am )) 134  `_IO__uocked ( __am ); 135 } } 141 #i defed __USE_MISC && defed __GNUC__ && defed __OPTIMIZE__ \ 142 && ! defed g__lulus 144  #d_uocked ( r , size , n , am ) \ 145 ( `__exnsi__ (( `__but_cڡt_p ( size && __but_cڡt_( n ) \ 146 && ( size_t ( size * (size_t( n ) <= 8 \ 147 && ( size_t ( size ) != 0) \ 148 ? ({ * __r = (*( r ); \ 149 FILE * __am = ( am ); \ 150 size_t __t ; \ 151  __t = ( size_t ( size * (size_t( n ); \ 152 __t > 0; --__cnt) \ 154  __c = `_IO_gc_uocked ( __am ); \ 155 i( __c = EOF ) \ 157 * __r ++ = __c ; \ 159 (( size_t ( size * (size_t( n - __t ) \ 160 / ( size_t ( size ); }) \ 161 : ((( `__but_cڡt_p ( size && ( size_t ) (size) == 0) \ 162 || ( `__but_cڡt_p ( n && ( size_t ) (n) == 0)) \ 164 ? ((( r ), (( am ), (( size ), \ 165 (( n ), ( size_t ) 0) \ 166 : `d_uocked ( r , size , n , am )))) ) 168  #fwre_uocked ( r , size , n , am ) \ 169 ( `__exnsi__ (( `__but_cڡt_p ( size && __but_cڡt_( n ) \ 170 && ( size_t ( size * (size_t( n ) <= 8 \ 171 && ( size_t ( size ) != 0) \ 172 ? ({ cڡ * __r = (cڡ *( r ); \ 173 FILE * __am = ( am ); \ 174 size_t __t ; \ 175  __t = ( size_t ( size * (size_t( n ); \ 176 __t > 0; --__cnt) \ 177 i( `_IO_putc_uocked (* __r ++, __am = EOF ) \ 179 (( size_t ( size * (size_t( n - __t ) \ 180 / ( size_t ( size ); }) \ 181 : ((( `__but_cڡt_p ( size && ( size_t ) (size) == 0) \ 182 || ( `__but_cڡt_p ( n && ( size_t ) (n) == 0)) \ 184 ? ((( r ), (( am ), (( size ), \ 185 (( n ), ( size_t ) 0) \ 186 : `fwre_uocked ( r , size , n , am )))) ) 190 #unde __STDIO_INLINE @/usr/include/bits/stdio2.h 19 #ide _STDIO_H 23  $__rtf_chk (* __ri __s ,  __ag , size_t __ , 24 cڡ * __ri __fm , ... __THROW ; 25  $__vrtf_chk (* __ri __s ,  __ag , size_t __ , 26 cڡ * __ri __fm , 27 _G_va_li __ __THROW ; 29 #ifde __va_g_ck 30 __ftify_funi  31 `__NTH ( $rtf (* __ri __s , cڡ *__ri __fmt , ...)) 33  `__but___rtf_chk ( __s , __USE_FORTIFY_LEVEL - 1, 34 `__bos ( __s ), __fmt , `__va_g_ck ()); 35 } } 36 #i! defed __lulus 37  #rtf ( r , ...) \ 38 `__but___rtf_chk ( r , __USE_FORTIFY_LEVEL - 1, `__bos (str), \ 39 __VA_ARGS__ ) ) 42 __ftify_funi  43 __NTH ( $vrtf (* __ri __s , cڡ *__ri __fmt , 44 _G_va_li __ )) 46  `__but___vrtf_chk ( __s , __USE_FORTIFY_LEVEL - 1, 47 `__bos ( __s ), __fmt , __ ); 48 } } 50 #i defed __USE_ISOC99 || defed __USE_UNIX98 52  $__tf_chk (* __ri __s , size_t __n ,  __ag , 53 size_t __ , cڡ * __ri __fm , 54 ... __THROW ; 55  $__vtf_chk (* __ri __s , size_t __n ,  __ag , 56 size_t __ , cڡ * __ri __fm , 57 _G_va_li __ __THROW ; 59 #ifde __va_g_ck 60 __ftify_funi  61 `__NTH ( $tf (* __ri __s , size_t __n , 62 cڡ * __ri __fmt , ...)) 64  `__but___tf_chk ( __s , __n , __USE_FORTIFY_LEVEL - 1, 65 `__bos ( __s ), __fmt , `__va_g_ck ()); 66 } } 67 #i! defed __lulus 68  #tf ( r , n , ...) \ 69 `__but___tf_chk ( r , n , __USE_FORTIFY_LEVEL - 1, `__bos (str), \ 70 __VA_ARGS__ ) ) 73 __ftify_funi  74 __NTH ( $vtf (* __ri __s , size_t __n , 75 cڡ * __ri __fmt , _G_va_li __ )) 77  `__but___vtf_chk ( __s , __n , __USE_FORTIFY_LEVEL - 1, 78 `__bos ( __s ), __fmt , __ ); 79 } } 83 #i __USE_FORTIFY_LEVEL > 1 85  __rtf_chk ( FILE * __ri __am ,  __ag , 86 cڡ * __ri __fm , ...); 87  __tf_chk ( __ag , cڡ * __ri __fm , ...); 88  __vrtf_chk ( FILE * __ri __am ,  __ag , 89 cڡ * __ri __fm , _G_va_li __ ); 90  __vtf_chk ( __ag , cڡ * __ri __fm , 91 _G_va_li __ ); 93 #ifde __va_g_ck 94 __ftify_funi  95 $rtf ( FILE * __ri __am , cڡ *__ri __fmt , ...) 97  `__rtf_chk ( __am , __USE_FORTIFY_LEVEL - 1, __fmt , 98 `__va_g_ck ()); 99 } } 101 __ftify_funi  102 $tf (cڡ * __ri __fmt , ...) 104  `__tf_chk ( __USE_FORTIFY_LEVEL - 1, __fmt , `__va_g_ck ()); 105 } } 106 #i! defed __lulus 107  #tf (...) \ 108 `__tf_chk ( __USE_FORTIFY_LEVEL - 1, __VA_ARGS__ ) ) 109  #rtf ( am , ...) \ 110 `__rtf_chk ( am , __USE_FORTIFY_LEVEL - 1, __VA_ARGS__ ) ) 113 __ftify_funi  114 $vtf (cڡ * __ri __fmt , _G_va_li __ ) 116 #ifde __USE_EXTERN_INLINES 117  `__vrtf_chk ( dout , __USE_FORTIFY_LEVEL - 1, __fmt , __ ); 119  `__vtf_chk ( __USE_FORTIFY_LEVEL - 1, __fmt , __ ); 121 } } 123 __ftify_funi  124 $vrtf ( FILE * __ri __am , 125 cڡ * __ri __fmt , _G_va_li __ ) 127  `__vrtf_chk ( __am , __USE_FORTIFY_LEVEL - 1, __fmt , __ ); 128 } } 130 #ifde __USE_XOPEN2K8 131  $__dtf_chk ( __fd ,  __ag , cڡ * __ri __fmt , 132 ... `__ibu__ (( `__fm__ ( __tf__ , 3, 4))); 133  $__vdtf_chk ( __fd ,  __ag , 134 cڡ * __ri __fmt , _G_va_li __g ) 135 `__ibu__ (( `__fm__ ( __tf__ , 3, 0))); 137 #ifde __va_g_ck 138 __ftify_funi  139 $dtf ( __fd , cڡ * __ri __fmt , ...) 141  `__dtf_chk ( __fd , __USE_FORTIFY_LEVEL - 1, __fmt , 142 `__va_g_ck ()); 143 } } 144 #i! defed __lulus 145  #dtf ( fd , ...) \ 146 `__dtf_chk ( fd , __USE_FORTIFY_LEVEL - 1, __VA_ARGS__ ) ) 149 __ftify_funi  150 $vdtf ( __fd , cڡ * __ri __fmt , _G_va_li __ ) 152  `__vdtf_chk ( __fd , __USE_FORTIFY_LEVEL - 1, __fmt , __ ); 153 } } 156 #ifde __USE_GNU 158  $__artf_chk (** __ri __r ,  __ag , 159 cڡ * __ri __fmt , ...) 160 __THROW `__ibu__ (( $__fm__ ( __tf__ , 3, 4)) __wur ; 161  $__vartf_chk (** __ri __r ,  __ag , 162 cڡ * __ri __fmt , _G_va_li __g ) 163 __THROW `__ibu__ (( $__fm__ ( __tf__ , 3, 0)) __wur ; 164  $__oback_tf_chk ( oback * __ri __oback , 165  __ag , cڡ * __ri __fm , 167 __THROW `__ibu__ (( `__fm__ ( __tf__ , 3, 4))); 168  $__oback_vtf_chk ( oback * __ri __oback , 169  __ag , 170 cڡ * __ri __fm , 171 _G_va_li __gs ) 172 __THROW `__ibu__ (( `__fm__ ( __tf__ , 3, 0))); 174 #ifde __va_g_ck 175 __ftify_funi  176 `__NTH ( $artf (** __ri __r , cڡ *__ri __fmt , ...)) 178  `__artf_chk ( __r , __USE_FORTIFY_LEVEL - 1, __fmt , 179 `__va_g_ck ()); 180 } } 182 __ftify_funi  183 __NTH ( $__artf (** __ri __r , cڡ *__ri __fmt , 186  `__artf_chk ( __r , __USE_FORTIFY_LEVEL - 1, __fmt , 187 `__va_g_ck ()); 188 } } 190 __ftify_funi  191 __NTH ( $oback_tf ( oback * __ri __oback , 192 cڡ * __ri __fmt , ...)) 194  `__oback_tf_chk ( __oback , __USE_FORTIFY_LEVEL - 1, __fmt , 195 `__va_g_ck ()); 196 } } 197 #i! defed __lulus 198  #artf ( r , ...) \ 199 `__artf_chk ( r , __USE_FORTIFY_LEVEL - 1, __VA_ARGS__ ) ) 200  #__artf ( r , ...) \ 201 `__artf_chk ( r , __USE_FORTIFY_LEVEL - 1, __VA_ARGS__ ) ) 202  #oback_tf ( oback , ...) \ 203 `__oback_tf_chk ( oback , __USE_FORTIFY_LEVEL - 1, __VA_ARGS__ ) ) 206 __ftify_funi  207 __NTH ( $vartf (** __ri __r , cڡ *__ri __fmt , 208 _G_va_li __ )) 210  `__vartf_chk ( __r , __USE_FORTIFY_LEVEL - 1, __fmt , __ ); 211 } } 213 __ftify_funi  214 __NTH ( $oback_vtf ( oback * __ri __oback , 215 cڡ * __ri __fmt , _G_va_li __ )) 217  `__oback_vtf_chk ( __oback , __USE_FORTIFY_LEVEL - 1, __fmt , 218 __ ); 219 } } 225 #i! defed __USE_ISOC11 \ 226 || ( defed g__lulus && __lulu<201103L && !defed __USE_GNU ) 227 * $__gs_chk (* __r , size_t __wur ; 228 * `__REDIRECT ( __gs_wn , (* __r ), gs ) 229 __wur `__wljr ("please use fgets or getline instead, gets can't " 232 __ftify_funi __wur * 233 $gs (* __r ) 235 i( `__bos ( __r !( size_t ) -1) 236  `__gs_chk ( __r , `__bos (__str)); 237  `__gs_wn ( __r ); 238 } } 241 * $__fgs_chk (* __ri __s , size_t __size ,  __n , 242 FILE * __ri __am __wur ; 243 * `__REDIRECT ( __fgs_s , 244 (* __ri __s ,  __n , 245 FILE * __ri __am ), fgs __wur ; 246 * `__REDIRECT ( __fgs_chk_wn , 247 (* __ri __s , size_t __size ,  __n , 248 FILE * __ri __am ), __fgs_chk ) 249 __wur `__wljr ("fgets called with bigger sizehanength " 252 __ftify_funi __wur * 253 $fgs (* __ri __s ,  __n , FILE *__ri __am ) 255 i( `__bos ( __s !( size_t ) -1) 257 i(! `__but_cڡt_p ( __n ) || __n <= 0) 258  `__fgs_chk ( __s , `__bos (__s), __n , __am ); 260 i(( size_t __n > `__bos ( __s )) 261  `__fgs_chk_wn ( __s , `__bos (__s), __n , __am ); 263  `__fgs_s ( __s , __n , __am ); 264 } } 266 size_t $__d_chk (* __ri __r , size_t __ , 267 size_t __size , size_ __n , 268 FILE * __ri __am __wur ; 269 size_t `__REDIRECT ( __d_s , 270 (* __ri __r , size_t __size , 271 size_t __n , FILE * __ri __am ), 272 d __wur ; 273 size_t `__REDIRECT ( __d_chk_wn , 274 (* __ri __r , size_t __ , 275 size_t __size , size_ __n , 276 FILE * __ri __am ), 277 __d_chk ) 278 __wur `__wljr ("fread called with bigger size *membhanength " 281 __ftify_funi __wur size_t 282 $d (* __ri __r , size_t __size , size_ __n , 283 FILE * __ri __am ) 285 i( `__bos0 ( __r !( size_t ) -1) 287 i(! `__but_cڡt_p ( __size ) 288 || ! `__but_cڡt_p ( __n ) 289 || ( __size | __n >((( size_t ) 1) << (8 *  (size_t) / 2))) 290  `__d_chk ( __r , `__bos0 (__r), __size , __n , __am ); 292 i( __size * __n > `__bos0 ( __r )) 293  `__d_chk_wn ( __r , `__bos0 (__r), __size , __n , __am ); 295  `__d_s ( __r , __size , __n , __am ); 296 } } 298 #ifde __USE_GNU 299 * $__fgs_uocked_chk (* __ri __s , size_t __size , 300  __n , FILE * __ri __am __wur ; 301 * `__REDIRECT ( __fgs_uocked_s , 302 (* __ri __s ,  __n , 303 FILE * __ri __am ), fgs_uocked __wur ; 304 * `__REDIRECT ( __fgs_uocked_chk_wn , 305 (* __ri __s , size_t __size ,  __n , 306 FILE * __ri __am ), __fgs_uocked_chk ) 307 __wur `__wljr ("fgets_unlocked called with bigger sizehanength " 310 __ftify_funi __wur * 311 $fgs_uocked (* __ri __s ,  __n , FILE *__ri __am ) 313 i( `__bos ( __s !( size_t ) -1) 315 i(! `__but_cڡt_p ( __n ) || __n <= 0) 316  `__fgs_uocked_chk ( __s , `__bos (__s), __n , __am ); 318 i(( size_t __n > `__bos ( __s )) 319  `__fgs_uocked_chk_wn ( __s , `__bos (__s), __n , __am ); 321  `__fgs_uocked_s ( __s , __n , __am ); 322 } } 325 #ifde __USE_MISC 326 #unde d_uocked 327 size_t $__d_uocked_chk (* __ri __r , size_t __ , 328 size_t __size , size_ __n , 329 FILE * __ri __am __wur ; 330 size_t `__REDIRECT ( __d_uocked_s , 331 (* __ri __r , size_t __size , 332 size_t __n , FILE * __ri __am ), 333 d_uocked __wur ; 334 size_t `__REDIRECT ( __d_uocked_chk_wn , 335 (* __ri __r , size_t __ , 336 size_t __size , size_ __n , 337 FILE * __ri __am ), 338 __d_uocked_chk ) 339 __wur `__wljr ("fread_unlocked called with bigger size *membhan " 342 __ftify_funi __wur size_t 343 $d_uocked (* __ri __r , size_t __size , size_ __n , 344 FILE * __ri __am ) 346 i( `__bos0 ( __r !( size_t ) -1) 348 i(! `__but_cڡt_p ( __size ) 349 || ! `__but_cڡt_p ( __n ) 350 || ( __size | __n >((( size_t ) 1) << (8 *  (size_t) / 2))) 351  `__d_uocked_chk ( __r , `__bos0 (__r), __size , __n , 352 __am ); 354 i( __size * __n > `__bos0 ( __r )) 355  `__d_uocked_chk_wn ( __r , `__bos0 (__r), __size , __n , 356 __am ); 359 #ifde __USE_EXTERN_INLINES 360 i( `__but_cڡt_p ( __size ) 361 && `__but_cڡt_p ( __n ) 362 && ( __size | __n < ((( size_t ) 1) << (8 *  (size_t) / 2)) 363 && __size * __n <= 8) 365 size_t __t = __size * __n ; 366 * __ = (* __r ; 367 i( __t == 0) 370 ; __t > 0; --__cnt) 372  __c = `_IO_gc_uocked ( __am ); 373 i( __c = EOF ) 375 * __ ++ = __c ; 377  ( __ - (* __r / __size ; 380  `__d_uocked_s ( __r , __size , __n , __am ); 381 } } @/usr/include/bits/stdio_lim.h 18 #i! defed _STDIO_H && !defed __ed_FOPEN_MAX && !defed __ed_IOV_MAX 22 #ifde _STDIO_H 23  #L_tmam 20 ) 24  #TMP_MAX 238328 ) 25  #FILENAME_MAX 4096 ) 27 #ifde __USE_POSIX 28  #L_mid 9 ) 29 #i! defed __USE_XOPEN2K || defed __USE_GNU 30  #L_curid 9 ) 35 #i defed __ed_FOPEN_MAX || defed _STDIO_H 36 #unde FOPEN_MAX 37  #FOPEN_MAX 16 ) 40 #i defed __ed_IOV_MAX && !defed IOV_MAX 41  #IOV_MAX 1024 ) @/usr/include/bits/stdlib-bsearch.h 19 __ex_le * 20 $bch (cڡ * __key , cڡ * __ba , size_t __nmemb , size_ __size , 21 __comr__t __comr ) 23 size_t __l , __u , __idx ; 24 cڡ * __p ; 25  __comris ; 27 __l = 0; 28 __u = __nmemb ; 29  __l < __u ) 31 __idx = ( __l + __u ) / 2; 32 __p = (*(((cڡ * __ba + ( __idx * __size )); 33 __comris = (* __comr ( __key , __p ); 34 i( __comris < 0) 35 __u = __idx ; 36 i( __comris > 0) 37 __l = __idx + 1; 39  (* __p ; 42  NULL ; 43 } } @/usr/include/bits/stdlib-float.h 19 #ide _STDLIB_H 23 #ifde __USE_EXTERN_INLINES 24 __BEGIN_NAMESPACE_STD 25 __ex_le  26 __NTH ( $of (cڡ * __Ō )) 28  `od ( __Ō , (** NULL ); 29 } } 30 g__END_NAMESPACE_STD @/usr/include/bits/stdlib-ldbl.h 19 #ide _STDLIB_H 23 #ifdef __USE_ISOC99 24 __BEGIN_NAMESPACE_C99 25 $__LDBL_REDIR1_DECL ( d , od ) 26 __END_NAMESPACE_C99 29 #ifde __USE_GNU 30 $__LDBL_REDIR1_DECL ( d_l , od_l ) 33 #ifde __USE_MISC 34 $__LDBL_REDIR1_DECL ( qecvt , ecvt ) 35 $__LDBL_REDIR1_DECL ( qfcvt , fcvt ) 36 $__LDBL_REDIR1_DECL ( qgcvt , gcvt ) 37 $__LDBL_REDIR1_DECL ( qecvt_r , ecvt_r ) 38 $__LDBL_REDIR1_DECL ( qfcvt_r , fcvt_r ) @/usr/include/bits/stdlib.h 19 #ide _STDLIB_H 23 * $__th_chk (cڡ * __ri __me , 24 * __ri __sved , 25 size_t __svedn __THROW __wur ; 26 * `__REDIRECT_NTH ( __th_s , 27 (cڡ * __ri __me , 28 * __ri __sved ), th __wur ; 29 * `__REDIRECT_NTH ( __th_chk_wn , 30 (cڡ * __ri __me , 31 * __ri __sved , 32 size_t __svedn ), __th_chk __wur 33 `__wljr ("secondrgument ofealpath must beither NULL ort " 36 __ftify_funi __wur * 37 `__NTH ( $th (cڡ * __ri __me , *__ri __sved )) 39 i( `__bos ( __sved !( size_t ) -1) 41 #i defed _LIBC_LIMITS_H_ && defed PATH_MAX 42 i( `__bos ( __sved < PATH_MAX ) 43  `__th_chk_wn ( __me , __sved , `__bos (__resolved)); 45  `__th_chk ( __me , __sved , `__bos (__resolved)); 48  `__th_s ( __me , __sved ); 49 } } 52  $__ame_r_chk ( __fd , * __buf , size_t __bu , 53 size_t __ėl __THROW `__nnu ((2)); 54  `__REDIRECT_NTH ( __ame_r_s , ( __fd , * __buf , 55 size_t __bu ), ame_r ) 56 `__nnu ((2)); 57  `__REDIRECT_NTH ( __ame_r_chk_wn , 58 ( __fd , * __buf , size_t __bu , 59 size_t __ėl ), __ame_r_chk ) 60 `__nnu ((2) `__wljr ("ptsname_r called with buflen biggerhan " 63 __ftify_funi  64 `__NTH ( $ame_r ( __fd , * __buf , size_t __bu )) 66 i( `__bos ( __buf !( size_t ) -1) 68 i(! `__but_cڡt_p ( __bu )) 69  `__ame_r_chk ( __fd , __buf , __bu , `__bos (__buf)); 70 i( __bu > `__bos ( __buf )) 71  `__ame_r_chk_wn ( __fd , __buf , __bu , `__bos (__buf)); 73  `__ame_r_s ( __fd , __buf , __bu ); 74 } } 77  $__womb_chk (* __s , wch_t __wch , size_t __bu ) 78 __THROW __wur ; 79  `__REDIRECT_NTH ( __womb_s , (* __s , wch_t __wch ), 80 womb __wur ; 82 __ftify_funi __wur  83 `__NTH ( $womb (* __s , wch_t __wch )) 88  #__STDLIB_MB_LEN_MAX 16 ) 89 #i defed MB_LEN_MAX && MB_LEN_MAX ! __STDLIB_MB_LEN_MAX 92 i( `__bos ( __s !( size_t -1 && __STDLIB_MB_LEN_MAX > __bos (__s)) 93  `__womb_chk ( __s , __wch , `__bos (__s)); 94  `__womb_s ( __s , __wch ); 95 } } 98 size_t $__mbowcs_chk ( wch_t * __ri __d , 99 cڡ * __ri __c , 100 size_t __n , size_ __dn __THROW ; 101 size_t `__REDIRECT_NTH ( __mbowcs_s , 102 ( wch_t * __ri __d , 103 cڡ * __ri __c , 104 size_t __n ), mbowcs ); 105 size_t `__REDIRECT_NTH ( __mbowcs_chk_wn , 106 ( wch_t * __ri __d , 107 cڡ * __ri __c , 108 size_t __n , size_ __dn ), __mbowcs_chk ) 109 `__wljr ("mbstowcs called with dst buffer smallerhanen " 112 __ftify_funi size_t 113 `__NTH ( $mbowcs ( wch_t * __ri __d , cڡ *__ri __c , 114 size_t __n )) 116 i( `__bos ( __d !( size_t ) -1) 118 i(! `__but_cڡt_p ( __n )) 119  `__mbowcs_chk ( __d , __c , __n , 120 `__bos ( __d /  ( wch_t )); 122 i( __n > `__bos ( __d /  ( wch_t )) 123  `__mbowcs_chk_wn ( __d , __c , __n , 124 `__bos ( __d /  ( wch_t )); 126  `__mbowcs_s ( __d , __c , __n ); 127 } } 130 size_t $__wcombs_chk (* __ri __d , 131 cڡ wch_t * __ri __c , 132 size_t __n , size_ __dn __THROW ; 133 size_t `__REDIRECT_NTH ( __wcombs_s , 134 (* __ri __d , 135 cڡ wch_t * __ri __c , 136 size_t __n ), wcombs ); 137 size_t `__REDIRECT_NTH ( __wcombs_chk_wn , 138 (* __ri __d , 139 cڡ wch_t * __ri __c , 140 size_t __n , size_ __dn ), __wcombs_chk ) 141 `__wljr ("wcstombs called with dst buffer smallerhanen"); 143 __ftify_funi size_t 144 `__NTH ( $wcombs (* __ri __d , cڡ wch_t *__ri __c , 145 size_t __n )) 147 i( `__bos ( __d !( size_t ) -1) 149 i(! `__but_cڡt_p ( __n )) 150  `__wcombs_chk ( __d , __c , __n , `__bos (__dst)); 151 i( __n > `__bos ( __d )) 152  `__wcombs_chk_wn ( __d , __c , __n , `__bos (__dst)); 154  `__wcombs_s ( __d , __c , __n ); 155 } } @/usr/include/bits/string.h 19 #ide _STRING_H 24  #_STRING_INLINE_uligd 1 ) 27  #_HAVE_STRING_ARCH_mempy 1 ) 31 #i! defed __x86_64__ && (defed __i486__ || defed __ium__ \ 32 || defed g__iumo__ || defed g__ium4__ \ 33 || defed g__noca__ || defed g__om__ \ 34 || defed g__ce2__ || defed g__cei7__ \ 35 || defed g__ndybridge__ || defed g__haswl__ \ 36 || defed g__b__ || defed g__svmt__ \ 37 || defed g__k6__ || defed g__geode__ \ 38 || defed g__k8__ || defed g__hl__ \ 39 || defed g__amdm10__ || defed g__bdv1__ \ 40 || defed g__bdv2__ || defed g__bdv3__ \ 41 || defed g__bdv4__ || defed g__btv1__ \ 42 || defed g__btv2__ ) 46 #i! defed __NO_STRING_INLINES && defed __USE_STRING_INLINES \ 47 && defed g__GNUC__ && __GNUC__ >= 2 49 #ide __STRING_INLINE 50 #ide __ex_le 51  #__STRING_INLINE le ) 53  #__STRING_INLINE __ex_le ) 58  #__STRING_SMALL_GET16 ( c , idx ) \ 59 ((((cڡ *( c ))[ idx + 1] << 8) \ 60 | ((cڡ *( c ))[ idx ]) ) 61  #__STRING_SMALL_GET32 ( c , idx ) \ 62 (((((cڡ *( c ))[ idx + 3] << 8 \ 63 | ((cڡ *( c ))[ idx + 2]) << 8 \ 64 | ((cڡ *( c ))[ idx + 1]) << 8 \ 65 | ((cڡ *( c ))[ idx ]) ) 69  #_HAVE_STRING_ARCH_memy 1 ) 70  #memy ( de , c , n ) \ 71 ( `__exnsi__ ( `__but_cڡt_p ( n ) \ 72 ? `__memy_c (( de ), ( c ), ( n )) \ 73 : `__memy_g (( de ), ( c ), ( n )))) ) 74  #__memy_c ( de , c , n ) \ 75 (( n ) == 0 \ 76 ? ( de ) \ 77 : ((( n ) % 4 == 0) \ 78 ? `__memy_by4 ( de , c , n ) \ 79 : ((( n ) % 2 == 0) \ 80 ? `__memy_by2 ( de , c , n ) \ 81 : `__memy_g ( de , c , n )))) ) 83 __STRING_INLINE * __memy_by4 (* __de , cڡ * __c , 84 size_t __n ); 86 __STRING_INLINE * 87 $__memy_by4 (* __de , cڡ * __c , size_t __n ) 89  __d0 , __d1 ; 90 * __tmp = __de ; 91 __asm__ __vީe__ 99 : "=&r" ( __d0 ), "=&r" ( __tmp ), "=&r" ( __c ), "=&r" ( __d1 ) 100 : "1" ( __tmp ), "2" ( __c ), "3" ( __n / 4) 102  __de ; 103 } } 105 __STRING_INLINE * __memy_by2 (* __de , cڡ * __c , 106 size_t __n ); 108 __STRING_INLINE * 109 $__memy_by2 (* __de , cڡ * __c , size_t __n ) 111  __d0 , __d1 ; 112 * __tmp = __de ; 113 __asm__ __vީe__ 126 : "=&q" ( __d0 ), "=&r" ( __tmp ), "=&r" ( __c ), "=&r" ( __d1 ) 127 : "1" ( __tmp ), "2" ( __c ), "3" ( __n / 2) 129  __de ; 130 } } 132 __STRING_INLINE * __memy_g (* __de , cڡ * __c , size_t __n ); 134 __STRING_INLINE * 135 $__memy_g (* __de , cڡ * __c , size_t __n ) 137  __d0 , __d1 , __d2 ; 138 * __tmp = __de ; 139 __asm__ __vީe__ 150 : "=&c" ( __d0 ), "=&D" ( __d1 ), "=&S" ( __d2 ), 151 "=m" ( *(ru { __exnsi__  __x [ __n ]; } *) __de ) 152 : "0" ( __n ), "1" ( __tmp ), "2" ( __c ), 153 "m" ( *(ru { __exnsi__  __x [ __n ]; } *) __c ) 155  __de ; 156 } } 158  #_HAVE_STRING_ARCH_memmove 1 ) 159 #ide _FORCE_INLINES 162  #memmove ( de , c , n `__memmove_g (de, src,) ) 164 __STRING_INLINE * $__memmove_g (*, cڡ *, size_t ) 165 `__asm__ ("memmove"); 167 __STRING_INLINE * 168 $__memmove_g (* __de , cڡ * __c , size_t __n ) 170  __d0 , __d1 , __d2 ; 171 * __tmp = __de ; 172 i( __de < __c ) 173 __asm__ __vީe__ 176 : "=&c" ( __d0 ), "=&S" ( __d1 ), "=&D" ( __d2 ), 177 "=m" ( *(ru { __exnsi__  __x [ __n ]; } *) __de ) 178 : "0" ( __n ), "1" ( __c ), "2" ( __tmp ), 179 "m" ( *(ru { __exnsi__  __x [ __n ]; } *) __c )); 181 __asm__ __vީe__ 187 : "=&c" ( __d0 ), "=&S" ( __d1 ), "=&D" ( __d2 ), 188 "=m" ( *(ru { __exnsi__  __x [ __n ]; } *) __de ) 189 : "0" ( __n ), "1" (__+ (cڡ * __c ), 190 "2" ( __n + (* __tmp ), 191 "m" ( *(ru { __exnsi__  __x [ __n ]; } *) __c )); 192  __de ; 193 } } 197  #_HAVE_STRING_ARCH_memcmp 1 ) 198 #ide _FORCE_INLINES 199 #ide __PIC__ 201 __STRING_INLINE  202 $memcmp (cڡ * __s1 , cڡ * __s2 , size_t __n ) 204  __d0 , __d1 , __d2 ; 205  __s ; 206 __asm__ __vީe__ 214 : "=&a" ( __s ), "=&S" ( __d0 ), "=&D" ( __d1 ), "=&c" ( __d2 ) 215 : "0" (0), "1" ( __s1 ), "2" ( __s2 ), "3" ( __n ), 216 "m" ( *(ru { __exnsi__  __x [ __n ]; } *) __s1 ), 217 "m" ( *(ru { __exnsi__  __x [ __n ]; } *) __s2 ) 219  __s ; 220 } } 225  #_HAVE_STRING_ARCH_memt 1 ) 226  #_USE_STRING_ARCH_memt 1 ) 227  #memt ( s , c , n ) \ 228 ( `__exnsi__ ( `__but_cڡt_p ( n ) && (n) <= 16 \ 229 ? (( n ) == 1 \ 230 ? `__memt_c1 (( s ), ( c )) \ 231 : `__memt_gc (( s ), ( c ), ( n ))) \ 232 : ( `__but_cڡt_p ( c ) \ 233 ? ( `__but_cڡt_p ( n ) \ 234 ? `__memt_c (( s ), ( c ), ( n )) \ 235 : `memt (( s ), ( c ), ( n ))) \ 236 : ( `__but_cڡt_p ( n ) \ 237 ? `__memt_g (( s ), ( c ), ( n )) \ 238 : `memt (( s ), ( c ), ( n )))))) ) 240  #__memt_c1 ( s , c ({ * __s = (s); \ 241 *((* __s (( c ); \ 242 __s ; }) ) 244  #__memt_gc ( s , c , n ) \ 245 ({ * __s = ( s ); \ 247  __ui ; \ 248  __usi ; \ 249  __uc ; \ 250 } * __u = __s ; \ 251  __c = ((((( c ))) * 0x01010101; \ 257 i(( n ) == 3 || (n) >= 5) \ 258 __asm__ `__vީe__ ("" : "" ( __c ) : "0" (__c)); \ 261  n ) \ 264 __u -> __ui = __c ; \ 265 __u = `__exnsi__ ((*) __u + 4); \ 267 __u -> __ui = __c ; \ 268 __u = `__exnsi__ ((*) __u + 4); \ 270 __u -> __ui = __c ; \ 271 __u = `__exnsi__ ((*) __u + 4); \ 273 __u -> __usi = ( __c ; \ 274 __u = `__exnsi__ ((*) __u + 2); \ 275 __u -> __uc = ( __c ; \ 279 __u -> __ui = __c ; \ 280 __u = `__exnsi__ ((*) __u + 4); \ 282 __u -> __ui = __c ; \ 283 __u = `__exnsi__ ((*) __u + 4); \ 285 __u -> __ui = __c ; \ 286 __u = `__exnsi__ ((*) __u + 4); \ 288 __u -> __usi = ( __c ; \ 292 __u -> __ui = __c ; \ 293 __u = `__exnsi__ ((*) __u + 4); \ 295 __u -> __ui = __c ; \ 296 __u = `__exnsi__ ((*) __u + 4); \ 298 __u -> __ui = __c ; \ 299 __u = `__exnsi__ ((*) __u + 4); \ 301 __u -> __uc = ( __c ; \ 305 __u -> __ui = __c ; \ 306 __u = `__exnsi__ ((*) __u + 4); \ 308 __u -> __ui = __c ; \ 309 __u = `__exnsi__ ((*) __u + 4); \ 311 __u -> __ui = __c ; \ 312 __u = `__exnsi__ ((*) __u + 4); \ 314 __u -> __ui = __c ; \ 319 __s ; }) ) 321  #__memt_c ( s , c , n ) \ 322 ((( n ) % 4 == 0) \ 323 ? `__memt_c_by4 ( s , ((((( c ))) * 0x01010101,\ 324 n ) \ 325 : ((( n ) % 2 == 0) \ 326 ? `__memt_c_by2 ( s , \ 327 ((((( c ))) * 0x01010101,\ 328 n ) \ 329 : `memt ( s , c , n ))) ) 331 __STRING_INLINE * __memt_c_by4 (* __s ,  __c , 332 size_t __n ); 334 __STRING_INLINE * 335 $__memt_c_by4 (* __s ,  __c , size_t __n ) 337 * __tmp = __s ; 338  __d0 ; 339 #ifde __i686__ 340 __asm__ __vީe__ 343 : "=&a" ( __c ), "=&D" ( __tmp ), "=&c" ( __d0 ), 344 "=m" ( *(ru { __exnsi__  __x [ __n ]; } *) __s ) 345 : "0" (( __c ), "1" ( __tmp ), "2" ( __n / 4) 348 __asm__ __vީe__ 354 : "=&r" ( __c ), "=&r" ( __tmp ), "=&r" ( __d0 ), 355 "=m" ( *(ru { __exnsi__  __x [ __n ]; } *) __s ) 356 : "0" (( __c ), "1" ( __tmp ), "2" ( __n / 4) 359  __s ; 360 } } 362 __STRING_INLINE * __memt_c_by2 (* __s ,  __c , 363 size_t __n ); 365 __STRING_INLINE * 366 $__memt_c_by2 (* __s ,  __c , size_t __n ) 368  __d0 , __d1 ; 369 * __tmp = __s ; 370 #ifde __i686__ 371 __asm__ __vީe__ 375 : "=&a" ( __d0 ), "=&D" ( __tmp ), "=&c" ( __d1 ), 376 "=m" ( *(ru { __exnsi__  __x [ __n ]; } *) __s ) 377 : "0" (( __c ), "1" ( __tmp ), "2" ( __n / 4) 380 __asm__ __vީe__ 386 : "=&q" ( __d0 ), "=&r" ( __tmp ), "=&r" ( __d1 ), 387 "=m" ( *(ru { __exnsi__  __x [ __n ]; } *) __s ) 388 : "0" (( __c ), "1" ( __tmp ), "2" ( __n / 4) 391  __s ; 392 } } 394  #__memt_g ( s , c , n ) \ 395 ((( n ) % 4 == 0) \ 396 ? `__memt_g_by4 ( s , c , n ) \ 397 : ((( n ) % 2 == 0) \ 398 ? `__memt_g_by2 ( s , c , n ) \ 399 : `memt ( s , c , n ))) ) 401 __STRING_INLINE * __memt_g_by4 (* __s ,  __c , size_t __n ); 403 __STRING_INLINE * 404 $__memt_g_by4 (* __s ,  __c , size_t __n ) 406 * __tmp = __s ; 407  __d0 ; 408 __asm__ __vީe__ 418 : "=&q" ( __c ), "=&r" ( __tmp ), "=&r" ( __d0 ), 419 "=m" ( *(ru { __exnsi__  __x [ __n ]; } *) __s ) 420 : "0" (( __c ), "1" ( __tmp ), "2" ( __n / 4) 422  __s ; 423 } } 425 __STRING_INLINE * __memt_g_by2 (* __s ,  __c , size_t __n ); 427 __STRING_INLINE * 428 $__memt_g_by2 (* __s ,  __c , size_t __n ) 430  __d0 , __d1 ; 431 * __tmp = __s ; 432 __asm__ __vީe__ 443 : "=&q" ( __d0 ), "=&r" ( __tmp ), "=&r" ( __d1 ), 444 "=m" ( *(ru { __exnsi__  __x [ __n ]; } *) __s ) 445 : "0" (( __c ), "1" ( __tmp ), "2" ( __n / 4) 447  __s ; 448 } } 452  #_HAVE_STRING_ARCH_memchr 1 ) 453 #ide _FORCE_INLINES 454 __STRING_INLINE * 455 $memchr (cڡ * __s ,  __c , size_t __n ) 457  __d0 ; 458 #ifde __i686__ 459  __d1 ; 461 * __s ; 462 i( __n == 0) 463  NULL ; 464 #ifde __i686__ 465 __asm__ __vީe__ 469 : "=D" ( __s ), "=&c" ( __d0 ), "=&r" ( __d1 ) 470 : "a" ( __c ), "0" ( __s ), "1" ( __n ), "2" (1), 471 "m" ( *(ru { __exnsi__  __x [ __n ]; } *) __s ) 474 __asm__ __vީe__ 480 : "=D" ( __s ), "=&c" ( __d0 ) 481 : "a" ( __c ), "0" ( __s ), "1" ( __n ), 482 "m" ( *(ru { __exnsi__  __x [ __n ]; } *) __s ) 485  __s - 1; 486 } } 489  #_HAVE_STRING_ARCH_memrchr 1 ) 490 #ide _FORCE_INLINES 491 __STRING_INLINE * __memrchr (cڡ * __s ,  __c , size_t __n ); 493 __STRING_INLINE * 494 $__memrchr (cڡ * __s ,  __c , size_t __n ) 496  __d0 ; 497 #ifde __i686__ 498  __d1 ; 500 * __s ; 501 i( __n == 0) 502  NULL ; 503 #ifde __i686__ 504 __asm__ __vީe__ 510 : "=D" ( __s ), "=&c" ( __d0 ), "=&r" ( __d1 ) 511 : "a" ( __c ), "0" ( __s + __n - 1), "1" (__n), "2" (-1), 512 "m" ( *(ru { __exnsi__  __x [ __n ]; } *) __s ) 515 __asm__ __vީe__ 522 : "=D" ( __s ), "=&c" ( __d0 ) 523 : "a" ( __c ), "0" ( __s + __n - 1), "1" (__n), 524 "m" ( *(ru { __exnsi__  __x [ __n ]; } *) __s ) 527  __s ; 528 } } 529 #ifde __USE_GNU 530  #memrchr ( s , c , n `__memrchr ((s), (c), (n)) ) 535  #_HAVE_STRING_ARCH_wmemchr 1 ) 536 __STRING_INLINE * __wmemchr (cڡ * __s ,  __c ); 538 #ide _FORCE_INLINES 539 __STRING_INLINE * 540 $__wmemchr (cڡ * __s ,  __c ) 542  __d0 ; 543 * __s ; 544 __asm__ __vީe__ 547 : "=D" ( __s ), "=&c" ( __d0 ) 548 : "a" ( __c ), "0" ( __s ), "1" (0xffffffff), 549 "m" ( *(ru {  __x [0xfffffff]; } *) __s ) 551  __s - 1; 552 } } 553 #ifde __USE_GNU 554 __STRING_INLINE * 555 $wmemchr (cڡ * __s ,  __c ) 557  `__wmemchr ( __s , __c ); 558 } } 564  #_HAVE_STRING_ARCH_ 1 ) 565  # ( r ) \ 566 ( `__exnsi__ ( `__but_cڡt_p ( r ) \ 567 ? `__but_ ( r ) \ 568 : `___g ( r ))) ) 569 __STRING_INLINE size_t ___g (cڡ * __r ); 571 __STRING_INLINE size_t 572 $___g (cڡ * __r ) 574  __dummy ; 575 cڡ * __tmp = __r ; 576 __asm__ __vީe__ 582 : "" ( __tmp ), "=&q" ( __dummy ) 583 : "0" ( __r ), 584 "m" ( *(ru {  __x [0xfffffff]; } *) __r ) 586  __tmp - __r - 1; 587 } } 591  #_HAVE_STRING_ARCH_ry 1 ) 592  #ry ( de , c ) \ 593 ( `__exnsi__ ( `__but_cڡt_p ( c ) \ 594 ? ( (( c )[0]=1 && ` (src) + 1 <= 8 \ 595 ? `__ry_a_sml (( de ), ( c ), ` (src) + 1) \ 596 : (* `memy ((*( de ), \ 597 (cڡ *( c ), \ 598 ` ( c ) + 1)) \ 599 : `__ry_g (( de ), ( c )))) ) 601  #__ry_a_sml ( de , c , ) \ 602 ( `__exnsi__ ({ * __de = ( de ); \ 604  __ui ; \ 605  __usi ; \ 606  __uc ; \ 607  __c ; \ 608 } * __u = (* __de ; \ 609  ) \ 612 __u -> __uc = '\0'; \ 615 __u -> __usi = `__STRING_SMALL_GET16 ( c , 0); \ 618 __u -> __usi = `__STRING_SMALL_GET16 ( c , 0); \ 619 __u = `__exnsi__ ((*) __u + 2); \ 620 __u -> __uc = '\0'; \ 623 __u -> __ui = `__STRING_SMALL_GET32 ( c , 0); \ 626 __u -> __ui = `__STRING_SMALL_GET32 ( c , 0); \ 627 __u = `__exnsi__ ((*) __u + 4); \ 628 __u -> __uc = '\0'; \ 631 __u -> __ui = `__STRING_SMALL_GET32 ( c , 0); \ 632 __u = `__exnsi__ ((*) __u + 4); \ 633 __u -> __usi = `__STRING_SMALL_GET16 ( c , 4); \ 636 __u -> __ui = `__STRING_SMALL_GET32 ( c , 0); \ 637 __u = `__exnsi__ ((*) __u + 4); \ 638 __u -> __usi = `__STRING_SMALL_GET16 ( c , 4); \ 639 __u = `__exnsi__ ((*) __u + 2); \ 640 __u -> __uc = '\0'; \ 643 __u -> __ui = `__STRING_SMALL_GET32 ( c , 0); \ 644 __u = `__exnsi__ ((*) __u + 4); \ 645 __u -> __ui = `__STRING_SMALL_GET32 ( c , 4); \ 648 (* __de ; })) ) 650 __STRING_INLINE * __ry_g (* __de , cڡ * __c ); 652 __STRING_INLINE * 653 $__ry_g (* __de , cڡ * __c ) 655 * __tmp = __de ; 656  __dummy ; 657 __asm__ __vީe__ 666 : "=&r" ( __c ), "=&r" ( __tmp ), "=&q" ( __dummy ), 667 "=m" ( *(ru {  __x [0xfffffff]; } *) __de ) 668 : "0" ( __c ), "1" ( __tmp ), 669 "m" ( *(ru {  __x [0xfffffff]; } *) __c ) 671  __de ; 672 } } 675 #ifde __USE_GNU 676  #_HAVE_STRING_ARCH_py 1 ) 678  #__py ( de , c ) \ 679 ( `__exnsi__ ( `__but_cڡt_p ( c ) \ 680 ? ( ` ( c ) + 1 <= 8 \ 681 ? `__py_a_sml (( de ), ( c ), ` (src) + 1) \ 682 : `__py_c (( de ), ( c ), ` (src) + 1)) \ 683 : `__py_g (( de ), ( c )))) ) 684  #__py_c ( de , c , ) \ 685 (( ) % 4 == 0 \ 686 ? `__mempy_by4 ( de , c , ) - 1 \ 687 : (( ) % 2 == 0 \ 688 ? `__mempy_by2 ( de , c , ) - 1 \ 689 : `__mempy_byn ( de , c , - 1)) ) 692  #py ( de , c `__py ((de), (c)) ) 694  #__py_a_sml ( de , c , ) \ 695 ( `__exnsi__ ({ union { \ 696  __ui ; \ 697  __usi ; \ 698  __uc ; \ 699  __c ; \ 700 } * __u = (*( de ); \ 701  ) \ 704 __u -> __uc = '\0'; \ 707 __u -> __usi = `__STRING_SMALL_GET16 ( c , 0); \ 708 __u = `__exnsi__ ((*) __u + 1); \ 711 __u -> __usi = `__STRING_SMALL_GET16 ( c , 0); \ 712 __u = `__exnsi__ ((*) __u + 2); \ 713 __u -> __uc = '\0'; \ 716 __u -> __ui = `__STRING_SMALL_GET32 ( c , 0); \ 717 __u = `__exnsi__ ((*) __u + 3); \ 720 __u -> __ui = `__STRING_SMALL_GET32 ( c , 0); \ 721 __u = `__exnsi__ ((*) __u + 4); \ 722 __u -> __uc = '\0'; \ 725 __u -> __ui = `__STRING_SMALL_GET32 ( c , 0); \ 726 __u = `__exnsi__ ((*) __u + 4); \ 727 __u -> __usi = `__STRING_SMALL_GET16 ( c , 4); \ 728 __u = `__exnsi__ ((*) __u + 1); \ 731 __u -> __ui = `__STRING_SMALL_GET32 ( c , 0); \ 732 __u = `__exnsi__ ((*) __u + 4); \ 733 __u -> __usi = `__STRING_SMALL_GET16 ( c , 4); \ 734 __u = `__exnsi__ ((*) __u + 2); \ 735 __u -> __uc = '\0'; \ 738 __u -> __ui = `__STRING_SMALL_GET32 ( c , 0); \ 739 __u = `__exnsi__ ((*) __u + 4); \ 740 __u -> __ui = `__STRING_SMALL_GET32 ( c , 4); \ 741 __u = `__exnsi__ ((*) __u + 3); \ 744 (* __u ; })) ) 746 __STRING_INLINE * __mempy_by4 (* __de , cڡ * __c , 747 size_t __ ); 749 __STRING_INLINE * 750 $__mempy_by4 (* __de , cڡ * __c , size_t __ ) 752 * __tmp = __de ; 753  __d0 , __d1 ; 754 __asm__ __vީe__ 762 : "=&r" ( __d0 ), "" ( __tmp ), "=&r" ( __c ), "=&r" ( __d1 ) 763 : "1" ( __tmp ), "2" ( __c ), "3" ( __ / 4) 765  __tmp ; 766 } } 768 __STRING_INLINE * __mempy_by2 (* __de , cڡ * __c , 769 size_t __ ); 771 __STRING_INLINE * 772 $__mempy_by2 (* __de , cڡ * __c , size_t __ ) 774 * __tmp = __de ; 775  __d0 , __d1 ; 776 __asm__ __vީe__ 789 : "=&q" ( __d0 ), "" ( __tmp ), "=&r" ( __c ), "=&r" ( __d1 ), 790 "=m" ( *(ru { __exnsi__  __x [ __ ]; } *) __de ) 791 : "1" ( __tmp ), "2" ( __c ), "3" ( __ / 2), 792 "m" ( *(ru { __exnsi__  __x [ __ ]; } *) __c ) 794  __tmp + 2; 795 } } 797 __STRING_INLINE * __mempy_byn (* __de , cڡ * __c , 798 size_t __ ); 800 __STRING_INLINE * 801 $__mempy_byn (* __de , cڡ * __c , size_t __ ) 803  __d0 , __d1 ; 804 * __tmp = __de ; 805 __asm__ __vީe__ 816 : "=D" ( __tmp ), "=&c" ( __d0 ), "=&S" ( __d1 ), 817 "=m" ( *(ru { __exnsi__  __x [ __ ]; } *) __de ) 818 : "0" ( __tmp ), "1" ( __ ), "2" ( __c ), 819 "m" ( *(ru { __exnsi__  __x [ __ ]; } *) __c ) 821  __tmp ; 822 } } 824 __STRING_INLINE * __py_g (* __de , cڡ * __c ); 826 __STRING_INLINE * 827 $__py_g (* __de , cڡ * __c ) 829 * __tmp = __de ; 830  __dummy ; 831 __asm__ __vީe__ 840 : "=&r" ( __c ), "" ( __tmp ), "=&q" ( __dummy ), 841 "=m" ( *(ru {  __x [0xfffffff]; } *) __de ) 842 : "0" ( __c ), "1" ( __tmp ), 843 "m" ( *(ru {  __x [0xfffffff]; } *) __c ) 845  __tmp - 1; 846 } } 851  #_HAVE_STRING_ARCH_y 1 ) 852  #y ( de , c , n ) \ 853 ( `__exnsi__ ( `__but_cڡt_p ( c ) \ 854 ? (( ` ( c + 1 >(( size_t ( n )) \ 855 ? (* `memy ((*( de ), \ 856 (cڡ *( c ), n ) \ 857 : `__y_cg (( de ), ( c ), ` (c+ 1, n ))) \ 858 : `__y_gg (( de ), ( c ), n ))) ) 859  #__y_cg ( de , c , , n ) \ 860 ((( ) % 4 == 0) \ 861 ? `__y_by4 ( de , c , , n ) \ 862 : ((( ) % 2 == 0) \ 863 ? `__y_by2 ( de , c , , n ) \ 864 : `__y_byn ( de , c , , n ))) ) 866 __STRING_INLINE * __y_by4 (* __de , cڡ  __c [], 867 size_t __ , size_ __n ); 869 __STRING_INLINE * 870 $__y_by4 (* __de , cڡ  __c [], size_t __ , size_ __n ) 872 * __tmp = __de ; 873  __dummy1 , __dummy2 ; 874 __asm__ __vީe__ 882 : "=&r" ( __dummy1 ), "" ( __tmp ), "=&r" ( __c ), "=&r" ( __dummy2 ), 883 "=m" ( *(ru { __exnsi__  __x [ __ ]; } *) __de ) 884 : "1" ( __tmp ), "2" ( __c ), "3" ( __ / 4), 885 "m" ( *(ru { __exnsi__  __x [ __ ]; } *) __c ) 887 ( `memt ( __tmp , '\0', __n - __ ); 888  __de ; 889 } } 891 __STRING_INLINE * __y_by2 (* __de , cڡ  __c [], 892 size_t __ , size_ __n ); 894 __STRING_INLINE * 895 $__y_by2 (* __de , cڡ  __c [], size_t __ , size_ __n ) 897 * __tmp = __de ; 898  __dummy1 , __dummy2 ; 899 __asm__ __vީe__ 912 : "=&q" ( __dummy1 ), "" ( __tmp ), "=&r" ( __c ), "=&r" ( __dummy2 ), 913 "=m" ( *(ru { __exnsi__  __x [ __ ]; } *) __de ) 914 : "1" ( __tmp ), "2" ( __c ), "3" ( __ / 2), 915 "m" ( *(ru { __exnsi__  __x [ __ ]; } *) __c ) 917 ( `memt ( __tmp + 2, '\0', __n - __ ); 918  __de ; 919 } } 921 __STRING_INLINE * __y_byn (* __de , cڡ  __c [], 922 size_t __ , size_ __n ); 924 __STRING_INLINE * 925 $__y_byn (* __de , cڡ  __c [], size_t __ , size_ __n ) 927  __d0 , __d1 ; 928 * __tmp = __de ; 929 __asm__ __vީe__ 940 : "=D" ( __tmp ), "=&c" ( __d0 ), "=&S" ( __d1 ), 941 "=m" ( *(ru { __exnsi__  __x [ __ ]; } *) __de ) 942 : "1" ( __ ), "0" ( __tmp ),"2" ( __c ), 943 "m" ( *(ru { __exnsi__  __x [ __ ]; } *) __c ) 945 ( `memt ( __tmp , '\0', __n - __ ); 946  __de ; 947 } } 949 __STRING_INLINE * __y_gg (* __de , cڡ * __c , 950 size_t __n ); 952 __STRING_INLINE * 953 $__y_gg (* __de , cڡ * __c , size_t __n ) 955 * __tmp = __de ; 956  __dummy ; 957 i( __n > 0) 958 __asm__ __vީe__ 974 : "=&r" ( __c ), "=&r" ( __tmp ), "=&q" ( __dummy ), "=&r" ( __n ) 975 : "0" ( __c ), "1" ( __tmp ), "3" ( __n ) 978  __de ; 979 } } 983  #_HAVE_STRING_ARCH_rt 1 ) 984  #rt ( de , c ) \ 985 ( `__exnsi__ ( `__but_cڡt_p ( c ) \ 986 ? `__rt_c (( de ), ( c ), ` (src) + 1) \ 987 : `__rt_g (( de ), ( c )))) ) 989 __STRING_INLINE * __rt_c (* __de , cڡ  __c [], 990 size_t __ ); 992 __STRING_INLINE * 993 $__rt_c (* __de , cڡ  __c [], size_t __ ) 995 #ifde __i686__ 996  __d0 ; 997 * __tmp ; 998 __asm__ __vީe__ 1000 : "=D" ( __tmp ), "=&c" ( __d0 ), 1001 "=m" ( *(ru {  __x [0xfffffff]; } *) __de ) 1002 : "0" ( __de ), "1" (0xffffffff), "a" (0), 1003 "m" ( *(ru { __exnsi__  __x [ __ ]; } *) __c ) 1005 -- __tmp ; 1007 * __tmp = __de ; 1008 __asm__ __vީe__ 1014 : "" ( __tmp ), 1015 "=m" ( *(ru {  __x [0xfffffff]; } *) __de ) 1016 : "0" ( __tmp ), 1017 "m" ( *(ru { __exnsi__  __x [ __ ]; } *) __c ) 1020 ( `memy ( __tmp , __c , __ ); 1021  __de ; 1022 } } 1024 __STRING_INLINE * __rt_g (* __de , cڡ * __c ); 1026 __STRING_INLINE * 1027 $__rt_g (* __de , cڡ * __c ) 1029 * __tmp = __de ; 1030  __dummy ; 1031 __asm__ __vީe__ 1044 : "=&q" ( __dummy ), "=&r" ( __tmp ), "=&r" ( __c ), 1045 "=m" ( *(ru {  __x [0xfffffff]; } *) __de ) 1046 : "1" ( __tmp ), "2" ( __c ), 1047 "m" ( *(ru {  __x [0xfffffff]; } *) __c ) 1049  __de ; 1050 } } 1054  #_HAVE_STRING_ARCH_t 1 ) 1055  #t ( de , c , n ) \ 1056 ( `__exnsi__ ({ * __de = ( de ); \ 1057 `__but_cڡt_p ( c && __but_cڡt_( n ) \ 1058 ? ( ` ( c < (( size_t ( n )) \ 1059 ? `rt ( __de , ( c )) \ 1060 : (*(*) `__mempy ( `rchr ( __de , '\0'), \ 1061 (cڡ *( c ), \ 1062 ( n )0, __de )) \ 1063 : `__t_g ( __de , ( c ), ( n )); })) ) 1065 __STRING_INLINE * __t_g (* __de , cڡ  __c [], 1066 size_t __n ); 1068 __STRING_INLINE * 1069 $__t_g (* __de , cڡ  __c [], size_t __n ) 1071 * __tmp = __de ; 1072  __dummy ; 1073 #ifde __i686__ 1074 __asm__ __vީe__ 1088 : "=&a" ( __dummy ), "=&D" ( __tmp ), "=&S" ( __c ), "=&c" ( __n ) 1089 : "g" ( __n ), "0" (0), "1" ( __tmp ), "2" ( __c ), "3" (0xffffffff) 1092 -- __tmp ; 1093 __asm__ __vީe__ 1110 : "=&q" ( __dummy ), "=&r" ( __tmp ), "=&r" ( __c ), "=&r" ( __n ) 1111 : "1" ( __tmp ), "2" ( __c ), "3" ( __n ) 1114  __de ; 1115 } } 1119  #_HAVE_STRING_ARCH_rcmp 1 ) 1120  #rcmp ( s1 , s2 ) \ 1121 ( `__exnsi__ ( `__but_cڡt_p ( s1 && __but_cڡt_( s2 ) \ 1122 && ( (( s1 )[0]!1 || ` (s1) >= 4) \ 1123 && ( (( s2 )[0]!1 || ` (s2) >= 4) \ 1124 ? `memcmp ((cڡ *( s1 ), (cڡ *( s2 ), \ 1125 ( ` ( s1 < s( s2 ) \ 1126 ? ` ( s1 : s( s2 )) + 1) \ 1127 : ( `__but_cڡt_p ( s1 ) &&  ((s1)[0]) == 1 \ 1128 &&  (( s2 )[0]=1 && ` ( s1 ) < 4 \ 1129 ? ( `__but_cڡt_p ( s2 ) &&  ((s2)[0]) == 1 \ 1130 ? `__rcmp_cc ((cڡ *( s1 ), \ 1131 (cڡ *( s2 ), \ 1132 ` ( s1 )) \ 1133 : `__rcmp_cg ((cڡ *( s1 ), \ 1134 (cڡ *( s2 ), \ 1135 ` ( s1 ))) \ 1136 : ( `__but_cڡt_p ( s2 &&  (( s1 )[0]) == 1 \ 1137 &&  (( s2 )[0]=1 && ` (s2) < 4 \ 1138 ? ( `__but_cڡt_p ( s1 ) \ 1139 ? `__rcmp_cc ((cڡ *( s1 ), \ 1140 (cڡ *( s2 ), \ 1141 ` ( s2 )) \ 1142 : `__rcmp_gc ((cڡ *( s1 ), \ 1143 (cڡ *( s2 ), \ 1144 ` ( s2 ))) \ 1145 : `__rcmp_gg (( s1 ), ( s2 )))))) ) 1147  #__rcmp_cc ( s1 , s2 , l ) \ 1148 ( `__exnsi__ ({  __su = ( s1 )[0] - ( s2 )[0]; \ 1149 i( l > 0 && __su == 0) \ 1151 __su = ( s1 )[1] - ( s2 )[1]; \ 1152 i( l > 1 && __su == 0) \ 1154 __su = ( s1 )[2] - ( s2 )[2]; \ 1155 i( l > 2 && __su == 0) \ 1156 __su = ( s1 )[3] - ( s2 )[3]; \ 1159 __su ; })) ) 1161  #__rcmp_cg ( s1 , s2 , l1 ) \ 1162 ( `__exnsi__ ({ cڡ * __s2 = ( s2 ); \ 1163  __su = ( s1 )[0] - __s2 [0]; \ 1164 i( l1 > 0 && __su == 0) \ 1166 __su = ( s1 )[1] - __s2 [1]; \ 1167 i( l1 > 1 && __su == 0) \ 1169 __su = ( s1 )[2] - __s2 [2]; \ 1170 i( l1 > 2 && __su == 0) \ 1171 __su = ( s1 )[3] - __s2 [3]; \ 1174 __su ; })) ) 1176  #__rcmp_gc ( s1 , s2 , l2 ) \ 1177 ( `__exnsi__ ({ cڡ * __s1 = ( s1 ); \ 1178  __su = __s1 [0] - ( s2 )[0]; \ 1179 i( l2 > 0 && __su == 0) \ 1181 __su = __s1 [1] - ( s2 )[1]; \ 1182 i( l2 > 1 && __su == 0) \ 1184 __su = __s1 [2] - ( s2 )[2]; \ 1185 i( l2 > 2 && __su == 0) \ 1186 __su = __s1 [3] - ( s2 )[3]; \ 1189 __su ; })) ) 1191 __STRING_INLINE  __rcmp_gg (cڡ * __s1 , cڡ * __s2 ); 1193 __STRING_INLINE  1194 $__rcmp_gg (cڡ * __s1 , cڡ * __s2 ) 1196  __s ; 1197 __asm__ __vީe__ 1213 : "=q" ( __s ), "=&r" ( __s1 ), "=&r" ( __s2 ) 1214 : "1" ( __s1 ), "2" ( __s2 ), 1215 "m" ( *(ru {  __x [0xfffffff]; } *) __s1 ), 1216 "m" ( *(ru {  __x [0xfffffff]; } *) __s2 ) 1218  __s ; 1219 } } 1223  #_HAVE_STRING_ARCH_cmp 1 ) 1224  #cmp ( s1 , s2 , n ) \ 1225 ( `__exnsi__ ( `__but_cڡt_p ( s1 && ` (s1< (( size_t ( n )) \ 1226 ? `rcmp (( s1 ), ( s2 )) \ 1227 : ( `__but_cڡt_p ( s2 && ` (s2< (( size_t ( n ))\ 1228 ? `rcmp (( s1 ), ( s2 )) \ 1229 : `__cmp_g (( s1 ), ( s2 ), ( n ))))) ) 1231 __STRING_INLINE  __cmp_g (cڡ * __s1 , cڡ * __s2 , 1232 size_t __n ); 1234 __STRING_INLINE  1235 $__cmp_g (cڡ * __s1 , cڡ * __s2 , size_t __n ) 1237  __s ; 1238 __asm__ __vީe__ 1257 : "=q" ( __s ), "=&r" ( __s1 ), "=&r" ( __s2 ), "=&r" ( __n ) 1258 : "1" ( __s1 ), "2" ( __s2 ), "3" ( __n ), 1259 "m" ( *(ru { __exnsi__  __x [ __n ]; } *) __s1 ), 1260 "m" ( *(ru { __exnsi__  __x [ __n ]; } *) __s2 ) 1262  __s ; 1263 } } 1267  #_HAVE_STRING_ARCH_rchr 1 ) 1268  #_USE_STRING_ARCH_rchr 1 ) 1269  #rchr ( s , c ) \ 1270 ( `__exnsi__ ( `__but_cڡt_p ( c ) \ 1271 ? (( c ) == '\0' \ 1272 ? (* `__wmemchr (( s ), ( c )) \ 1273 : `__rchr_c (( s ), (( c ) & 0xff) << 8)) \ 1274 : `__rchr_g (( s ), ( c )))) ) 1276 __STRING_INLINE * __rchr_c (cڡ * __s ,  __c ); 1278 __STRING_INLINE * 1279 $__rchr_c (cڡ * __s ,  __c ) 1281  __d0 ; 1282 * __s ; 1283 __asm__ __vީe__ 1293 : "" ( __s ), "=&a" ( __d0 ) 1294 : "0" ( __s ), "1" ( __c ), 1295 "m" ( *(ru {  __x [0xfffffff]; } *) __s ) 1297  __s ; 1298 } } 1300 __STRING_INLINE * __rchr_g (cڡ * __s ,  __c ); 1302 __STRING_INLINE * 1303 $__rchr_g (cڡ * __s ,  __c ) 1305  __d0 ; 1306 * __s ; 1307 __asm__ __vީe__ 1318 : "" ( __s ), "=&a" ( __d0 ) 1319 : "0" ( __s ), "1" ( __c ), 1320 "m" ( *(ru {  __x [0xfffffff]; } *) __s ) 1322  __s ; 1323 } } 1327  #_HAVE_STRING_ARCH_rchul 1 ) 1328  #__rchul ( s , c ) \ 1329 ( `__exnsi__ ( `__but_cڡt_p ( c ) \ 1330 ? (( c ) == '\0' \ 1331 ? (* `__wmemchr (( s ), c ) \ 1332 : `__rchul_c (( s ), (( c ) & 0xff) << 8)) \ 1333 : `__rchul_g (( s ), c ))) ) 1335 __STRING_INLINE * __rchul_c (cڡ * __s ,  __c ); 1337 __STRING_INLINE * 1338 $__rchul_c (cڡ * __s ,  __c ) 1340  __d0 ; 1341 * __s ; 1342 __asm__ __vީe__ 1352 : "" ( __s ), "=&a" ( __d0 ) 1353 : "0" ( __s ), "1" ( __c ), 1354 "m" ( *(ru {  __x [0xfffffff]; } *) __s ) 1356  __s ; 1357 } } 1359 __STRING_INLINE * __rchul_g (cڡ * __s ,  __c ); 1361 __STRING_INLINE * 1362 $__rchul_g (cڡ * __s ,  __c ) 1364  __d0 ; 1365 * __s ; 1366 __asm__ __vީe__ 1377 : "" ( __s ), "=&a" ( __d0 ) 1378 : "0" ( __s ), "1" ( __c ), 1379 "m" ( *(ru {  __x [0xfffffff]; } *) __s ) 1381  __s ; 1382 } } 1383 #ifde __USE_GNU 1384  #rchul ( s , c `__rchul ((s), (c)) ) 1388 #i defed __USE_MISC || defed __USE_XOPEN_EXTENDED 1390  #_HAVE_STRING_ARCH_dex 1 ) 1391  #dex ( s , c ) \ 1392 ( `__exnsi__ ( `__but_cڡt_p ( c ) \ 1393 ? `__rchr_c (( s ), (( c ) & 0xff) << 8) \ 1394 : `__rchr_g (( s ), ( c )))) ) 1399  #_HAVE_STRING_ARCH_chr 1 ) 1400  #chr ( s , c ) \ 1401 ( `__exnsi__ ( `__but_cڡt_p ( c ) \ 1402 ? `__chr_c (( s ), (( c ) & 0xff) << 8) \ 1403 : `__chr_g (( s ), ( c )))) ) 1405 #ifde __i686__ 1406 __STRING_INLINE * __chr_c (cڡ * __s ,  __c ); 1408 __STRING_INLINE * 1409 $__chr_c (cڡ * __s ,  __c ) 1411  __d0 , __d1 ; 1412 * __s ; 1413 __asm__ __vީe__ 1421 : "=d" ( __s ), "=&S" ( __d0 ), "=&a" ( __d1 ) 1422 : "0" (1), "1" ( __s ), "2" ( __c ), 1423 "m" ( *(ru {  __x [0xfffffff]; } *) __s ) 1425  __s - 1; 1426 } } 1428 __STRING_INLINE * __chr_g (cڡ * __s ,  __c ); 1430 __STRING_INLINE * 1431 $__chr_g (cڡ * __s ,  __c ) 1433  __d0 , __d1 ; 1434 * __s ; 1435 __asm__ __vީe__ 1444 : "=d" ( __s ), "=&S" ( __d0 ), "=&a" ( __d1 ) 1445 : "0" (1), "1" ( __s ), "2" ( __c ), 1446 "m" ( *(ru {  __x [0xfffffff]; } *) __s ) 1448  __s - 1; 1449 } } 1451 __STRING_INLINE * __chr_c (cڡ * __s ,  __c ); 1453 __STRING_INLINE * 1454 $__chr_c (cڡ * __s ,  __c ) 1456  __d0 , __d1 ; 1457 * __s ; 1458 __asm__ __vީe__ 1468 : "=d" ( __s ), "=&S" ( __d0 ), "=&a" ( __d1 ) 1469 : "0" (0), "1" ( __s ), "2" ( __c ), 1470 "m" ( *(ru {  __x [0xfffffff]; } *) __s ) 1472  __s ; 1473 } } 1475 __STRING_INLINE * __chr_g (cڡ * __s ,  __c ); 1477 __STRING_INLINE * 1478 $__chr_g (cڡ * __s ,  __c ) 1480  __d0 , __d1 ; 1481 * __s ; 1482 __asm__ __vީe__ 1493 : "" ( __s ), "=&S" ( __d0 ), "=&a" ( __d1 ) 1494 : "0" (0), "1" ( __s ), "2" ( __c ), 1495 "m" ( *(ru {  __x [0xfffffff]; } *) __s ) 1497  __s ; 1498 } } 1502 #i defed __USE_MISC || defed __USE_XOPEN_EXTENDED 1504  #_HAVE_STRING_ARCH_rdex 1 ) 1505  #rdex ( s , c ) \ 1506 ( `__exnsi__ ( `__but_cڡt_p ( c ) \ 1507 ? `__chr_c (( s ), (( c ) & 0xff) << 8) \ 1508 : `__chr_g (( s ), ( c )))) ) 1514  #_HAVE_STRING_ARCH_rcn 1 ) 1515  #rcn ( s , je ) \ 1516 ( `__exnsi__ ( `__but_cڡt_p ( je ) &&  ((reject)[0]) == 1 \ 1517 ? (( je )[0] == '\0' \ 1518 ? ` ( s ) \ 1519 : (( je )[1] == '\0' \ 1520 ? `__rcn_c1 (( s ), ((( je )[0] << 8) & 0xff00)) \ 1521 : `__rcn_cg (( s ), ( je ), ` (reject)))) \ 1522 : `__rcn_g (( s ), ( je )))) ) 1524 __STRING_INLINE size_t __rcn_c1 (cڡ * __s ,  __je ); 1526 #ide _FORCE_INLINES 1527 __STRING_INLINE size_t 1528 $__rcn_c1 (cڡ * __s ,  __je ) 1530  __d0 ; 1531 * __s ; 1532 __asm__ __vީe__ 1541 : "" ( __s ), "=&a" ( __d0 ) 1542 : "0" ( __s ), "1" ( __je ), 1543 "m" ( *(ru {  __x [0xfffffff]; } *) __s ) 1545  ( __s - 1- __s ; 1546 } } 1549 __STRING_INLINE size_t __rcn_cg (cڡ * __s , cڡ  __je [], 1550 size_t __je_n ); 1552 __STRING_INLINE size_t 1553 $__rcn_cg (cڡ * __s , cڡ  __je [], size_t __je_n ) 1555  __d0 , __d1 , __d2 ; 1556 cڡ * __s ; 1557 __asm__ __vީe__ 1568 : "=S" ( __s ), "=&a" ( __d0 ), "=&c" ( __d1 ), "=&D" ( __d2 ) 1569 : "0" ( __s ), "d" ( __je ), "g" ( __je_n ) 1571  ( __s - 1- __s ; 1572 } } 1574 __STRING_INLINE size_t __rcn_g (cڡ * __s , cڡ * __je ); 1575 #ifde __PIC__ 1577 __STRING_INLINE size_t 1578 $__rcn_g (cڡ * __s , cڡ * __je ) 1580  __d0 , __d1 , __d2 ; 1581 cڡ * __s ; 1582 __asm__ __vީe__ 1599 : "=S" ( __s ), "=&a" ( __d0 ), "=&c" ( __d1 ), "=&D" ( __d2 ) 1600 : "r" ( __je ), "0" ( __s ), "1" (0), "2" (0xffffffff) 1602  ( __s - 1- __s ; 1603 } } 1605 __STRING_INLINE size_t 1606 $__rcn_g (cڡ * __s , cڡ * __je ) 1608  __d0 , __d1 , __d2 , __d3 ; 1609 cڡ * __s ; 1610 __asm__ __vީe__ 1624 : "=S" ( __s ), "=&a" ( __d0 ), "=&c" ( __d1 ), "=&D" ( __d2 ), "=&d" ( __d3 ) 1625 : "0" ( __s ), "1" (0), "2" (0xffffffff), "3" ( __je ), "b" (__reject) 1628  ( __s - 1- __s ; 1629 } } 1635  #_HAVE_STRING_ARCH_rn 1 ) 1636  #rn ( s , ac ) \ 1637 ( `__exnsi__ ( `__but_cڡt_p ( ac ) &&  ((accept)[0]) == 1 \ 1638 ? (( ac )[0] == '\0' \ 1639 ? ((( s ), 0) \ 1640 : (( ac )[1] == '\0' \ 1641 ? `__rn_c1 (( s ), ((( ac )[0] << 8 ) & 0xff00)) \ 1642 : `__rn_cg (( s ), ( ac ), ` (accept)))) \ 1643 : `__rn_g (( s ), ( ac )))) ) 1645 #ide _FORCE_INLINES 1646 __STRING_INLINE size_t __rn_c1 (cڡ * __s ,  __ac ); 1648 __STRING_INLINE size_t 1649 $__rn_c1 (cڡ * __s ,  __ac ) 1651  __d0 ; 1652 * __s ; 1654 __asm__ __vީe__ 1660 : "" ( __s ), "=&q" ( __d0 ) 1661 : "0" ( __s ), "1" ( __ac ), 1662 "m" ( *(ru {  __x [0xfffffff]; } *) __s ) 1664  ( __s - 1- __s ; 1665 } } 1668 __STRING_INLINE size_t __rn_cg (cڡ * __s , cڡ  __ac [], 1669 size_t __ac_n ); 1671 __STRING_INLINE size_t 1672 $__rn_cg (cڡ * __s , cڡ  __ac [], size_t __ac_n ) 1674  __d0 , __d1 , __d2 ; 1675 cڡ * __s ; 1676 __asm__ __vީe__ 1687 : "=S" ( __s ), "=&a" ( __d0 ), "=&c" ( __d1 ), "=&D" ( __d2 ) 1688 : "0" ( __s ), "g" ( __ac ), "g" ( __ac_n ), 1691 "m" ( *(ru {  __x [0xfffffff]; } *) __s ), 1692 "m" ( *(ru { __exnsi__  __x [ __ac_n ]; } *) __ac ) 1694  ( __s - 1- __s ; 1695 } } 1697 __STRING_INLINE size_t __rn_g (cڡ * __s , cڡ * __ac ); 1698 #ifde __PIC__ 1700 __STRING_INLINE size_t 1701 $__rn_g (cڡ * __s , cڡ * __ac ) 1703  __d0 , __d1 , __d2 ; 1704 cڡ * __s ; 1705 __asm__ __vީe__ 1721 : "=S" ( __s ), "=&a" ( __d0 ), "=&c" ( __d1 ), "=&D" ( __d2 ) 1722 : "d" ( __ac ), "0" ( __s ), "1" (0), "2" (0xffffffff), "3" (__accept) 1724  ( __s - 1- __s ; 1725 } } 1727 __STRING_INLINE size_t 1728 $__rn_g (cڡ * __s , cڡ * __ac ) 1730  __d0 , __d1 , __d2 , __d3 ; 1731 cڡ * __s ; 1732 __asm__ __vީe__ 1746 : "=S" ( __s ), "=&a" ( __d0 ), "=&c" ( __d1 ), "=&D" ( __d2 ), "=&d" ( __d3 ) 1747 : "0" ( __s ), "1" (0), "2" (0xffffffff), "3" ( __ac ), "b" (__accept) 1749  ( __s - 1- __s ; 1750 } } 1755  #_HAVE_STRING_ARCH_brk 1 ) 1756  #brk ( s , ac ) \ 1757 ( `__exnsi__ ( `__but_cڡt_p ( ac ) &&  ((accept)[0]) == 1 \ 1758 ? (( ac )[0] == '\0' \ 1759 ? ((( s ), (*) 0) \ 1760 : (( ac )[1] == '\0' \ 1761 ? `rchr (( s ), ( ac )[0]) \ 1762 : `__brk_cg (( s ), ( ac ), ` (accept)))) \ 1763 : `__brk_g (( s ), ( ac )))) ) 1765 __STRING_INLINE * __brk_cg (cڡ * __s , cڡ  __ac [], 1766 size_t __ac_n ); 1768 __STRING_INLINE * 1769 $__brk_cg (cڡ * __s , cڡ  __ac [], size_t __ac_n ) 1771  __d0 , __d1 , __d2 ; 1772 * __s ; 1773 __asm__ __vީe__ 1788 : "=S" ( __s ), "=&a" ( __d0 ), "=&c" ( __d1 ), "=&D" ( __d2 ) 1789 : "0" ( __s ), "d" ( __ac ), "g" ( __ac_n ) 1791  __s ; 1792 } } 1794 __STRING_INLINE * __brk_g (cڡ * __s , cڡ * __ac ); 1795 #ifde __PIC__ 1797 __STRING_INLINE * 1798 $__brk_g (cڡ * __s , cڡ * __ac ) 1800  __d0 , __d1 , __d2 ; 1801 * __s ; 1802 __asm__ __vީe__ 1823 : "=S" ( __s ), "=&a" ( __d0 ), "=&c" ( __d1 ), "=&D" ( __d2 ) 1824 : "d" ( __ac ), "0" ( __s ), "1" (0), "2" (0xffffffff) 1826  __s ; 1827 } } 1829 __STRING_INLINE * 1830 $__brk_g (cڡ * __s , cڡ * __ac ) 1832  __d0 , __d1 , __d2 , __d3 ; 1833 * __s ; 1834 __asm__ __vީe__ 1853 : "=S" ( __s ), "=&a" ( __d0 ), "=&c" ( __d1 ), "=&d" ( __d2 ), "=&D" ( __d3 ) 1854 : "0" ( __s ), "1" (0), "2" (0xffffffff), "b" ( __ac ) 1856  __s ; 1857 } } 1862  #_HAVE_STRING_ARCH_rr 1 ) 1863  #rr ( hayack , ed ) \ 1864 ( `__exnsi__ ( `__but_cڡt_p ( ed ) &&  ((needle)[0]) == 1 \ 1865 ? (( ed )[0] == '\0' \ 1866 ? ( hayack ) \ 1867 : (( ed )[1] == '\0' \ 1868 ? `rchr (( hayack ), ( ed )[0]) \ 1869 : `__rr_cg (( hayack ), ( ed ), \ 1870 ` ( ed )))) \ 1871 : `__rr_g (( hayack ), ( ed )))) ) 1875 __STRING_INLINE * __rr_cg (cڡ * __hayack , 1876 cڡ  __ed [], 1877 size_t __ed_n ); 1879 __STRING_INLINE * 1880 $__rr_cg (cڡ * __hayack , cڡ  __ed [], 1881 size_t __ed_n ) 1883  __d0 , __d1 , __d2 ; 1884 * __s ; 1885 __asm__ __vީe__ 1898 : "=&a" ( __s ), "=&S" ( __d0 ), "=&D" ( __d1 ), "=&c" ( __d2 ) 1899 : "g" ( __ed_n ), "1" ( __hayack ), "d" ( __ed ) 1901  __s ; 1902 } } 1904 __STRING_INLINE * __rr_g (cڡ * __hayack , 1905 cڡ * __ed ); 1906 #ifde __PIC__ 1908 __STRING_INLINE * 1909 $__rr_g (cڡ * __hayack , cڡ * __ed ) 1911  __d0 , __d1 , __d2 ; 1912 * __s ; 1913 __asm__ __vީe__ 1932 : "=&a" ( __s ), "=&c" ( __d0 ), "=&S" ( __d1 ), "=&D" ( __d2 ) 1933 : "0" (0), "1" (0xffffffff), "2" ( __hayack ), "3" ( __ed ), 1934 "d" ( __ed ) 1936  __s ; 1937 } } 1939 __STRING_INLINE * 1940 $__rr_g (cڡ * __hayack , cڡ * __ed ) 1942  __d0 , __d1 , __d2 , __d3 ; 1943 * __s ; 1944 __asm__ __vީe__ 1961 : "=&a" ( __s ), "=&c" ( __d0 ), "=&S" ( __d1 ), "=&D" ( __d2 ), "=&d" ( __d3 ) 1962 : "0" (0), "1" (0xffffffff), "2" ( __hayack ), "3" ( __ed ), 1963 "b" ( __ed ) 1965  __s ; 1966 } } 1972 #i defed __USE_MISC || defed __USE_XOPEN_EXTENDED 1973 #ifde __i686__ 1974  #_HAVE_STRING_ARCH_ffs 1 ) 1975  #ffs ( wd ( `__but_cڡt_p (word) \ 1976 ? `__but_ffs ( wd ) \ 1977 : ({  __t , __tmp ; \ 1978 __asm__ __vީe__ \ 1981 : "=&r" ( __t ), "" ( __tmp ) \ 1982 : "rm" ( wd ), "1" (-1)); \ 1983 __t + 1; })) ) 1985 #ide ff 1986  #ff ( wd `ffs (wd) ) 1991 #ide _FORCE_INLINES 1992 #unde __STRING_INLINE @/usr/include/bits/string2.h 20 #ide _STRING_H 24 #ide __NO_STRING_INLINES 41 #ide __STRING_INLINE 42 #ifde __lulus 43  #__STRING_INLINE le ) 45  #__STRING_INLINE __ex_le ) 49 #i _STRING_INLINE_uligd 51  ~ 52  ~ 54 #i __BYTE_ORDER = __LITTLE_ENDIAN 55  #__STRING2_SMALL_GET16 ( c , idx ) \ 56 (((cڡ *(cڡ *( c ))[ idx + 1] << 8 \ 57 | ((cڡ *(cڡ *( c ))[ idx ]) ) 58  #__STRING2_SMALL_GET32 ( c , idx ) \ 59 (((((cڡ *(cڡ *( c ))[ idx + 3] << 8 \ 60 | ((cڡ *(cڡ *( c ))[ idx + 2]) << 8 \ 61 | ((cڡ *(cڡ *( c ))[ idx + 1]) << 8 \ 62 | ((cڡ *(cڡ *( c ))[ idx ]) ) 64  #__STRING2_SMALL_GET16 ( c , idx ) \ 65 (((cڡ *(cڡ *( c ))[ idx ] << 8 \ 66 | ((cڡ *(cڡ *( c ))[ idx + 1]) ) 67  #__STRING2_SMALL_GET32 ( c , idx ) \ 68 (((((cڡ *(cڡ *( c ))[ idx ] << 8 \ 69 | ((cڡ *(cڡ *( c ))[ idx + 1]) << 8 \ 70 | ((cڡ *(cڡ *( c ))[ idx + 2]) << 8 \ 71 | ((cڡ *(cڡ *( c ))[ idx + 3]) ) 76  #__STRING2_COPY_TYPE ( N ) \ 77 ru {  __r [ N ]; } \ 78 t__ibu__ (( t__cked__ ) t__STRING2_COPY_ARR ## tN ) 79 t__STRING2_COPY_TYPE (2); 80 __STRING2_COPY_TYPE (3); 81 __STRING2_COPY_TYPE (4); 82 __STRING2_COPY_TYPE (5); 83 __STRING2_COPY_TYPE (6); 84 __STRING2_COPY_TYPE (7); 85 __STRING2_COPY_TYPE (8); 86 #unde __STRING2_COPY_TYPE 92  #__rg2_1br_p ( __x ) \ 93 (( size_t )(cڡ *)(( __x + 1- (size_t)(cڡ *)(__x=1) ) 96 #i! defed _HAVE_STRING_ARCH_memt 97 #i! __GNUC_PREREQ (3, 0) 98 #i _STRING_INLINE_uligd 99  #memt ( s , c , n ) \ 100 ( `__exnsi__ ( `__but_cڡt_p ( n ) && (n) <= 16 \ 101 ? (( n ) == 1 \ 102 ? `__memt_1 ( s , c ) \ 103 : `__memt_gc ( s , c , n )) \ 104 : ( `__but_cڡt_p ( c ) && (c) == '\0' \ 105 ? ({ * __s = ( s ); `__bzo (__s, n ); __s; }) \ 106 : `memt ( s , c , n )))) ) 108  #__memt_1 ( s , c ({ * __s = (s); \ 109 *(( __ut8_t * __s (__ut8_t c ; __s; }) ) 111  #__memt_gc ( s , c , n ) \ 112 ({ * __s = ( s ); \ 114  __ui ; \ 115  __usi ; \ 116  __uc ; \ 117 } * __u = __s ; \ 118 __ut8_t __c = (__ut8_t( c ); \ 121 (( n )) \ 124 __u -> __ui = __c * 0x01010101; \ 125 __u = `__exnsi__ ((*) __u + 4); \ 127 __u -> __ui = __c * 0x01010101; \ 128 __u = `__exnsi__ ((*) __u + 4); \ 130 __u -> __ui = __c * 0x01010101; \ 131 __u = `__exnsi__ ((*) __u + 4); \ 133 __u -> __usi = ( __c * 0x0101; \ 134 __u = `__exnsi__ ((*) __u + 2); \ 135 __u -> __uc = ( __c ; \ 139 __u -> __ui = __c * 0x01010101; \ 140 __u = `__exnsi__ ((*) __u + 4); \ 142 __u -> __ui = __c * 0x01010101; \ 143 __u = `__exnsi__ ((*) __u + 4); \ 145 __u -> __ui = __c * 0x01010101; \ 146 __u = `__exnsi__ ((*) __u + 4); \ 148 __u -> __usi = ( __c * 0x0101; \ 152 __u -> __ui = __c * 0x01010101; \ 153 __u = `__exnsi__ ((*) __u + 4); \ 155 __u -> __ui = __c * 0x01010101; \ 156 __u = `__exnsi__ ((*) __u + 4); \ 158 __u -> __ui = __c * 0x01010101; \ 159 __u = `__exnsi__ ((*) __u + 4); \ 161 __u -> __uc = ( __c ; \ 165 __u -> __ui = __c * 0x01010101; \ 166 __u = `__exnsi__ ((*) __u + 4); \ 168 __u -> __ui = __c * 0x01010101; \ 169 __u = `__exnsi__ ((*) __u + 4); \ 171 __u -> __ui = __c * 0x01010101; \ 172 __u = `__exnsi__ ((*) __u + 4); \ 174 __u -> __ui = __c * 0x01010101; \ 179 __s ; }) ) 181  #memt ( s , c , n ) \ 182 ( `__exnsi__ ( `__but_cڡt_p ( c ) && (c) == '\0' \ 183 ? ({ * __s = ( s ); `__bzo (__s, n ); __s; }) \ 184 : `memt ( s , c , n ))) ) 193 #i __GNUC_PREREQ (2, 91) 194  #__bzo ( s , n `__but_memt (s, '\0',) ) 202 #ifde __USE_GNU 203 #i! defed _HAVE_STRING_ARCH_mempy || defed _FORCE_INLINES 204 #ide _HAVE_STRING_ARCH_mempy 205 #i __GNUC_PREREQ (3, 4) 206  #__mempy ( de , c , n `__but_mempy (de, src,) ) 207 #i __GNUC_PREREQ (3, 0) 208  #__mempy ( de , c , n ) \ 209 ( `__exnsi__ ( `__but_cڡt_p ( c && __but_cڡt_( n ) \ 210 && `__rg2_1br_p ( c && n <= 8 \ 211 ? `__but_memy ( de , c , n ) + (n) \ 212 : `__mempy ( de , c , n ))) ) 214  #__mempy ( de , c , n ) \ 215 ( `__exnsi__ ( `__but_cڡt_p ( c && __but_cڡt_( n ) \ 216 && `__rg2_1br_p ( c && n <= 8 \ 217 ? `__mempy_sml ( de , `__mempy_gs ( c ), n ) \ 218 : `__mempy ( de , c , n ))) ) 222  #mempy ( de , c , n `__mempy (de, src,) ) 225 #i! __GNUC_PREREQ (3, 0|| defed _FORCE_INLINES 226 #i _STRING_INLINE_uligd 227 #ide _FORCE_INLINES 228  #__mempy_gs ( c ) \ 229 ((cڡ *( c ))[0], ((const *) (src))[2], \ 230 ((cڡ *( c ))[4], ((const *) (src))[6], \ 231 __exnsi__ `__STRING2_SMALL_GET16 ( c , 0), \ 232 __exnsi__ `__STRING2_SMALL_GET16 ( c , 4), \ 233 __exnsi__ `__STRING2_SMALL_GET32 ( c , 0), \ 234 __exnsi__ `__STRING2_SMALL_GET32 ( c , 4) ) 236 __STRING_INLINE * __mempy_sml (*, , , , , 237 __ut16_t , __ut16_t, __ut32_t , 238 __ut32_t , size_t ); 239 __STRING_INLINE * 240 $__mempy_sml (* __de1 , 241  __c0_1 ,  __c2_1 ,  __c4_1 ,  __c6_1 , 242 __ut16_t __c0_2 , __ut16_ __c4_2 , 243 __ut32_t __c0_4 , __ut32_ __c4_4 , 244 size_t __ ) 247 __ut32_t __ui ; 248 __ut16_t __usi ; 249  __uc ; 250  __c ; 251 } * __u = __de1 ; 252 ( __ ) 255 __u -> __c = __c0_1 ; 256 __u = `__exnsi__ ((*) __u + 1); 259 __u -> __usi = __c0_2 ; 260 __u = `__exnsi__ ((*) __u + 2); 263 __u -> __usi = __c0_2 ; 264 __u = `__exnsi__ ((*) __u + 2); 265 __u -> __c = __c2_1 ; 266 __u = `__exnsi__ ((*) __u + 1); 269 __u -> __ui = __c0_4 ; 270 __u = `__exnsi__ ((*) __u + 4); 273 __u -> __ui = __c0_4 ; 274 __u = `__exnsi__ ((*) __u + 4); 275 __u -> __c = __c4_1 ; 276 __u = `__exnsi__ ((*) __u + 1); 279 __u -> __ui = __c0_4 ; 280 __u = `__exnsi__ ((*) __u + 4); 281 __u -> __usi = __c4_2 ; 282 __u = `__exnsi__ ((*) __u + 2); 285 __u -> __ui = __c0_4 ; 286 __u = `__exnsi__ ((*) __u + 4); 287 __u -> __usi = __c4_2 ; 288 __u = `__exnsi__ ((*) __u + 2); 289 __u -> __c = __c6_1 ; 290 __u = `__exnsi__ ((*) __u + 1); 293 __u -> __ui = __c0_4 ; 294 __u = `__exnsi__ ((*) __u + 4); 295 __u -> __ui = __c4_4 ; 296 __u = `__exnsi__ ((*) __u + 4); 299  (* __u ; 300 } } 302 #ide _FORCE_INLINES 303  #__mempy_gs ( c ) \ 304 ((cڡ *( c ))[0], \ 305 `__exnsi__ (( __STRING2_COPY_ARR2 ) \ 306 { { ((cڡ *( c ))[0], ((const *) (src))[1] } }), \ 307 `__exnsi__ (( __STRING2_COPY_ARR3 ) \ 308 { { ((cڡ *( c ))[0], ((const *) (src))[1], \ 309 ((cڡ *( c ))[2] } }), \ 310 `__exnsi__ (( __STRING2_COPY_ARR4 ) \ 311 { { ((cڡ *( c ))[0], ((const *) (src))[1], \ 312 ((cڡ *( c ))[2], ((const *) (src))[3] } }), \ 313 `__exnsi__ (( __STRING2_COPY_ARR5 ) \ 314 { { ((cڡ *( c ))[0], ((const *) (src))[1], \ 315 ((cڡ *( c ))[2], ((const *) (src))[3], \ 316 ((cڡ *( c ))[4] } }), \ 317 `__exnsi__ (( __STRING2_COPY_ARR6 ) \ 318 { { ((cڡ *( c ))[0], ((const *) (src))[1], \ 319 ((cڡ *( c ))[2], ((const *) (src))[3], \ 320 ((cڡ *( c ))[4], ((const *) (src))[5] } }), \ 321 `__exnsi__ (( __STRING2_COPY_ARR7 ) \ 322 { { ((cڡ *( c ))[0], ((const *) (src))[1], \ 323 ((cڡ *( c ))[2], ((const *) (src))[3], \ 324 ((cڡ *( c ))[4], ((const *) (src))[5], \ 325 ((cڡ *( c ))[6] } }), \ 326 `__exnsi__ (( __STRING2_COPY_ARR8 ) \ 327 { { ((cڡ *( c ))[0], ((const *) (src))[1], \ 328 ((cڡ *( c ))[2], ((const *) (src))[3], \ 329 ((cڡ *( c ))[4], ((const *) (src))[5], \ 330 ((cڡ *( c ))[6], ((cڡ *(c))[7] } }) ) 332 __STRING_INLINE * __mempy_sml (*, , __STRING2_COPY_ARR2 , 333 __STRING2_COPY_ARR3 , 334 __STRING2_COPY_ARR4 , 335 __STRING2_COPY_ARR5 , 336 __STRING2_COPY_ARR6 , 337 __STRING2_COPY_ARR7 , 338 __STRING2_COPY_ARR8 , size_t ); 339 __STRING_INLINE * 340 $__mempy_sml (* __de ,  __c1 , 341 __STRING2_COPY_ARR2 __c2 , __STRING2_COPY_ARR3 __c3 , 342 __STRING2_COPY_ARR4 __c4 , __STRING2_COPY_ARR5 __c5 , 343 __STRING2_COPY_ARR6 __c6 , __STRING2_COPY_ARR7 __c7 , 344 __STRING2_COPY_ARR8 __c8 , size_t __ ) 347  __c ; 348 __STRING2_COPY_ARR2 __s2 ; 349 __STRING2_COPY_ARR3 __s3 ; 350 __STRING2_COPY_ARR4 __s4 ; 351 __STRING2_COPY_ARR5 __s5 ; 352 __STRING2_COPY_ARR6 __s6 ; 353 __STRING2_COPY_ARR7 __s7 ; 354 __STRING2_COPY_ARR8 __s8 ; 355 } * __u = __de ; 356 ( __ ) 359 __u -> __c = __c1 ; 362 __exnsi__ __u -> __s2 = __c2 ; 365 __exnsi__ __u -> __s3 = __c3 ; 368 __exnsi__ __u -> __s4 = __c4 ; 371 __exnsi__ __u -> __s5 = __c5 ; 374 __exnsi__ __u -> __s6 = __c6 ; 377 __exnsi__ __u -> __s7 = __c7 ; 380 __exnsi__ __u -> __s8 = __c8 ; 383  `__exnsi__ ((* __u + __ ); 384 } } 392 #ide _HAVE_STRING_ARCH_rchr 393 * __wmemchr (cڡ * __s ,  __c ); 394 #i __GNUC_PREREQ (3, 2) 395  #rchr ( s , c ) \ 396 ( `__exnsi__ ( `__but_cڡt_p ( c && !__but_cڡt_( s ) \ 397 && ( c ) == '\0' \ 398 ? (* `__wmemchr ( s , c ) \ 399 : `__but_rchr ( s , c ))) ) 401  #rchr ( s , c ) \ 402 ( `__exnsi__ ( `__but_cڡt_p ( c ) && (c) == '\0' \ 403 ? (* `__wmemchr ( s , c ) \ 404 : `rchr ( s , c ))) ) 410 #i(! defed _HAVE_STRING_ARCH_ry && ! __GNUC_PREREQ (3, 0)) \ 411 || defed g_FORCE_INLINES 412 #i! defed _HAVE_STRING_ARCH_ry && ! __GNUC_PREREQ (3, 0) 413  #ry ( de , c ) \ 414 ( `__exnsi__ ( `__but_cڡt_p ( c ) \ 415 ? ( `__rg2_1br_p ( c && ` (src) + 1 <= 8 \ 416 ? `__ry_sml ( de , `__ry_gs ( c ), \ 417 ` ( c ) + 1) \ 418 : (* `memy ( de , c , ` (src) + 1)) \ 419 : `ry ( de , c ))) ) 422 #i _STRING_INLINE_uligd 423 #ide _FORCE_INLINES 424  #__ry_gs ( c ) \ 425 __exnsi__ `__STRING2_SMALL_GET16 ( c , 0), \ 426 __exnsi__ `__STRING2_SMALL_GET16 ( c , 4), \ 427 __exnsi__ `__STRING2_SMALL_GET32 ( c , 0), \ 428 __exnsi__ `__STRING2_SMALL_GET32 ( c , 4) ) 430 __STRING_INLINE * __ry_sml (*, __ut16_t , __uint16_t, 431 __ut32_t , __ut32_t, size_t ); 432 __STRING_INLINE * 433 $__ry_sml (* __de , 434 __ut16_t __c0_2 , __ut16_ __c4_2 , 435 __ut32_t __c0_4 , __ut32_ __c4_4 , 436 size_t __ ) 439 __ut32_t __ui ; 440 __ut16_t __usi ; 441  __uc ; 442 } * __u = (* __de ; 443 ( __ ) 446 __u -> __uc = '\0'; 449 __u -> __usi = __c0_2 ; 452 __u -> __usi = __c0_2 ; 453 __u = `__exnsi__ ((*) __u + 2); 454 __u -> __uc = '\0'; 457 __u -> __ui = __c0_4 ; 460 __u -> __ui = __c0_4 ; 461 __u = `__exnsi__ ((*) __u + 4); 462 __u -> __uc = '\0'; 465 __u -> __ui = __c0_4 ; 466 __u = `__exnsi__ ((*) __u + 4); 467 __u -> __usi = __c4_2 ; 470 __u -> __ui = __c0_4 ; 471 __u = `__exnsi__ ((*) __u + 4); 472 __u -> __usi = __c4_2 ; 473 __u = `__exnsi__ ((*) __u + 2); 474 __u -> __uc = '\0'; 477 __u -> __ui = __c0_4 ; 478 __u = `__exnsi__ ((*) __u + 4); 479 __u -> __ui = __c4_4 ; 482  __de ; 483 } } 485 #ide _FORCE_INLINES 486  #__ry_gs ( c ) \ 487 `__exnsi__ (( __STRING2_COPY_ARR2 ) \ 488 { { ((cڡ *( c ))[0], '\0' } }), \ 489 `__exnsi__ (( __STRING2_COPY_ARR3 ) \ 490 { { ((cڡ *( c ))[0], ((const *) (src))[1], \ 492 `__exnsi__ (( __STRING2_COPY_ARR4 ) \ 493 { { ((cڡ *( c ))[0], ((const *) (src))[1], \ 494 ((cڡ *( c ))[2], '\0' } }), \ 495 `__exnsi__ (( __STRING2_COPY_ARR5 ) \ 496 { { ((cڡ *( c ))[0], ((const *) (src))[1], \ 497 ((cڡ *( c ))[2], ((const *) (src))[3], \ 499 `__exnsi__ (( __STRING2_COPY_ARR6 ) \ 500 { { ((cڡ *( c ))[0], ((const *) (src))[1], \ 501 ((cڡ *( c ))[2], ((const *) (src))[3], \ 502 ((cڡ *( c ))[4], '\0' } }), \ 503 `__exnsi__ (( __STRING2_COPY_ARR7 ) \ 504 { { ((cڡ *( c ))[0], ((const *) (src))[1], \ 505 ((cڡ *( c ))[2], ((const *) (src))[3], \ 506 ((cڡ *( c ))[4], ((const *) (src))[5], \ 508 `__exnsi__ (( __STRING2_COPY_ARR8 ) \ 509 { { ((cڡ *( c ))[0], ((const *) (src))[1], \ 510 ((cڡ *( c ))[2], ((const *) (src))[3], \ 511 ((cڡ *( c ))[4], ((const *) (src))[5], \ 512 ((cڡ *( c ))[6], '\0' } }) ) 514 __STRING_INLINE * __ry_sml (*, __STRING2_COPY_ARR2 , 515 __STRING2_COPY_ARR3 , 516 __STRING2_COPY_ARR4 , 517 __STRING2_COPY_ARR5 , 518 __STRING2_COPY_ARR6 , 519 __STRING2_COPY_ARR7 , 520 __STRING2_COPY_ARR8 , size_t ); 521 __STRING_INLINE * 522 $__ry_sml (* __de , 523 __STRING2_COPY_ARR2 __c2 , __STRING2_COPY_ARR3 __c3 , 524 __STRING2_COPY_ARR4 __c4 , __STRING2_COPY_ARR5 __c5 , 525 __STRING2_COPY_ARR6 __c6 , __STRING2_COPY_ARR7 __c7 , 526 __STRING2_COPY_ARR8 __c8 , size_t __ ) 529  __c ; 530 __STRING2_COPY_ARR2 __s2 ; 531 __STRING2_COPY_ARR3 __s3 ; 532 __STRING2_COPY_ARR4 __s4 ; 533 __STRING2_COPY_ARR5 __s5 ; 534 __STRING2_COPY_ARR6 __s6 ; 535 __STRING2_COPY_ARR7 __s7 ; 536 __STRING2_COPY_ARR8 __s8 ; 537 } * __u = (* __de ; 538 ( __ ) 541 __u -> __c = '\0'; 544 __exnsi__ __u -> __s2 = __c2 ; 547 __exnsi__ __u -> __s3 = __c3 ; 550 __exnsi__ __u -> __s4 = __c4 ; 553 __exnsi__ __u -> __s5 = __c5 ; 556 __exnsi__ __u -> __s6 = __c6 ; 559 __exnsi__ __u -> __s7 = __c7 ; 562 __exnsi__ __u -> __s8 = __c8 ; 565  __de ; 566 } } 572 #ifde __USE_GNU 573 #i! defed _HAVE_STRING_ARCH_py || defed _FORCE_INLINES 574 #ide _HAVE_STRING_ARCH_py 575 #i __GNUC_PREREQ (3, 4) 576  #__py ( de , c `__but_py (de, src) ) 577 #i __GNUC_PREREQ (3, 0) 578  #__py ( de , c ) \ 579 ( `__exnsi__ ( `__but_cڡt_p ( c ) \ 580 ? ( `__rg2_1br_p ( c && ` (src) + 1 <= 8 \ 581 ? `__but_ry ( de , c + ` (src) \ 582 : ((*( __mempy ( de , c , ` (src) + 1) \ 584 : `__py ( de , c ))) ) 586  #__py ( de , c ) \ 587 ( `__exnsi__ ( `__but_cڡt_p ( c ) \ 588 ? ( `__rg2_1br_p ( c && ` (src) + 1 <= 8 \ 589 ? `__py_sml ( de , `__py_gs ( c ), \ 590 ` ( c ) + 1) \ 591 : ((*( __mempy ( de , c , ` (src) + 1) \ 593 : `__py ( de , c ))) ) 597  #py ( de , c `__py (de, src) ) 600 #i! __GNUC_PREREQ (3, 0|| defed _FORCE_INLINES 601 #i _STRING_INLINE_uligd 602 #ide _FORCE_INLINES 603  #__py_gs ( c ) \ 604 __exnsi__ `__STRING2_SMALL_GET16 ( c , 0), \ 605 __exnsi__ `__STRING2_SMALL_GET16 ( c , 4), \ 606 __exnsi__ `__STRING2_SMALL_GET32 ( c , 0), \ 607 __exnsi__ `__STRING2_SMALL_GET32 ( c , 4) ) 609 __STRING_INLINE * __py_sml (*, __ut16_t , __uint16_t, 610 __ut32_t , __ut32_t, size_t ); 611 __STRING_INLINE * 612 $__py_sml (* __de , 613 __ut16_t __c0_2 , __ut16_ __c4_2 , 614 __ut32_t __c0_4 , __ut32_ __c4_4 , 615 size_t __ ) 618  __ui ; 619  __usi ; 620  __uc ; 621  __c ; 622 } * __u = (* __de ; 623 ( __ ) 626 __u -> __uc = '\0'; 629 __u -> __usi = __c0_2 ; 630 __u = `__exnsi__ ((*) __u + 1); 633 __u -> __usi = __c0_2 ; 634 __u = `__exnsi__ ((*) __u + 2); 635 __u -> __uc = '\0'; 638 __u -> __ui = __c0_4 ; 639 __u = `__exnsi__ ((*) __u + 3); 642 __u -> __ui = __c0_4 ; 643 __u = `__exnsi__ ((*) __u + 4); 644 __u -> __uc = '\0'; 647 __u -> __ui = __c0_4 ; 648 __u = `__exnsi__ ((*) __u + 4); 649 __u -> __usi = __c4_2 ; 650 __u = `__exnsi__ ((*) __u + 1); 653 __u -> __ui = __c0_4 ; 654 __u = `__exnsi__ ((*) __u + 4); 655 __u -> __usi = __c4_2 ; 656 __u = `__exnsi__ ((*) __u + 2); 657 __u -> __uc = '\0'; 660 __u -> __ui = __c0_4 ; 661 __u = `__exnsi__ ((*) __u + 4); 662 __u -> __ui = __c4_4 ; 663 __u = `__exnsi__ ((*) __u + 3); 666  & __u -> __c ; 667 } } 669 #ide _FORCE_INLINES 670  #__py_gs ( c ) \ 671 `__exnsi__ (( __STRING2_COPY_ARR2 ) \ 672 { { ((cڡ *( c ))[0], '\0' } }), \ 673 `__exnsi__ (( __STRING2_COPY_ARR3 ) \ 674 { { ((cڡ *( c ))[0], ((const *) (src))[1], \ 676 `__exnsi__ (( __STRING2_COPY_ARR4 ) \ 677 { { ((cڡ *( c ))[0], ((const *) (src))[1], \ 678 ((cڡ *( c ))[2], '\0' } }), \ 679 `__exnsi__ (( __STRING2_COPY_ARR5 ) \ 680 { { ((cڡ *( c ))[0], ((const *) (src))[1], \ 681 ((cڡ *( c ))[2], ((const *) (src))[3], \ 683 `__exnsi__ (( __STRING2_COPY_ARR6 ) \ 684 { { ((cڡ *( c ))[0], ((const *) (src))[1], \ 685 ((cڡ *( c ))[2], ((const *) (src))[3], \ 686 ((cڡ *( c ))[4], '\0' } }), \ 687 `__exnsi__ (( __STRING2_COPY_ARR7 ) \ 688 { { ((cڡ *( c ))[0], ((const *) (src))[1], \ 689 ((cڡ *( c ))[2], ((const *) (src))[3], \ 690 ((cڡ *( c ))[4], ((const *) (src))[5], \ 692 `__exnsi__ (( __STRING2_COPY_ARR8 ) \ 693 { { ((cڡ *( c ))[0], ((const *) (src))[1], \ 694 ((cڡ *( c ))[2], ((const *) (src))[3], \ 695 ((cڡ *( c ))[4], ((const *) (src))[5], \ 696 ((cڡ *( c ))[6], '\0' } }) ) 698 __STRING_INLINE * __py_sml (*, __STRING2_COPY_ARR2 , 699 __STRING2_COPY_ARR3 , 700 __STRING2_COPY_ARR4 , 701 __STRING2_COPY_ARR5 , 702 __STRING2_COPY_ARR6 , 703 __STRING2_COPY_ARR7 , 704 __STRING2_COPY_ARR8 , size_t ); 705 __STRING_INLINE * 706 $__py_sml (* __de , 707 __STRING2_COPY_ARR2 __c2 , __STRING2_COPY_ARR3 __c3 , 708 __STRING2_COPY_ARR4 __c4 , __STRING2_COPY_ARR5 __c5 , 709 __STRING2_COPY_ARR6 __c6 , __STRING2_COPY_ARR7 __c7 , 710 __STRING2_COPY_ARR8 __c8 , size_t __ ) 713  __c ; 714 __STRING2_COPY_ARR2 __s2 ; 715 __STRING2_COPY_ARR3 __s3 ; 716 __STRING2_COPY_ARR4 __s4 ; 717 __STRING2_COPY_ARR5 __s5 ; 718 __STRING2_COPY_ARR6 __s6 ; 719 __STRING2_COPY_ARR7 __s7 ; 720 __STRING2_COPY_ARR8 __s8 ; 721 } * __u = (* __de ; 722 ( __ ) 725 __u -> __c = '\0'; 728 __exnsi__ __u -> __s2 = __c2 ; 731 __exnsi__ __u -> __s3 = __c3 ; 734 __exnsi__ __u -> __s4 = __c4 ; 737 __exnsi__ __u -> __s5 = __c5 ; 740 __exnsi__ __u -> __s6 = __c6 ; 743 __exnsi__ __u -> __s7 = __c7 ; 746 __exnsi__ __u -> __s8 = __c8 ; 749  __de + __ - 1; 750 } } 758 #ide _HAVE_STRING_ARCH_y 759 #i __GNUC_PREREQ (3, 2) 760  #y ( de , c , n `__but_y (de, src,) ) 762  #y ( de , c , n ) \ 763 ( `__exnsi__ ( `__but_cڡt_p ( c && __but_cڡt_( n ) \ 764 ? ( ` ( c + 1 >(( size_t ( n )) \ 765 ? (* `memy ( de , c , n ) \ 766 : `y ( de , c , n )) \ 767 : `y ( de , c , n ))) ) 773 #ide _HAVE_STRING_ARCH_t 774 #ifde _USE_STRING_ARCH_rchr 775  #t ( de , c , n ) \ 776 ( `__exnsi__ ({ * __de = ( de ); \ 777 `__but_cڡt_p ( c && __but_cڡt_( n ) \ 778 ? ( ` ( c < (( size_t ( n )) \ 779 ? `rt ( __de , c ) \ 780 : (*((* `__mempy ( `rchr ( __de , '\0'), \ 781 c , n )'\0', __de )) \ 782 : `t ( de , c , n ); })) ) 783 #i __GNUC_PREREQ (3, 2) 784  #t ( de , c , n `__but_t (de, src,) ) 786  #t ( de , c , n ) \ 787 ( `__exnsi__ ( `__but_cڡt_p ( c && __but_cڡt_( n ) \ 788 ? ( ` ( c < (( size_t ( n )) \ 789 ? `rt ( de , c ) \ 790 : `t ( de , c , n )) \ 791 : `t ( de , c , n ))) ) 797 #ide _HAVE_STRING_ARCH_rcmp 798 #i __GNUC_PREREQ (3, 2) 799  #rcmp ( s1 , s2 ) \ 800 __exnsi__ \ 801 ({ size_t __s1_n , __s2_n ; \ 802 ( `__but_cڡt_p ( s1 && __but_cڡt_( s2 ) \ 803 && ( __s1_n = `__but_ ( s1 ), __s2_n = __but_ ( s2 ), \ 804 (! `__rg2_1br_p ( s1 || __s1_n >= 4) \ 805 && (! `__rg2_1br_p ( s2 || __s2_n >= 4)) \ 806 ? `__but_rcmp ( s1 , s2 ) \ 807 : ( `__but_cڡt_p ( s1 && `__rg2_1br_p (s1) \ 808 && ( __s1_n = `__but_ ( s1 ), __s1_len < 4) \ 809 ? ( `__but_cڡt_p ( s2 && `__rg2_1br_p (s2) \ 810 ? `__but_rcmp ( s1 , s2 ) \ 811 : `__rcmp_cg ( s1 , s2 , __s1_n )) \ 812 : ( `__but_cڡt_p ( s2 && `__rg2_1br_p (s2) \ 813 && ( __s2_n = `__but_ ( s2 ), __s2_len < 4) \ 814 ? ( `__but_cڡt_p ( s1 && `__rg2_1br_p (s1) \ 815 ? `__but_rcmp ( s1 , s2 ) \ 816 : `__rcmp_gc ( s1 , s2 , __s2_n )) \ 817 : `__but_rcmp ( s1 , s2 )))); }) ) 819  #rcmp ( s1 , s2 ) \ 820 __exnsi__ \ 821 ({ size_t __s1_n , __s2_n ; \ 822 ( `__but_cڡt_p ( s1 && __but_cڡt_( s2 ) \ 823 && ( __s1_n = ` ( s1 ), __s2_n = s( s2 ), \ 824 (! `__rg2_1br_p ( s1 || __s1_n >= 4) \ 825 && (! `__rg2_1br_p ( s2 || __s2_n >= 4)) \ 826 ? `memcmp ((cڡ *( s1 ), (cڡ *( s2 ), \ 827 ( __s1_n < __s2_n ? __s1_len : __s2_len) + 1) \ 828 : ( `__but_cڡt_p ( s1 && `__rg2_1br_p (s1) \ 829 && ( __s1_n = ` ( s1 ), __s1_len < 4) \ 830 ? ( `__but_cڡt_p ( s2 && `__rg2_1br_p (s2) \ 831 ? `__rcmp_cc ( s1 , s2 , __s1_n ) \ 832 : `__rcmp_cg ( s1 , s2 , __s1_n )) \ 833 : ( `__but_cڡt_p ( s2 && `__rg2_1br_p (s2) \ 834 && ( __s2_n = ` ( s2 ), __s2_len < 4) \ 835 ? ( `__but_cڡt_p ( s1 && `__rg2_1br_p (s1) \ 836 ? `__rcmp_cc ( s1 , s2 , __s2_n ) \ 837 : `__rcmp_gc ( s1 , s2 , __s2_n )) \ 838 : `rcmp ( s1 , s2 )))); }) ) 841  #__rcmp_cc ( s1 , s2 , l ) \ 842 ( `__exnsi__ ({  __su = \ 843 (((cڡ *(cڡ *( s1 ))[0] \ 844 - ((cڡ *(cڡ *)( s2 ))[0]); \ 845 i( l > 0 && __su == 0) \ 847 __su = (((const *) \ 848 (cڡ *( s1 ))[1] \ 850 (cڡ *( s2 ))[1]); \ 851 i( l > 1 && __su == 0) \ 853 __su = \ 855 (cڡ *( s1 ))[2] \ 857 (cڡ *( s2 ))[2]); \ 858 i( l > 2 && __su == 0) \ 859 __su = \ 861 (cڡ *( s1 ))[3] \ 863 (cڡ *( s2 ))[3]); \ 866 __su ; })) ) 868  #__rcmp_cg ( s1 , s2 , l1 ) \ 869 ( `__exnsi__ ({ cڡ * __s2 = \ 870 (cڡ *(cڡ *( s2 ); \ 871  __su = \ 872 (((cڡ *(cڡ *( s1 ))[0] \ 873 - __s2 [0]); \ 874 i( l1 > 0 && __su == 0) \ 876 __su = (((const *) \ 877 (cڡ *( s1 ))[1] - __s2 [1]); \ 878 i( l1 > 1 && __su == 0) \ 880 __su = (((const *) \ 881 (cڡ *( s1 ))[2] - __s2 [2]); \ 882 i( l1 > 2 && __su == 0) \ 883 __su = (((const *) \ 884 (cڡ *( s1 ))[3] \ 885 - __s2 [3]); \ 888 __su ; })) ) 890  #__rcmp_gc ( s1 , s2 , l2 (- `__rcmp_cg (s2, s1,2)) ) 895 #ide _HAVE_STRING_ARCH_cmp 896  #cmp ( s1 , s2 , n ) \ 897 ( `__exnsi__ ( `__but_cڡt_p ( n ) \ 898 && (( `__but_cڡt_p ( s1 ) \ 899 && ` ( s1 < (( size_t ( n ))) \ 900 || ( `__but_cڡt_p ( s2 ) \ 901 && ` ( s2 < (( size_t ( n )))) \ 902 ? `rcmp ( s1 , s2 : `cmp (s1, s2, n ))) ) 908 #i! defed _HAVE_STRING_ARCH_rcn || defed _FORCE_INLINES 909 #ide _HAVE_STRING_ARCH_rcn 910 #i __GNUC_PREREQ (3, 2) 911  #rcn ( s , je ) \ 912 __exnsi__ \ 913 ({  __r0 , __r1 , __r2 ; \ 914 ( `__but_cڡt_p ( je && `__rg2_1br_p (reject) \ 915 ? (( `__but_cڡt_p ( s && `__rg2_1br_p (s)) \ 916 ? `__but_rcn ( s , je ) \ 917 : (( __r0 = ((cڡ *( je ))[0], __r0 == '\0') \ 918 ? ` ( s ) \ 919 : (( __r1 = ((cڡ *( je ))[1], __r1 == '\0') \ 920 ? `__rcn_c1 ( s , __r0 ) \ 921 : (( __r2 = ((cڡ *( je ))[2], __r2 == '\0') \ 922 ? `__rcn_c2 ( s , __r0 , __r1 ) \ 923 : (((cڡ *( je ))[3] == '\0' \ 924 ? `__rcn_c3 ( s , __r0 , __r1 , __r2 ) \ 925 : `__but_rcn ( s , je )))))) \ 926 : `__but_rcn ( s , je )); }) ) 928  #rcn ( s , je ) \ 929 __exnsi__ \ 930 ({  __r0 , __r1 , __r2 ; \ 931 ( `__but_cڡt_p ( je && `__rg2_1br_p (reject) \ 932 ? (( __r0 = ((cڡ *( je ))[0], __r0 == '\0') \ 933 ? ` ( s ) \ 934 : (( __r1 = ((cڡ *( je ))[1], __r1 == '\0') \ 935 ? `__rcn_c1 ( s , __r0 ) \ 936 : (( __r2 = ((cڡ *( je ))[2], __r2 == '\0') \ 937 ? `__rcn_c2 ( s , __r0 , __r1 ) \ 938 : (((cڡ *( je ))[3] == '\0' \ 939 ? `__rcn_c3 ( s , __r0 , __r1 , __r2 ) \ 940 : `rcn ( s , je ))))) \ 941 : `rcn ( s , je )); }) ) 945 __STRING_INLINE size_t __rcn_c1 (cڡ * __s ,  __je ); 946 __STRING_INLINE size_t 947 $__rcn_c1 (cڡ * __s ,  __je ) 949 size_t __su = 0; 950  __s [ __su ] !'\0' && __s[__su] ! __je ) 951 ++ __su ; 952  __su ; 953 } } 955 __STRING_INLINE size_t __rcn_c2 (cڡ * __s ,  __je1 , 956  __je2 ); 957 __STRING_INLINE size_t 958 $__rcn_c2 (cڡ * __s ,  __je1 ,  __je2 ) 960 size_t __su = 0; 961  __s [ __su ] !'\0' && __s[__su] ! __je1 962 && __s [ __su ] ! __je2 ) 963 ++ __su ; 964  __su ; 965 } } 967 __STRING_INLINE size_t __rcn_c3 (cڡ * __s ,  __je1 , 968  __je2 ,  __je3 ); 969 __STRING_INLINE size_t 970 $__rcn_c3 (cڡ * __s ,  __je1 ,  __je2 , 971  __je3 ) 973 size_t __su = 0; 974  __s [ __su ] !'\0' && __s[__su] ! __je1 975 && __s [ __su ] ! __je2 && __s[__su] ! __je3 ) 976 ++ __su ; 977  __su ; 978 } } 984 #i! defed _HAVE_STRING_ARCH_rn || defed _FORCE_INLINES 985 #ide _HAVE_STRING_ARCH_rn 986 #i __GNUC_PREREQ (3, 2) 987  #rn ( s , ac ) \ 988 __exnsi__ \ 989 ({  __a0 , __a1 , __a2 ; \ 990 ( `__but_cڡt_p ( ac && `__rg2_1br_p (accept) \ 991 ? (( `__but_cڡt_p ( s && `__rg2_1br_p (s)) \ 992 ? `__but_rn ( s , ac ) \ 993 : (( __a0 = ((cڡ *( ac ))[0], __a0 == '\0') \ 994 ? ((( s ), ( size_t ) 0) \ 995 : (( __a1 = ((cڡ *( ac ))[1], __a1 == '\0') \ 996 ? `__rn_c1 ( s , __a0 ) \ 997 : (( __a2 = ((cڡ *( ac ))[2], __a2 == '\0') \ 998 ? `__rn_c2 ( s , __a0 , __a1 ) \ 999 : (((cڡ *( ac ))[3] == '\0' \ 1000 ? `__rn_c3 ( s , __a0 , __a1 , __a2 ) \ 1001 : `__but_rn ( s , ac )))))) \ 1002 : `__but_rn ( s , ac )); }) ) 1004  #rn ( s , ac ) \ 1005 __exnsi__ \ 1006 ({  __a0 , __a1 , __a2 ; \ 1007 ( `__but_cڡt_p ( ac && `__rg2_1br_p (accept) \ 1008 ? (( __a0 = ((cڡ *( ac ))[0], __a0 == '\0') \ 1009 ? ((( s ), ( size_t ) 0) \ 1010 : (( __a1 = ((cڡ *( ac ))[1], __a1 == '\0') \ 1011 ? `__rn_c1 ( s , __a0 ) \ 1012 : (( __a2 = ((cڡ *( ac ))[2], __a2 == '\0') \ 1013 ? `__rn_c2 ( s , __a0 , __a1 ) \ 1014 : (((cڡ *( ac ))[3] == '\0' \ 1015 ? `__rn_c3 ( s , __a0 , __a1 , __a2 ) \ 1016 : `rn ( s , ac ))))) \ 1017 : `rn ( s , ac )); }) ) 1021 __STRING_INLINE size_t __rn_c1 (cڡ * __s ,  __ac ); 1022 __STRING_INLINE size_t 1023 $__rn_c1 (cڡ * __s ,  __ac ) 1025 size_t __su = 0; 1027  __s [ __su ] = __ac ) 1028 ++ __su ; 1029  __su ; 1030 } } 1032 __STRING_INLINE size_t __rn_c2 (cڡ * __s ,  __ac1 , 1033  __ac2 ); 1034 __STRING_INLINE size_t 1035 $__rn_c2 (cڡ * __s ,  __ac1 ,  __ac2 ) 1037 size_t __su = 0; 1039  __s [ __su ] = __ac1 || __s[__su] = __ac2 ) 1040 ++ __su ; 1041  __su ; 1042 } } 1044 __STRING_INLINE size_t __rn_c3 (cڡ * __s ,  __ac1 , 1045  __ac2 ,  __ac3 ); 1046 __STRING_INLINE size_t 1047 $__rn_c3 (cڡ * __s ,  __ac1 ,  __ac2 ,  __ac3 ) 1049 size_t __su = 0; 1051  __s [ __su ] = __ac1 || __s[__su] = __ac2 1052 || __s [ __su ] = __ac3 ) 1053 ++ __su ; 1054  __su ; 1055 } } 1060 #i! defed _HAVE_STRING_ARCH_brk || defed _FORCE_INLINES 1061 #ide _HAVE_STRING_ARCH_brk 1062 #i __GNUC_PREREQ (3, 2) 1063  #brk ( s , ac ) \ 1064 __exnsi__ \ 1065 ({  __a0 , __a1 , __a2 ; \ 1066 ( `__but_cڡt_p ( ac && `__rg2_1br_p (accept) \ 1067 ? (( `__but_cڡt_p ( s && `__rg2_1br_p (s)) \ 1068 ? `__but_brk ( s , ac ) \ 1069 : (( __a0 = ((cڡ *( ac ))[0], __a0 == '\0') \ 1070 ? ((( s ), (* NULL ) \ 1071 : (( __a1 = ((cڡ *( ac ))[1], __a1 == '\0') \ 1072 ? `__but_rchr ( s , __a0 ) \ 1073 : (( __a2 = ((cڡ *( ac ))[2], __a2 == '\0') \ 1074 ? `__brk_c2 ( s , __a0 , __a1 ) \ 1075 : (((cڡ *( ac ))[3] == '\0' \ 1076 ? `__brk_c3 ( s , __a0 , __a1 , __a2 ) \ 1077 : `__but_brk ( s , ac )))))) \ 1078 : `__but_brk ( s , ac )); }) ) 1080  #brk ( s , ac ) \ 1081 __exnsi__ \ 1082 ({  __a0 , __a1 , __a2 ; \ 1083 ( `__but_cڡt_p ( ac && `__rg2_1br_p (accept) \ 1084 ? (( __a0 = ((cڡ *( ac ))[0], __a0 == '\0') \ 1085 ? ((( s ), (* NULL ) \ 1086 : (( __a1 = ((cڡ *( ac ))[1], __a1 == '\0') \ 1087 ? `rchr ( s , __a0 ) \ 1088 : (( __a2 = ((cڡ *( ac ))[2], __a2 == '\0') \ 1089 ? `__brk_c2 ( s , __a0 , __a1 ) \ 1090 : (((cڡ *( ac ))[3] == '\0' \ 1091 ? `__brk_c3 ( s , __a0 , __a1 , __a2 ) \ 1092 : `brk ( s , ac ))))) \ 1093 : `brk ( s , ac )); }) ) 1097 __STRING_INLINE * __brk_c2 (cڡ * __s ,  __ac1 , 1098  __ac2 ); 1099 __STRING_INLINE * 1100 $__brk_c2 (cڡ * __s ,  __ac1 ,  __ac2 ) 1103 * __s !'\0' && *__! __ac1 && *__! __ac2 ) 1104 ++ __s ; 1105  * __s ='\0' ? NULL : (*( size_t ) __s; 1106 } } 1108 __STRING_INLINE * __brk_c3 (cڡ * __s ,  __ac1 , 1109  __ac2 ,  __ac3 ); 1110 __STRING_INLINE * 1111 $__brk_c3 (cڡ * __s ,  __ac1 ,  __ac2 ,  __ac3 ) 1114 * __s !'\0' && *__! __ac1 && *__! __ac2 1115 && * __s ! __ac3 ) 1116 ++ __s ; 1117  * __s ='\0' ? NULL : (*( size_t ) __s; 1118 } } 1124 #i! defed _HAVE_STRING_ARCH_rr && ! __GNUC_PREREQ (2, 97) 1125  #rr ( hayack , ed ) \ 1126 ( `__exnsi__ ( `__but_cڡt_p ( ed && `__rg2_1br_p (needle) \ 1127 ? (((cڡ *( ed ))[0] == '\0' \ 1128 ? (*( size_t ( hayack ) \ 1129 : (((cڡ *( ed ))[1] == '\0' \ 1130 ? `rchr ( hayack , \ 1131 ((cڡ *( ed ))[0]) \ 1132 : `rr ( hayack , ed ))) \ 1133 : `rr ( hayack , ed ))) ) 1137 #i! defed _HAVE_STRING_ARCH_ok_r || defed _FORCE_INLINES 1138 #ide _HAVE_STRING_ARCH_ok_r 1139  #__ok_r ( s , p , x ) \ 1140 ( `__exnsi__ ( `__but_cڡt_p ( p && `__rg2_1br_p (sep) \ 1141 && ((cڡ *( p ))[0] != '\0' \ 1142 && ((cڡ *( p ))[1] == '\0' \ 1143 ? `__ok_r_1c ( s , ((cڡ *( p ))[0], x ) \ 1144 : `__ok_r ( s , p , x ))) ) 1147 __STRING_INLINE * __ok_r_1c (* __s ,  __p , ** __x ); 1148 __STRING_INLINE * 1149 $__ok_r_1c (* __s ,  __p , ** __x ) 1151 * __su ; 1152 i( __s = NULL ) 1153 __s = * __x ; 1154 * __s = __p ) 1155 ++ __s ; 1156 __su = NULL ; 1157 i(* __s != '\0') 1159 __su = __s ++; 1160 * __s != '\0') 1161 i(* __s ++ = __p ) 1163 __s [-1] = '\0'; 1167 * __x = __s ; 1168  __su ; 1169 } } 1170 #ifde __USE_POSIX 1171  #ok_r ( s , p , x `__ok_r (s, s,ex) ) 1176 #i! defed _HAVE_STRING_ARCH_rp || defed _FORCE_INLINES 1177 #ide _HAVE_STRING_ARCH_rp 1179 * __rp_g (** __rgp , cڡ * __dim ); 1180  #__rp ( s , je ) \ 1181 __exnsi__ \ 1182 ({  __r0 , __r1 , __r2 ; \ 1183 ( `__but_cڡt_p ( je && `__rg2_1br_p (reject) \ 1184 && ( __r0 = ((cڡ *( je ))[0], \ 1185 ((cڡ *( je ))[0] != '\0') \ 1186 ? (( __r1 = ((cڡ *( je ))[1], \ 1187 ((cڡ *( je ))[1] == '\0') \ 1188 ? `__rp_1c ( s , __r0 ) \ 1189 : (( __r2 = ((cڡ *( je ))[2], __r2 == '\0') \ 1190 ? `__rp_2c ( s , __r0 , __r1 ) \ 1191 : (((cڡ *( je ))[3] == '\0' \ 1192 ? `__rp_3c ( s , __r0 , __r1 , __r2 ) \ 1193 : `__rp_g ( s , je )))) \ 1194 : `__rp_g ( s , je )); }) ) 1197 __STRING_INLINE * __rp_1c (** __s ,  __je ); 1198 __STRING_INLINE * 1199 $__rp_1c (** __s ,  __je ) 1201 * __tv = * __s ; 1202 i( __tv ! NULL && (* __s = `rchr (__tv, __je )) != NULL) 1203 *(* __s )++ = '\0'; 1204  __tv ; 1205 } } 1207 __STRING_INLINE * __rp_2c (** __s ,  __je1 ,  __je2 ); 1208 __STRING_INLINE * 1209 $__rp_2c (** __s ,  __je1 ,  __je2 ) 1211 * __tv = * __s ; 1212 i( __tv ! NULL ) 1214 * __ = __tv ; 1217 i(* __ == '\0') 1219 __ = NULL ; 1222 i(* __ = __je1 || *__ = __je2 ) 1224 * __ ++ = '\0'; 1227 ++ __ ; 1229 * __s = __ ; 1231  __tv ; 1232 } } 1234 __STRING_INLINE * __rp_3c (** __s ,  __je1 ,  __je2 , 1235  __je3 ); 1236 __STRING_INLINE * 1237 $__rp_3c (** __s ,  __je1 ,  __je2 ,  __je3 ) 1239 * __tv = * __s ; 1240 i( __tv ! NULL ) 1242 * __ = __tv ; 1245 i(* __ == '\0') 1247 __ = NULL ; 1250 i(* __ = __je1 || *__ = __je2 || *__ = __je3 ) 1252 * __ ++ = '\0'; 1255 ++ __ ; 1257 * __s = __ ; 1259  __tv ; 1260 } } 1261 #ifde __USE_MISC 1262  #rp ( s , je `__rp (s,eje) ) 1269 #ifde __USE_MISC 1271 #i! defed _HAVE_STRING_ARCH_rdup || !defed _HAVE_STRING_ARCH_dup 1272  #__ed_mloc_d_oc ) 1273  ~ 1276 #ide _HAVE_STRING_ARCH_rdup 1278 * $__rdup (cڡ * __rg __THROW __ibu_mloc__ ; 1279  #__rdup ( s ) \ 1280 ( `__exnsi__ ( `__but_cڡt_p ( s && `__rg2_1br_p (s) \ 1281 ? (((cڡ *( s ))[0] == '\0' \ 1282 ? (* `oc (( size_t ) 1, (size_t) 1) \ 1283 : ({ size_t __n = ` ( s ) + 1; \ 1284 * __tv = (* `mloc ( __n ); \ 1285 i( __tv ! NULL ) \ 1286 __tv = (* `memy (__tv, s , __n ); \ 1287 __tv ; } })) \ 1288 : `__rdup ( s ))) ) 1290 #i defed __USE_XOPEN_EXTENDED || defed __USE_XOPEN2K8 1291  #rdup ( s `__rdup (s) ) 1295 #ide _HAVE_STRING_ARCH_dup 1297 * $__dup (cڡ * __rg , size_t __n ) 1298 __THROW __ibu_mloc__ ; 1299  #__dup ( s , n ) \ 1300 ( `__exnsi__ ( `__but_cڡt_p ( s && `__rg2_1br_p (s) \ 1301 ? (((cڡ *( s ))[0] == '\0' \ 1302 ? (* `oc (( size_t ) 1, (size_t) 1) \ 1303 : ({ size_t __n = ` ( s ) + 1; \ 1304 size_t __n = ( n ); \ 1305 * __tv ; \ 1306 i( __n < __n ) \ 1307 __n = __n + 1; \ 1308 __tv = (* `mloc ( __n ); \ 1309 i( __tv ! NULL ) \ 1311 __tv [ __n - 1] = '\0'; \ 1312 __tv = (* `memy (__tv, s , \ 1313 __n - 1); \ 1315 __tv ; } })) \ 1316 : `__dup ( s , n ))) ) 1318 #ifde __USE_XOPEN2K8 1319  #dup ( s , n `__dup (s,) ) 1325 #ide _FORCE_INLINES 1326 #unde __STRING_INLINE @/usr/include/bits/string3.h 18 #ide _STRING_H 22 #i! __GNUC_PREREQ (5,0) 23 __wnde ( __wn_memt_zo_n , 27 #ide __lulus 31 #unde memy 32 #unde memmove 33 #unde memt 34 #unde rt 35 #unde ry 36 #unde t 37 #unde y 38 #ifde __USE_GNU 39 #unde mempy 40 #unde py 42 #ifde __USE_MISC 43 #unde bcy 44 #unde bzo 49 __ftify_funi * 50 __NTH ( $memy (* __ri __de , cڡ *__ri __c , 51 size_t __n )) 53  `__but___memy_chk ( __de , __c , __n , `__bos0 (__dest)); 54 } } 56 __ftify_funi * 57 __NTH ( $memmove (* __de , cڡ * __c , size_t __n )) 59  `__but___memmove_chk ( __de , __c , __n , `__bos0 (__dest)); 60 } } 62 #ifde __USE_GNU 63 __ftify_funi * 64 __NTH ( $mempy (* __ri __de , cڡ *__ri __c , 65 size_t __n )) 67  `__but___mempy_chk ( __de , __c , __n , `__bos0 (__dest)); 68 } } 77 __ftify_funi * 78 __NTH ( $memt (* __de ,  __ch , size_t __n )) 82 #i! `__GNUC_PREREQ (5,0) 83 i( `__but_cڡt_p ( __n ) && __len == 0 84 && (! `__but_cڡt_p ( __ch ) || __ch != 0)) 86 `__wn_memt_zo_n (); 87  __de ; 90  `__but___memt_chk ( __de , __ch , __n , `__bos0 (__dest)); 91 } } 93 #ifde __USE_MISC 94 __ftify_funi  95 __NTH ( $bcy (cڡ * __c , * __de , size_t __n )) 97 ( `__but___memmove_chk ( __de , __c , __n , `__bos0 (__dest)); 98 } } 100 __ftify_funi  101 __NTH ( $bzo (* __de , size_t __n )) 103 ( `__but___memt_chk ( __de , '\0', __n , `__bos0 (__dest)); 104 } } 107 __ftify_funi * 108 __NTH ( $ry (* __ri __de , cڡ *__ri __c )) 110  `__but___ry_chk ( __de , __c , `__bos (__dest)); 111 } } 113 #ifde __USE_GNU 114 __ftify_funi * 115 __NTH ( $py (* __ri __de , cڡ *__ri __c )) 117  `__but___py_chk ( __de , __c , `__bos (__dest)); 118 } } 122 __ftify_funi * 123 __NTH ( $y (* __ri __de , cڡ *__ri __c , 124 size_t __n )) 126  `__but___y_chk ( __de , __c , __n , `__bos (__dest)); 127 } } 130 * $__y_chk (* __de , cڡ * __c , size_t __n , 131 size_t __den __THROW ; 132 * `__REDIRECT_NTH ( __y_s , (* __de , cڡ * __c , 133 size_t __n ), y ); 135 __ftify_funi * 136 `__NTH ( $y (* __de , cڡ * __c , size_t __n )) 138 i( `__bos ( __de !( size_t ) -1 139 && (! `__but_cڡt_p ( __n || __> `__bos ( __de ))) 140  `__y_chk ( __de , __c , __n , `__bos (__dest)); 141  `__y_s ( __de , __c , __n ); 142 } } 145 __ftify_funi * 146 __NTH ( $rt (* __ri __de , cڡ *__ri __c )) 148  `__but___rt_chk ( __de , __c , `__bos (__dest)); 149 } } 152 __ftify_funi * 153 __NTH ( $t (* __ri __de , cڡ *__ri __c , 154 size_t __n )) 156  `__but___t_chk ( __de , __c , __n , `__bos (__dest)); 157 } } @/usr/include/bits/sys_errlist.h 19 #ide _STDIO_H 25 #ifde __USE_MISC 26  sys_ü ; 27 cڡ *cڡ sys_i []; 29 #ifde __USE_GNU 30  _sys_ü ; 31 cڡ *cڡ _sys_i []; @/usr/include/bits/time.h 23 #i defed __ed_timev || defed __USE_GNU 24 #ide _STRUCT_TIMEVAL 25  #_STRUCT_TIMEVAL 1 ) 26  ~ 30  stimev 32 __time_t mtv_c ; 33 __sucds_t mtv_uc ; 38 #ide __ed_timev 39 #ide _BITS_TIME_H 40  #_BITS_TIME_H 1 ) 48  #CLOCKS_PER_SEC (( ock_t 1000000) ) 50 #i(! defed __STRICT_ANSI__ || defed __USE_POSIX ) \ 51 && ! defed g__USE_XOPEN2K 54  ~ 55  __syscf (); 56  #CLK_TCK (( __ock_t `__syscf (2) ) 59 #ifde __USE_POSIX199309 61  #CLOCK_REALTIME 0 ) 63  #CLOCK_MONOTONIC 1 ) 65  #CLOCK_PROCESS_CPUTIME_ID 2 ) 67  #CLOCK_THREAD_CPUTIME_ID 3 ) 69  #CLOCK_MONOTONIC_RAW 4 ) 71  #CLOCK_REALTIME_COARSE 5 ) 73  #CLOCK_MONOTONIC_COARSE 6 ) 75  #CLOCK_BOOTTIME 7 ) 77  #CLOCK_REALTIME_ALARM 8 ) 79  #CLOCK_BOOTTIME_ALARM 9 ) 81  #CLOCK_TAI 11 ) 84  #TIMER_ABSTIME 1 ) 87 #ifde __USE_GNU 88  ~ 90 __BEGIN_DECLS 93  $ock_adjtime ( __ockid_t __ock_id ,  timex * __utx __THROW ; 95 __END_DECLS 101 #unde __ed_timev @/usr/include/bits/types.h 23 #idef _BITS_TYPES_H 24  #_BITS_TYPES_H 1 ) 26  ~ 27  ~ 30  t__u_ch ; 31  t__u_sht ; 32  t__u_t ; 33  t__u_lg ; 36 sigd  t__t8_t ; 37  t__ut8_t ; 38 sigd  t__t16_t ; 39  t__ut16_t ; 40 sigd  t__t32_t ; 41  t__ut32_t ; 42 #i __WORDSIZE == 64 43 sigd  t__t64_t ; 44  t__ut64_t ; 46 __exnsi__ sigd  t__t64_t ; 47 __exnsi__  t__ut64_t ; 51 #i __WORDSIZE == 64 52  t__quad_t ; 53  t__u_quad_t ; 55 __exnsi__  t__quad_t ; 56 __exnsi__  t__u_quad_t ; 89  #__S16_TYPE  ) 90  #__U16_TYPE  ) 91  #__S32_TYPE  ) 92  #__U32_TYPE  ) 93  #__SLONGWORD_TYPE  ) 94  #__ULONGWORD_TYPE  ) 95 #i __WORDSIZE == 32 96  #__SQUAD_TYPE __quad_t ) 97  #__UQUAD_TYPE __u_quad_t ) 98  #__SWORD_TYPE  ) 99  #__UWORD_TYPE  ) 100  #__SLONG32_TYPE  ) 101  #__ULONG32_TYPE  ) 102  #__S64_TYPE __quad_t ) 103  #__U64_TYPE __u_quad_t ) 106  #__STD_TYPE __exnsi__  ) 107 #i __WORDSIZE == 64 108  t__SQUAD_TYPE  ) 109  t__UQUAD_TYPE  ) 110  t__SWORD_TYPE  ) 111  t__UWORD_TYPE  ) 112  t__SLONG32_TYPE  ) 113  t__ULONG32_TYPE  ) 114  t__S64_TYPE  ) 115  t__U64_TYPE  ) 117  t__STD_TYPE  ) 121  ~ 124 __STD_TYPE t__DEV_T_TYPE t__dev_t ; 125 __STD_TYPE __UID_T_TYPE g__uid_t ; 126 __STD_TYPE __GID_T_TYPE g__gid_t ; 127 __STD_TYPE __INO_T_TYPE g__o_t ; 128 __STD_TYPE __INO64_T_TYPE g__o64_t ; 129 __STD_TYPE __MODE_T_TYPE g__mode_t ; 130 __STD_TYPE __NLINK_T_TYPE g__ƚk_t ; 131 __STD_TYPE __OFF_T_TYPE g__off_t ; 132 __STD_TYPE __OFF64_T_TYPE g__off64_t ; 133 __STD_TYPE __PID_T_TYPE g__pid_t ; 134 __STD_TYPE __FSID_T_TYPE g__fsid_t ; 135 __STD_TYPE __CLOCK_T_TYPE g__ock_t ; 136 __STD_TYPE __RLIM_T_TYPE g__im_t ; 137 __STD_TYPE __RLIM64_T_TYPE g__im64_t ; 138 __STD_TYPE __ID_T_TYPE g__id_t ; 139 __STD_TYPE __TIME_T_TYPE g__time_t ; 140 __STD_TYPE __USECONDS_T_TYPE g__ucds_t ; 141 __STD_TYPE __SUSECONDS_T_TYPE g__sucds_t ; 143 __STD_TYPE __DADDR_T_TYPE g__daddr_t ; 144 __STD_TYPE __KEY_T_TYPE g__key_t ; 147 __STD_TYPE __CLOCKID_T_TYPE g__ockid_t ; 150 __STD_TYPE __TIMER_T_TYPE g__tim_t ; 153 __STD_TYPE __BLKSIZE_T_TYPE g__blksize_t ; 158 __STD_TYPE __BLKCNT_T_TYPE g__blkt_t ; 159 __STD_TYPE __BLKCNT64_T_TYPE g__blkt64_t ; 162 __STD_TYPE __FSBLKCNT_T_TYPE g__fsblkt_t ; 163 __STD_TYPE __FSBLKCNT64_T_TYPE g__fsblkt64_t ; 166 __STD_TYPE __FSFILCNT_T_TYPE g__fsft_t ; 167 __STD_TYPE __FSFILCNT64_T_TYPE g__fsft64_t ; 170 __STD_TYPE __FSWORD_T_TYPE g__fswd_t ; 172 __STD_TYPE __SSIZE_T_TYPE g__ssize_t ; 175 __STD_TYPE __SYSCALL_SLONG_TYPE g__sys_g_t ; 177 __STD_TYPE __SYSCALL_ULONG_TYPE g__sys_ulg_t ; 181  __off64_t t__loff_t ; 182  __quad_t * t__qaddr_t ; 183 * t__ddr_t ; 186 __STD_TYPE __SWORD_TYPE g___t ; 189 __STD_TYPE __U32_TYPE g__sockn_t ; 192 #unde __STD_TYPE @/usr/include/bits/unistd.h 19 #ide _UNISTD_H 23 ssize_t $__ad_chk ( __fd , * __buf , size_t __nbys , 24 size_t __bu __wur ; 25 ssize_t `__REDIRECT ( __ad_s , ( __fd , * __buf , 26 size_t __nbys ), ad __wur ; 27 ssize_t `__REDIRECT ( __ad_chk_wn , 28 ( __fd , * __buf , size_t __nbys , 29 size_t __bu ), __ad_chk ) 30 __wur `__wljr ("read called with biggerengthhan size of " 33 __ftify_funi __wur ssize_t 34 $ad ( __fd , * __buf , size_t __nbys ) 36 i( `__bos0 ( __buf !( size_t ) -1) 38 i(! `__but_cڡt_p ( __nbys )) 39  `__ad_chk ( __fd , __buf , __nbys , `__bos0 (__buf)); 41 i( __nbys > `__bos0 ( __buf )) 42  `__ad_chk_wn ( __fd , __buf , __nbys , `__bos0 (__buf)); 44  `__ad_s ( __fd , __buf , __nbys ); 45 } } 47 #ifde __USE_UNIX98 48 ssize_t $__d_chk ( __fd , * __buf , size_t __nbys , 49 __off_t __offt , size_t __bufsize __wur ; 50 ssize_t $__d64_chk ( __fd , * __buf , size_t __nbys , 51 __off64_t __offt , size_t __bufsize __wur ; 52 ssize_t `__REDIRECT ( __d_s , 53 ( __fd , * __buf , size_t __nbys , 54 __off_t __offt ), d __wur ; 55 ssize_t `__REDIRECT ( __d64_s , 56 ( __fd , * __buf , size_t __nbys , 57 __off64_t __offt ), d64 __wur ; 58 ssize_t `__REDIRECT ( __d_chk_wn , 59 ( __fd , * __buf , size_t __nbys , 60 __off_t __offt , size_t __bufsize ), __d_chk ) 61 __wur `__wljr ("pread called with biggerengthhan size of " 63 ssize_t `__REDIRECT ( __d64_chk_wn , 64 ( __fd , * __buf , size_t __nbys , 65 __off64_t __offt , size_t __bufsize ), 66 __d64_chk ) 67 __wur `__wljr ("pread64 called with biggerengthhan size of " 70 #ide __USE_FILE_OFFSET64 71 __ftify_funi __wur ssize_t 72 $d ( __fd , * __buf , size_t __nbys , __off_t __offt ) 74 i( `__bos0 ( __buf !( size_t ) -1) 76 i(! `__but_cڡt_p ( __nbys )) 77  `__d_chk ( __fd , __buf , __nbys , __offt , `__bos0 (__buf)); 79 i __nbys > `__bos0 ( __buf )) 80  `__d_chk_wn ( __fd , __buf , __nbys , __offt , 81 `__bos0 ( __buf )); 83  `__d_s ( __fd , __buf , __nbys , __offt ); 84 } } 86 __ftify_funi __wur ssize_t 87 $d ( __fd , * __buf , size_t __nbys , __off64_t __offt ) 89 i( `__bos0 ( __buf !( size_t ) -1) 91 i(! `__but_cڡt_p ( __nbys )) 92  `__d64_chk ( __fd , __buf , __nbys , __offt , `__bos0 (__buf)); 94 i __nbys > `__bos0 ( __buf )) 95  `__d64_chk_wn ( __fd , __buf , __nbys , __offt , 96 `__bos0 ( __buf )); 99  `__d64_s ( __fd , __buf , __nbys , __offt ); 100 } } 103 #ifde __USE_LARGEFILE64 104 __ftify_funi __wur ssize_t 105 $d64 ( __fd , * __buf , size_t __nbys , __off64_t __offt ) 107 i( `__bos0 ( __buf !( size_t ) -1) 109 i(! `__but_cڡt_p ( __nbys )) 110  `__d64_chk ( __fd , __buf , __nbys , __offt , `__bos0 (__buf)); 112 i __nbys > `__bos0 ( __buf )) 113  `__d64_chk_wn ( __fd , __buf , __nbys , __offt , 114 `__bos0 ( __buf )); 117  `__d64_s ( __fd , __buf , __nbys , __offt ); 118 } } 122 #i defed __USE_XOPEN_EXTENDED || defed __USE_XOPEN2K 123 ssize_t $__adlk_chk (cڡ * __ri __th , 124 * __ri __buf , size_t __n , 125 size_t __bu ) 126 __THROW `__nnu ((1, 2) __wur ; 127 ssize_t `__REDIRECT_NTH ( __adlk_s , 128 (cڡ * __ri __th , 129 * __ri __buf , size_t __n ), adlk ) 130 `__nnu ((1, 2) __wur ; 131 ssize_t `__REDIRECT_NTH ( __adlk_chk_wn , 132 (cڡ * __ri __th , 133 * __ri __buf , size_t __n , 134 size_t __bu ), __adlk_chk ) 135 `__nnu ((1, 2) __wur `__wljr ("readlink called with biggerength " 138 __ftify_funi `__nnu ((1, 2) __wur ssize_t 139 `__NTH ( $adlk (cڡ * __ri __th , *__ri __buf , 140 size_t __n )) 142 i( `__bos ( __buf !( size_t ) -1) 144 i(! `__but_cڡt_p ( __n )) 145  `__adlk_chk ( __th , __buf , __n , `__bos (__buf)); 147 i __n > `__bos ( __buf )) 148  `__adlk_chk_wn ( __th , __buf , __n , `__bos (__buf)); 150  `__adlk_s ( __th , __buf , __n ); 151 } } 154 #ifde __USE_ATFILE 155 ssize_t $__adlk_chk ( __fd , cڡ * __ri __th , 156 * __ri __buf , size_t __n , 157 size_t __bu ) 158 __THROW `__nnu ((2, 3) __wur ; 159 ssize_t `__REDIRECT_NTH ( __adlk_s , 160 ( __fd , cڡ * __ri __th , 161 * __ri __buf , size_t __n ), 162 adlk ) 163 `__nnu ((2, 3) __wur ; 164 ssize_t `__REDIRECT_NTH ( __adlk_chk_wn , 165 ( __fd , cڡ * __ri __th , 166 * __ri __buf , size_t __n , 167 size_t __bu ), __adlk_chk ) 168 `__nnu ((2, 3) __wur `__wljr ("readlinkat called with bigger " 172 __ftify_funi `__nnu ((2, 3) __wur ssize_t 173 `__NTH ( $adlk ( __fd , cڡ * __ri __th , 174 * __ri __buf , size_t __n )) 176 i( `__bos ( __buf !( size_t ) -1) 178 i(! `__but_cڡt_p ( __n )) 179  `__adlk_chk ( __fd , __th , __buf , __n , `__bos (__buf)); 181 i( __n > `__bos ( __buf )) 182  `__adlk_chk_wn ( __fd , __th , __buf , __n , 183 `__bos ( __buf )); 185  `__adlk_s ( __fd , __th , __buf , __n ); 186 } } 189 * $__gcwd_chk (* __buf , size_t __size , size_ __bu ) 190 __THROW __wur ; 191 * `__REDIRECT_NTH ( __gcwd_s , 192 (* __buf , size_t __size ), gcwd __wur ; 193 * `__REDIRECT_NTH ( __gcwd_chk_wn , 194 (* __buf , size_t __size , size_ __bu ), 195 __gcwd_chk ) 196 __wur `__wljr ("getcwd caller with biggerengthhan size of " 199 __ftify_funi __wur * 200 `__NTH ( $gcwd (* __buf , size_t __size )) 202 i( `__bos ( __buf !( size_t ) -1) 204 i(! `__but_cڡt_p ( __size )) 205  `__gcwd_chk ( __buf , __size , `__bos (__buf)); 207 i( __size > `__bos ( __buf )) 208  `__gcwd_chk_wn ( __buf , __size , `__bos (__buf)); 210  `__gcwd_s ( __buf , __size ); 211 } } 213 #i defed __USE_MISC || defed __USE_XOPEN_EXTENDED 214 * $__gwd_chk (* __buf , size_t bu ) 215 __THROW `__nnu ((1) __wur ; 216 * `__REDIRECT_NTH ( __gwd_wn , (* __buf ), gwd ) 217 `__nnu ((1) __wur `__wljr ("please use getcwd instead,s getwd " 220 __ftify_funi `__nnu ((1) __ibu_dd__ __wur * 221 `__NTH ( $gwd (* __buf )) 223 i( `__bos ( __buf !( size_t ) -1) 224  `__gwd_chk ( __buf , `__bos (__buf)); 225  `__gwd_wn ( __buf ); 226 } } 229 size_t $__cfr_chk ( __me , * __buf , size_t __n , 230 size_t __bu __THROW ; 231 size_t `__REDIRECT_NTH ( __cfr_s , ( __me , * __buf , 232 size_t __n ), cfr ); 233 size_t `__REDIRECT_NTH ( __cfr_chk_wn , 234 ( __me , * __buf , size_t __n , 235 size_t __bu ), __cfr_chk ) 236 `__wljr ("confstr called with biggerengthhan size of destination " 239 __ftify_funi size_t 240 `__NTH ( $cfr ( __me , * __buf , size_t __n )) 242 i( `__bos ( __buf !( size_t ) -1) 244 i(! `__but_cڡt_p ( __n )) 245  `__cfr_chk ( __me , __buf , __n , `__bos (__buf)); 247 i( `__bos ( __buf < __n ) 248  `__cfr_chk_wn ( __me , __buf , __n , `__bos (__buf)); 250  `__cfr_s ( __me , __buf , __n ); 251 } } 254  $__ggroups_chk ( __size , __gid_t __li [], size_t __lin ) 255 __THROW __wur ; 256  `__REDIRECT_NTH ( __ggroups_s , ( __size , __gid_t __li []), 257 ggroups __wur ; 258  `__REDIRECT_NTH ( __ggroups_chk_wn , 259 ( __size , __gid_t __li [], size_t __lin ), 260 __ggroups_chk ) 261 __wur `__wljr ("getgroups called with bigger group counthan what " 264 __ftify_funi  265 `__NTH ( $ggroups ( __size , __gid_t __li [])) 267 i( `__bos ( __li !( size_t ) -1) 269 i(! `__but_cڡt_p ( __size ) || __size < 0) 270  `__ggroups_chk ( __size , __li , `__bos (__list)); 272 i( __size *  ( __gid_t > `__bos ( __li )) 273  `__ggroups_chk_wn ( __size , __li , `__bos (__list)); 275  `__ggroups_s ( __size , __li ); 276 } } 279  $__yme_r_chk ( __fd , * __buf , size_t __bu , 280 size_t __ėl __THROW `__nnu ((2)); 281  `__REDIRECT_NTH ( __yme_r_s , ( __fd , * __buf , 282 size_t __bu ), yme_r ) 283 `__nnu ((2)); 284  `__REDIRECT_NTH ( __yme_r_chk_wn , 285 ( __fd , * __buf , size_t __bu , 286 size_t __ėl ), __yme_r_chk ) 287 `__nnu ((2) `__wljr ("ttyname_r called with bigger buflenhan " 290 __ftify_funi  291 `__NTH ( $yme_r ( __fd , * __buf , size_t __bu )) 293 i( `__bos ( __buf !( size_t ) -1) 295 i(! `__but_cڡt_p ( __bu )) 296  `__yme_r_chk ( __fd , __buf , __bu , `__bos (__buf)); 298 i( __bu > `__bos ( __buf )) 299  `__yme_r_chk_wn ( __fd , __buf , __bu , `__bos (__buf)); 301  `__yme_r_s ( __fd , __buf , __bu ); 302 } } 305 #i defed __USE_REENTRANT || defed __USE_POSIX199506 306  $__glog_r_chk (* __buf , size_t __bu , size_ __ėl ) 307 `__nnu ((1)); 308  `__REDIRECT ( __glog_r_s , (* __buf , size_t __bu ), 309 glog_r `__nnu ((1)); 310  `__REDIRECT ( __glog_r_chk_wn , 311 (* __buf , size_t __bu , size_ __ėl ), 312 __glog_r_chk ) 313 `__nnu ((1) `__wljr ("getlogin_r called with bigger buflenhan " 316 __ftify_funi  317 $glog_r (* __buf , size_t __bu ) 319 i( `__bos ( __buf !( size_t ) -1) 321 i(! `__but_cڡt_p ( __bu )) 322  `__glog_r_chk ( __buf , __bu , `__bos (__buf)); 324 i( __bu > `__bos ( __buf )) 325  `__glog_r_chk_wn ( __buf , __bu , `__bos (__buf)); 327  `__glog_r_s ( __buf , __bu ); 328 } } 332 #i defed __USE_MISC || defed __USE_UNIX98 333  $__ghome_chk (* __buf , size_t __bu , size_ __ėl ) 334 __THROW `__nnu ((1)); 335  `__REDIRECT_NTH ( __ghome_s , (* __buf , size_t __bu ), 336 ghome `__nnu ((1)); 337  `__REDIRECT_NTH ( __ghome_chk_wn , 338 (* __buf , size_t __bu , size_ __ėl ), 339 __ghome_chk ) 340 `__nnu ((1) `__wljr ("gethostname called with bigger buflenhan " 343 __ftify_funi  344 `__NTH ( $ghome (* __buf , size_t __bu )) 346 i( `__bos ( __buf !( size_t ) -1) 348 i(! `__but_cڡt_p ( __bu )) 349  `__ghome_chk ( __buf , __bu , `__bos (__buf)); 351 i( __bu > `__bos ( __buf )) 352  `__ghome_chk_wn ( __buf , __bu , `__bos (__buf)); 354  `__ghome_s ( __buf , __bu ); 355 } } 359 #i defed __USE_MISC || (defed __USE_XOPEN && !defed __USE_UNIX98 ) 360  $__gdomame_chk (* __buf , size_t __bu , size_ __ėl ) 361 __THROW `__nnu ((1) __wur ; 362  `__REDIRECT_NTH ( __gdomame_s , (* __buf , 363 size_t __bu ), 364 gdomame `__nnu ((1) __wur ; 365  `__REDIRECT_NTH ( __gdomame_chk_wn , 366 (* __buf , size_t __bu , size_ __ėl ), 367 __gdomame_chk ) 368 `__nnu ((1) __wur `__wljr ("getdomainname called with bigger " 372 __ftify_funi  373 `__NTH ( $gdomame (* __buf , size_t __bu )) 375 i( `__bos ( __buf !( size_t ) -1) 377 i(! `__but_cڡt_p ( __bu )) 378  `__gdomame_chk ( __buf , __bu , `__bos (__buf)); 380 i( __bu > `__bos ( __buf )) 381  `__gdomame_chk_wn ( __buf , __bu , `__bos (__buf)); 383  `__gdomame_s ( __buf , __bu ); 384 } } @/usr/include/bits/waitflags.h 19 #i! defed _SYS_WAIT_H && !defed _STDLIB_H 25  #WNOHANG 1 ) 26  #WUNTRACED 2 ) 29  #WSTOPPED 2 ) 30  #WEXITED 4 ) 31  #WCONTINUED 8 ) 32  #WNOWAIT 0x01000000 ) 34  #__WNOTHREAD 0x20000000 ) 36  #__WALL 0x40000000 ) 37  #__WCLONE 0x80000000 ) 40 #i defed __USE_XOPEN || defed __USE_XOPEN2K8 41 #ide __ENUM_IDTYPE_T 42  #__ENUM_IDTYPE_T 1 ) 46 #unde P_ALL 47 #unde P_PID 48 #unde P_PGID 52 mP_ALL , 53 mP_PID , 54 mP_PGID 55 } tidty_t ; @/usr/include/bits/waitstatus.h 19 #i! defed _SYS_WAIT_H && !defed _STDLIB_H 28  #__WEXITSTATUS ( us (((us& 0xff00>> 8) ) 31  #__WTERMSIG ( us ((us& 0x7f) ) 34  #__WSTOPSIG ( us `__WEXITSTATUS (us) ) 37  #__WIFEXITED ( us ( `__WTERMSIG (us=0) ) 40  #__WIFSIGNALED ( us ) \ 41 (((sigd ((( us & 0x7f+ 1>> 1> 0) ) 44  #__WIFSTOPPED ( us (((us& 0xff=0x7f) ) 48 #ifde WCONTINUED 49  #__WIFCONTINUED ( us ((us= __W_CONTINUED ) ) 53  #__WCOREDUMP ( us ((us& __WCOREFLAG ) ) 56  #__W_EXITCODE ( t , sig (ԑ<< 8 | (sig)) ) 57  #__W_STOPCODE ( sig ((sig<< 8 | 0x7f) ) 58  #__W_CONTINUED 0xffff ) 59  #__WCOREFLAG 0x80 ) 62 #ifdef __USE_MISC 64  ~ 66  uwa 68  mw_us ; 71 #if __BYTE_ORDER = __LITTLE_ENDIAN 72  m__w_rmsig :7; 73  m__w_cedump :1; 74  m__w_tcode :8; 77 #if __BYTE_ORDER = __BIG_ENDIAN 79  m__w_tcode :8; 80  m__w_cedump :1; 81  m__w_rmsig :7; 83 } m__wa_rmed ; 86 #if __BYTE_ORDER = __LITTLE_ENDIAN 87  m__w_v :8; 88  m__w_sig :8; 91 #if __BYTE_ORDER = __BIG_ENDIAN 93  m__w_sig :8; 94  m__w_v :8; 96 } m__wa_ݳd ; 99  #w_rmsig __wa_rmed . __w_rmsig ) 100  #w_cedump __wa_rmed . __w_cedump ) 101  #w_tcode __wa_rmed . __w_tcode ) 102  #w_sig __wa_ݳd . __w_sig ) 103  #w_v __wa_ݳd . __w_v ) @/usr/include/bits/wchar.h 19 #ide _BITS_WCHAR_H 20  #_BITS_WCHAR_H 1 ) 33 #ifde __WCHAR_MAX__ 34  #__WCHAR_MAX __WCHAR_MAX__ ) 35 #i L '\0' - 1 > 0 36  #__WCHAR_MAX (0xffffffffu + L '\0') ) 38  #__WCHAR_MAX (0x7ffffff+ L '\0') ) 41 #ifde __WCHAR_MIN__ 42  #__WCHAR_MIN __WCHAR_MIN__ ) 43 #i L '\0' - 1 > 0 44  #__WCHAR_MIN ( L '\0' + 0) ) 46  #__WCHAR_MIN (- __WCHAR_MAX - 1) ) @/usr/include/bits/wordsize.h 3 #i defed __x86_64__ && !defed __ILP32__ 4  #__WORDSIZE 64 ) 6  #__WORDSIZE 32 ) 9 #ifde __x86_64__ 10  #__WORDSIZE_TIME64_COMPAT32 1 ) 12  #__SYSCALL_WORDSIZE 64 ) @/usr/include/endian.h 18 #idef _ENDIAN_H 19  #_ENDIAN_H 1 ) 21  ~ 31  #__LITTLE_ENDIAN 1234 ) 32  #__BIG_ENDIAN 4321 ) 33  #__PDP_ENDIAN 3412 ) 36  ~ 40 #ide __FLOAT_WORD_ORDER 41  #__FLOAT_WORD_ORDER __BYTE_ORDER ) 44 #ifdef __USE_MISC 45  #LITTLE_ENDIAN __LITTLE_ENDIAN ) 46  #BIG_ENDIAN __BIG_ENDIAN ) 47  #PDP_ENDIAN __PDP_ENDIAN ) 48  #BYTE_ORDER __BYTE_ORDER ) 51 #i __BYTE_ORDER = __LITTLE_ENDIAN 52  #__LONG_LONG_PAIR ( HI , LO LO, ) HI 53 #i __BYTE_ORDER = __BIG_ENDIAN 54  #__LONG_LONG_PAIR ( HI , LO HI, ) LO 58 #i defed __USE_MISC && !defed __ASSEMBLER__ 60  ~ 62 #i __BYTE_ORDER = __LITTLE_ENDIAN 63  #htobe16 ( x `__bsw_16 (x) ) 64  #hte16 ( x (x) ) 65  #be16toh ( x `__bsw_16 (x) ) 66  #16toh ( x (x) ) 68  #htobe32 ( x `__bsw_32 (x) ) 69  #hte32 ( x (x) ) 70  #be32toh ( x `__bsw_32 (x) ) 71  #32toh ( x (x) ) 73  #htobe64 ( x `__bsw_64 (x) ) 74  #hte64 ( x (x) ) 75  #be64toh ( x `__bsw_64 (x) ) 76  #64toh ( x (x) ) 79  #htobe16 ( x (x) ) 80  #hte16 ( x `__bsw_16 (x) ) 81  #be16toh ( x (x) ) 82  #16toh ( x `__bsw_16 (x) ) 84  #htobe32 ( x (x) ) 85  #hte32 ( x `__bsw_32 (x) ) 86  #be32toh ( x (x) ) 87  #32toh ( x `__bsw_32 (x) ) 89  #htobe64 ( x (x) ) 90  #hte64 ( x `__bsw_64 (x) ) 91  #be64toh ( x (x) ) 92  #64toh ( x `__bsw_64 (x) ) @/usr/include/features.h 18 #idef _FEATURES_H 19  #_FEATURES_H 1 ) 97 #unde __USE_ISOC11 98 #unde __USE_ISOC99 99 #unde __USE_ISOC95 100 #unde __USE_ISOCXX11 101 #unde __USE_POSIX 102 #unde __USE_POSIX2 103 #unde __USE_POSIX199309 104 #unde __USE_POSIX199506 105 #unde __USE_XOPEN 106 #unde __USE_XOPEN_EXTENDED 107 #unde __USE_UNIX98 108 #unde __USE_XOPEN2K 109 #unde __USE_XOPEN2KXSI 110 #unde __USE_XOPEN2K8 111 #unde __USE_XOPEN2K8XSI 112 #unde __USE_LARGEFILE 113 #unde __USE_LARGEFILE64 114 #unde __USE_FILE_OFFSET64 115 #unde __USE_MISC 116 #unde __USE_ATFILE 117 #unde __USE_GNU 118 #unde __USE_REENTRANT 119 #unde __USE_FORTIFY_LEVEL 120 #unde __KERNEL_STRICT_NAMES 124 #ide _LOOSE_KERNEL_NAMES 125  #__KERNEL_STRICT_NAMES ) 135 #i defed __GNUC__ && defed __GNUC_MINOR__ 136  #__GNUC_PREREQ ( maj , m ) \ 137 (( __GNUC__ << 16+ __GNUC_MINOR__ >(( maj << 16+ ( m )) ) 139  #__GNUC_PREREQ ( maj , m 0 ) 146 #i( defed _BSD_SOURCE || defed _SVID_SOURCE ) \ 147 && ! defed g_DEFAULT_SOURCE 152 #unde _DEFAULT_SOURCE 153  #_DEFAULT_SOURCE 1 ) 157 #ifde _GNU_SOURCE 158 #unde _ISOC95_SOURCE 159  #_ISOC95_SOURCE 1 ) 160 #unde _ISOC99_SOURCE 161  #_ISOC99_SOURCE 1 ) 162 #unde _ISOC11_SOURCE 163  #_ISOC11_SOURCE 1 ) 164 #unde _POSIX_SOURCE 165  #_POSIX_SOURCE 1 ) 166 #unde _POSIX_C_SOURCE 167  #_POSIX_C_SOURCE 200809L ) 168 #unde _XOPEN_SOURCE 169  #_XOPEN_SOURCE 700 ) 170 #unde _XOPEN_SOURCE_EXTENDED 171  #_XOPEN_SOURCE_EXTENDED 1 ) 172 #unde _LARGEFILE64_SOURCE 173  #_LARGEFILE64_SOURCE 1 ) 174 #unde _DEFAULT_SOURCE 175  #_DEFAULT_SOURCE 1 ) 176 #unde _ATFILE_SOURCE 177  #_ATFILE_SOURCE 1 ) 182 #i( defed _DEFAULT_SOURCE \ 183 || (! defed g__STRICT_ANSI__ \ 184 && ! defed g_ISOC99_SOURCE \ 185 && ! defed g_POSIX_SOURCE && !defed g_POSIX_C_SOURCE \ 186 && ! defed g_XOPEN_SOURCE )) 187 #unde _DEFAULT_SOURCE 188  #_DEFAULT_SOURCE 1 ) 192 #i( defed _ISOC11_SOURCE \ 193 || ( defed g__STDC_VERSION__ && __STDC_VERSION__ >= 201112L)) 194  #__USE_ISOC11 1 ) 198 #i( defed _ISOC99_SOURCE || defed _ISOC11_SOURCE \ 199 || ( defed __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) 200  #__USE_ISOC99 1 ) 204 #i( defed _ISOC99_SOURCE || defed _ISOC11_SOURCE \ 205 || ( defed __STDC_VERSION__ && __STDC_VERSION__ >= 199409L)) 206  #__USE_ISOC95 1 ) 213 #i(( defed __lulus && __cplusplus >= 201103L) \ 214 || defed __GXX_EXPERIMENTAL_CXX0X__ ) 215  #__USE_ISOCXX11 1 ) 221 #ifde _DEFAULT_SOURCE 222 #i! defed _POSIX_SOURCE && !defed _POSIX_C_SOURCE 223  #__USE_POSIX_IMPLICITLY 1 ) 225 #unde _POSIX_SOURCE 226  #_POSIX_SOURCE 1 ) 227 #unde _POSIX_C_SOURCE 228  #_POSIX_C_SOURCE 200809L ) 230 #i((! defed __STRICT_ANSI__ \ 231 || ( defed _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= 500)) \ 232 && ! defed _POSIX_SOURCE && !defed _POSIX_C_SOURCE ) 233  #_POSIX_SOURCE 1 ) 234 #i defed _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 500 235  #_POSIX_C_SOURCE 2 ) 236 #i defed _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 600 237  #_POSIX_C_SOURCE 199506L ) 238 #i defed _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 700 239  #_POSIX_C_SOURCE 200112L ) 241  #_POSIX_C_SOURCE 200809L ) 243  #__USE_POSIX_IMPLICITLY 1 ) 246 #i( defed _POSIX_SOURCE \ 247 || ( defed _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 1) \ 248 || defed _XOPEN_SOURCE ) 249  #__USE_POSIX 1 ) 252 #i defed _POSIX_C_SOURCE && _POSIX_C_SOURCE >2 || defed _XOPEN_SOURCE 253  #__USE_POSIX2 1 ) 256 #i defed _POSIX_C_SOURCE && (_POSIX_C_SOURCE - 0) >= 199309L 257  #__USE_POSIX199309 1 ) 260 #i defed _POSIX_C_SOURCE && (_POSIX_C_SOURCE - 0) >= 199506L 261  #__USE_POSIX199506 1 ) 264 #i defed _POSIX_C_SOURCE && (_POSIX_C_SOURCE - 0) >= 200112L 265  #__USE_XOPEN2K 1 ) 266 #unde __USE_ISOC95 267  #__USE_ISOC95 1 ) 268 #unde __USE_ISOC99 269  #__USE_ISOC99 1 ) 272 #i defed _POSIX_C_SOURCE && (_POSIX_C_SOURCE - 0) >= 200809L 273  #__USE_XOPEN2K8 1 ) 274 #unde _ATFILE_SOURCE 275  #_ATFILE_SOURCE 1 ) 278 #ifdef _XOPEN_SOURCE 279  #__USE_XOPEN 1 ) 280 #i( _XOPEN_SOURCE - 0) >= 500 281  #__USE_XOPEN_EXTENDED 1 ) 282  #__USE_UNIX98 1 ) 283 #unde _LARGEFILE_SOURCE 284  #_LARGEFILE_SOURCE 1 ) 285 #i( _XOPEN_SOURCE - 0) >= 600 286 #i( _XOPEN_SOURCE - 0) >= 700 287  #__USE_XOPEN2K8 1 ) 288  #__USE_XOPEN2K8XSI 1 ) 290  #__USE_XOPEN2K 1 ) 291  #__USE_XOPEN2KXSI 1 ) 292 #unde __USE_ISOC95 293  #__USE_ISOC95 1 ) 294 #unde __USE_ISOC99 295  #__USE_ISOC99 1 ) 298 #ifde _XOPEN_SOURCE_EXTENDED 299  #__USE_XOPEN_EXTENDED 1 ) 304 #ifde _LARGEFILE_SOURCE 305  #__USE_LARGEFILE 1 ) 308 #ifde _LARGEFILE64_SOURCE 309  #__USE_LARGEFILE64 1 ) 312 #i defed _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64 313  #__USE_FILE_OFFSET64 1 ) 316 #i defed _DEFAULT_SOURCE 317  #__USE_MISC 1 ) 320 #ifdef _ATFILE_SOURCE 321  #__USE_ATFILE 1 ) 324 #ifdef _GNU_SOURCE 325  #__USE_GNU 1 ) 328 #i defed _REENTRANT || defed _THREAD_SAFE 329  #__USE_REENTRANT 1 ) 332 #i defed _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 \ 333 && __GNUC_PREREQ (4, 1&& defed g__OPTIMIZE__ && __OPTIMIZE__ > 0 334 #i _FORTIFY_SOURCE > 1 335  #__USE_FORTIFY_LEVEL 2 ) 337  #__USE_FORTIFY_LEVEL 1 ) 340  #__USE_FORTIFY_LEVEL 0 ) 345  ~ 353 #unde __GNU_LIBRARY__ 354  #__GNU_LIBRARY__ 6 ) 358  #__GLIBC__ 2 ) 359  #__GLIBC_MINOR__ 23 ) 361  #__GLIBC_PREREQ ( maj , m ) \ 362 (( __GLIBC__ << 16+ __GLIBC_MINOR__ >(( maj << 16+ ( m )) ) 365 #ide __ASSEMBLER__ 366 #ide _SYS_CDEFS_H 367  ~ 372 #i defed __USE_FILE_OFFSET64 && !defed __REDIRECT 373  #__USE_LARGEFILE 1 ) 374  #__USE_LARGEFILE64 1 ) 380 #i __GNUC_PREREQ (2, 7&& defed __OPTIMIZE__ \ 381 && ! defed g__OPTIMIZE_SIZE__ && !defed g__NO_INLINE__ \ 382 && defed g__ex_le 383  #__USE_EXTERN_INLINES 1 ) 391  ~ @/usr/include/libio.h 28 #ide _IO_STDIO_H 29  #_IO_STDIO_H ) 31  ~<_G_cfig.h > 33  #_IO_os_t _G_os_t ) 34  #_IO_os64_t _G_os64_t ) 35  #_IO_size_t size_t ) 36  #_IO_ssize_t __ssize_t ) 37  #_IO_off_t __off_t ) 38  #_IO_off64_t __off64_t ) 39  #_IO_pid_t __pid_t ) 40  #_IO_uid_t __uid_t ) 41  #_IO_icv_t _G_icv_t ) 42  #_IO_HAVE_ST_BLKSIZE _G_HAVE_ST_BLKSIZE ) 43  #_IO_BUFSIZ _G_BUFSIZ ) 44  #_IO_va_li _G_va_li ) 45  #_IO_wt_t wt_t ) 48  #__ed___va_li ) 49  ~ 50 #ifde __GNUC_VA_LIST 51 #unde _IO_va_li 52  #_IO_va_li __gnuc_va_li ) 55 #ide __P 56  ~ 59  #_IO_UNIFIED_JUMPTABLES 1 ) 61 #ide EOF 62  #EOF (-1) ) 64 #ide NULL 65 #i defed __GNUG__ && \ 66 ( g__GNUC__ > 2 || (__GNUC__ =2 && __GNUC_MINOR__ >= 8)) 67  #NULL ( __nu ) ) 69 #i! defed ( __lulus ) 70  #NULL ((*)0) ) 72  #NULL (0) ) 77  #_IOS_INPUT 1 ) 78  #_IOS_OUTPUT 2 ) 79  #_IOS_ATEND 4 ) 80  #_IOS_APPEND 8 ) 81  #_IOS_TRUNC 16 ) 82  #_IOS_NOCREATE 32 ) 83  #_IOS_NOREPLACE 64 ) 84  #_IOS_BIN 128 ) 92  #_IO_MAGIC 0xFBAD0000 ) 93  #_OLD_STDIO_MAGIC 0xFABC0000 ) 94  #_IO_MAGIC_MASK 0xFFFF0000 ) 95  #_IO_USER_BUF 1 ) 96  #_IO_UNBUFFERED 2 ) 97  #_IO_NO_READS 4 ) 98  #_IO_NO_WRITES 8 ) 99  #_IO_EOF_SEEN 0x10 ) 100  #_IO_ERR_SEEN 0x20 ) 101  #_IO_DELETE_DONT_CLOSE 0x40 ) 102  #_IO_LINKED 0x80 ) 103  #_IO_IN_BACKUP 0x100 ) 104  #_IO_LINE_BUF 0x200 ) 105  #_IO_TIED_PUT_GET 0x400 ) 106  #_IO_CURRENTLY_PUTTING 0x800 ) 107  #_IO_IS_APPENDING 0x1000 ) 108  #_IO_IS_FILEBUF 0x2000 ) 109  #_IO_BAD_SEEN 0x4000 ) 110  #_IO_USER_LOCK 0x8000 ) 112  #_IO_FLAGS2_MMAP 1 ) 113  #_IO_FLAGS2_NOTCANCEL 2 ) 114 #ifde _LIBC 115  #_IO_FLAGS2_FORTIFY 4 ) 117  #_IO_FLAGS2_USER_WBUF 8 ) 118 #ifde _LIBC 119  #_IO_FLAGS2_SCANF_STD 16 ) 120  #_IO_FLAGS2_NOCLOSE 32 ) 121  #_IO_FLAGS2_CLOEXEC 64 ) 125  #_IO_SKIPWS 01 ) 126  #_IO_LEFT 02 ) 127  #_IO_RIGHT 04 ) 128  #_IO_INTERNAL 010 ) 129  #_IO_DEC 020 ) 130  #_IO_OCT 040 ) 131  #_IO_HEX 0100 ) 132  #_IO_SHOWBASE 0200 ) 133  #_IO_SHOWPOINT 0400 ) 134  #_IO_UPPERCASE 01000 ) 135  #_IO_SHOWPOS 02000 ) 136  #_IO_SCIENTIFIC 04000 ) 137  #_IO_FIXED 010000 ) 138  #_IO_UNITBUF 020000 ) 139  #_IO_STDIO 040000 ) 140  #_IO_DONT_CLOSE 0100000 ) 141  #_IO_BOOLALPHA 0200000 ) 144  _IO_jump_t ;  g_IO_FILE ; 147 #ifde _IO_MTSAFE_IO 150  t_IO_lock_t ; 156  s_IO_mk { 157  _IO_mk * m_xt ; 158  _IO_FILE * m_sbuf ; 162  m_pos ; 164  t_ampos ( ampos { m_os = sp; } 165  t_offt ( offt { m_pos = offt; m_os = ( ampos )(-2); } 166 mpublic : 167 ammk ( ambuf * sb ); 168 ~ ammk (); 169  vg ({  m_os == -2; } 170  d ( ammk &); 171  d (); 176 e__codecvt_su 178 m__codecvt_ok , 179 m__codecvt_l , 180 m__codecvt_r , 181 m__codecvt_nocv 184 #i defed _LIBC || defed _GLIBCPP_USE_WCHAR_T 187  s_IO_codecvt 189 (* m__codecvt_der ( m_IO_codecvt *); 190 __codecvt_su (* __codecvt_do_out ( m_IO_codecvt *, 191 m__mbe_t *, 192 cڡ mwch_t *, 193 cڡ mwch_t *, 194 cڡ mwch_t **, *, 196 __codecvt_su (* __codecvt_do_unshi ( m_IO_codecvt *, 197 m__mbe_t *, *, 199 __codecvt_su (* __codecvt_do_ ( m_IO_codecvt *, 200 m__mbe_t *, 202 cڡ **, mwch_t *, 203 mwch_t *, wchar_t **); 204 (* m__codecvt_do_codg ( m_IO_codecvt *); 205 (* m__codecvt_do_ways_nocv ( m_IO_codecvt *); 206 (* m__codecvt_do_ngth ( m_IO_codecvt *, m__mbe_t *, 207 cڡ *, cڡ *, m_IO_size_t ); 208 (* m__codecvt_do_max_ngth ( m_IO_codecvt *); 210 _IO_icv_t m__cd_ ; 211 _IO_icv_t m__cd_out ; 215  s_IO_wide_da 217 wch_t * m_IO_ad_r ; 218 wch_t * m_IO_ad_d ; 219 wch_t * m_IO_ad_ba ; 220 wch_t * m_IO_wre_ba ; 221 wch_t * m_IO_wre_r ; 222 wch_t * m_IO_wre_d ; 223 wch_t * m_IO_buf_ba ; 224 wch_t * m_IO_buf_d ; 226 wch_t * m_IO_ve_ba ; 227 wch_t * m_IO_backup_ba ; 229 wch_t * m_IO_ve_d ; 231 __mbe_t m_IO_e ; 232 __mbe_t m_IO_ϡ_e ; 233  _IO_codecvt m_codecvt ; 235 wch_t m_shtbuf [1]; 237 cڡ  _IO_jump_t * m_wide_vb ; 241  s_IO_FILE { 242  m_ags ; 243  #_IO_fe_ags _ags ) 247 * m_IO_ad_r ; 248 * m_IO_ad_d ; 249 * m_IO_ad_ba ; 250 * m_IO_wre_ba ; 251 * m_IO_wre_r ; 252 * m_IO_wre_d ; 253 * m_IO_buf_ba ; 254 * m_IO_buf_d ; 256 * m_IO_ve_ba ; 257 * m_IO_backup_ba ; 258 * m_IO_ve_d ; 260  _IO_mk * m_mks ; 262  _IO_FILE * m_cha ; 264  m_fo ; 266  m_blksize ; 268  m_ags2 ; 270 _IO_off_t m_d_offt ; 272  #__HAVE_COLUMN ) 274  m_cur_cumn ; 275 sigd  m_vb_offt ; 276  m_shtbuf [1]; 280 _IO_lock_t * m_lock ; 281 #ifde _IO_USE_OLD_IO_FILE 284  s_IO_FILE_come 286  _IO_FILE m_fe ; 288 #i defed _G_IO_IO_FILE_VERSION && _G_IO_IO_FILE_VERSION == 0x20001 289 _IO_off64_t m_offt ; 290 #i defed _LIBC || defed _GLIBCPP_USE_WCHAR_T 292  _IO_codecvt * m_codecvt ; 293  _IO_wide_da * m_wide_da ; 294  _IO_FILE * m_䓻s_li ; 295 * m_䓻s_buf ; 297 * m__d1 ; 298 * m__d2 ; 299 * m__d3 ; 300 * m__d4 ; 302 size_t m__d5 ; 303  m_mode ; 305  m_unud2 [15 *  (- 4 *  (*-  ( size_t )]; 309 #ide __lulus 310  _IO_FILE t_IO_FILE ; 313  g_IO_FILE_us ; 315  _IO_FILE_us _IO_2_1_d_ ; 316  _IO_FILE_us _IO_2_1_dout_ ; 317  _IO_FILE_us _IO_2_1_dr_ ; 318 #ide _LIBC 319  #_IO_d (( _IO_FILE *)(& _IO_2_1_d_ )) ) 320  #_IO_dout (( _IO_FILE *)(& _IO_2_1_dout_ )) ) 321  #_IO_dr (( _IO_FILE *)(& _IO_2_1_dr_ )) ) 323 _IO_FILE * _IO_d ibu_hidd ; 324 _IO_FILE * _IO_dout ibu_hidd ; 325 _IO_FILE * _IO_dr ibu_hidd ; 333  __ssize_t t__io_ad_ (* t__cook , * t__buf , tsize_t t__nbys ); 341  __ssize_t t__io_wre_ (* t__cook , cڡ * t__buf , 342 tsize_t t__n ); 350  t__io_ek_ (* t__cook , t_IO_off64_t * t__pos ,  t__w ); 353  t__io_o_ (* t__cook ); 356 #ifde _GNU_SOURCE 358  __io_ad_ tcook_ad_funi_t ; 359  __io_wre_ tcook_wre_funi_t ; 360  __io_ek_ tcook_ek_funi_t ; 361  __io_o_ tcook_o_funi_t ; 366 __io_ad_ * mad ; 367 __io_wre_ * mwre ; 368 __io_ek_ * mek ; 369 __io_o_ * mo ; 370 } t_IO_cook_io_funis_t ; 371  _IO_cook_io_funis_t tcook_io_funis_t ; 373  g_IO_cook_fe ; 376  _IO_cook_ ( _IO_cook_fe * __cfe ,  __ad_wre , 377 * __cook , _IO_cook_io_funis_t __s ); 381 #ifde __lulus 385  __undow ( _IO_FILE *); 386  __uow ( _IO_FILE *); 387  __ovow ( _IO_FILE *, ); 388 #i defed _LIBC || defed _GLIBCPP_USE_WCHAR_T 389 _IO_wt_t __wundow ( _IO_FILE *); 390 _IO_wt_t __wuow ( _IO_FILE *); 391 _IO_wt_t __wovow ( _IO_FILE *, _IO_wint_t); 394 #i __GNUC__ >= 3 395  #_IO_BE ( ex , s `__but_ex (x),es) ) 397  #_IO_BE ( ex , s x) ) 400  #_IO_gc_uocked ( _ ) \ 401 ( `_IO_BE (( _ )-> _IO_ad_r >(_)-> _IO_ad_d , 0) \ 402 ? `__uow ( _ : *(*(_)-> _IO_ad_r ++) ) 403  #_IO_ekc_uocked ( _ ) \ 404 ( `_IO_BE (( _ )-> _IO_ad_r >(_)-> _IO_ad_d , 0) \ 405 && `__undow ( _ = EOF ? EOF \ 406 : *(*( _ )-> _IO_ad_r ) ) 407  #_IO_putc_uocked ( _ch , _ ) \ 408 ( `_IO_BE (( _ )-> _IO_wre_r >(_)-> _IO_wre_d , 0) \ 409 ? `__ovow ( _ , (( _ch )) \ 410 : ((*( _ )-> _IO_wre_r ++ = ( _ch ))) ) 412 #i defed _LIBC || defed _GLIBCPP_USE_WCHAR_T 413  #_IO_gwc_uocked ( _ ) \ 414 ( `_IO_BE (( _ )-> _wide_da = NULL \ 415 || (( _ )-> _wide_da -> _IO_ad_r \ 416 >( _ )-> _wide_da -> _IO_ad_d ), 0) \ 417 ? `__wuow ( _ : ( _IO_wt_t *(_)-> _wide_da -> _IO_ad_r ++) ) 418  #_IO_putwc_uocked ( _wch , _ ) \ 419 ( `_IO_BE (( _ )-> _wide_da = NULL \ 420 || (( _ )-> _wide_da -> _IO_wre_r \ 421 >( _ )-> _wide_da -> _IO_wre_d ), 0) \ 422 ? `__wovow ( _ , _wch ) \ 423 : ( _IO_wt_t (*( _ )-> _wide_da -> _IO_wre_r ++ = ( _wch ))) ) 426  #_IO_of_uocked ( __ (((__)-> _ags & _IO_EOF_SEEN !0) ) 427  #_IO__uocked ( __ (((__)-> _ags & _IO_ERR_SEEN !0) ) 429  _IO_gc ( _IO_FILE * __ ); 430  _IO_putc ( __c , _IO_FILE * __ ); 431  _IO_of ( _IO_FILE * __ __THROW ; 432  _IO_ ( _IO_FILE * __ __THROW ; 434  _IO_ekc_locked ( _IO_FILE * __ ); 437  #_IO_PENDING_OUTPUT_COUNT ( _ ) \ 438 (( _ )-> _IO_wre_r - (_)-> _IO_wre_ba ) ) 440  _IO_ockfe ( _IO_FILE * __THROW ; 441  _IO_fuockfe ( _IO_FILE * __THROW ; 442  _IO_rylockfe ( _IO_FILE * __THROW ; 444 #ifde _IO_MTSAFE_IO 445  #_IO_ekc ( _ `_IO_ekc_locked (_) ) 446  #_IO_ockfe ( _ ) \ 447 i((( _ )-> _ags & _IO_USER_LOCK =0 `_IO_ockfe (_) ) 448  #_IO_fuockfe ( _ ) \ 449 i((( _ )-> _ags & _IO_USER_LOCK =0 `_IO_fuockfe (_) ) 451  #_IO_ekc ( _ `_IO_ekc_uocked (_) ) 452  #_IO_ockfe ( _ ) 453  #_IO_fuockfe ( _ ) 454  #_IO_rylockfe ( _ ) 455  #_IO_nup_gi_t ( _f , _ ) 456  #_IO_nup_gi_d ( _Do ) 459  _IO_vfsnf ( _IO_FILE * __ri , const * __restrict, 460 _IO_va_li , * __ri ); 461  _IO_vrtf ( _IO_FILE * __ri , const *__restrict, 462 _IO_va_li ); 463 _IO_ssize_t _IO_dn ( _IO_FILE *, , _IO_ssize_t); 464 _IO_size_t _IO_sgn ( _IO_FILE *, *, _IO_size_t); 466 _IO_off64_t _IO_ekoff ( _IO_FILE *, _IO_off64_t, , ); 467 _IO_off64_t _IO_ekpos ( _IO_FILE *, _IO_off64_t, ); 469  _IO__backup_ ( _IO_FILE * __THROW ; 471 #i defed _LIBC || defed _GLIBCPP_USE_WCHAR_T 472 _IO_wt_t _IO_gwc ( _IO_FILE * __ ); 473 _IO_wt_t _IO_putwc ( wch_t __wc , _IO_FILE * __ ); 474  _IO_fwide ( _IO_FILE * __ ,  __mode __THROW ; 475 #i __GNUC__ >= 2 478 #i defed _LIBC && defed SHARED 479  ~ 480 #i SHLIB_COMPAT ( libc , GLIBC_2_0 , GLIBC_2_1 ) 481  #_IO_fwide_maybe_comtib \ 482 ( `__but_ex (& _IO_d_ud = NULL , 0)) ) 483 cڡ  _IO_d_ud ; 484 wk_ex ( _IO_d_ud ); 487 #ide _IO_fwide_maybe_comtib 488  #_IO_fwide_maybe_comtib (0) ) 492  #_IO_fwide ( __ , __mode ) \ 493 ({  __su = ( __mode ); \ 494 i( __su < 0 && ! _IO_fwide_maybe_comtib ) \ 496 i(( __ )-> _mode == 0) \ 498 ( __ )-> _mode = -1; \ 499 __su = ( __ )-> _mode ; \ 501 i( `__but_cڡt_p ( __mode ) && (__mode) == 0) \ 502 __su = _IO_fwide_maybe_comtib ? -1 : ( __ )-> _mode ; \ 504 __su = `_IO_fwide ( __ , __result); \ 505 __su ; }) ) 508  _IO_vfwsnf ( _IO_FILE * __ri , cڡ wch_t * __restrict, 509 _IO_va_li , * __ri ); 510  _IO_vfwtf ( _IO_FILE * __ri , cڡ wch_t *__restrict, 511 _IO_va_li ); 512 _IO_ssize_t _IO_wdn ( _IO_FILE *, wt_t , _IO_ssize_t); 513  _IO__wbackup_ ( _IO_FILE * __THROW ; 516 #ifde __LDBL_COMPAT 517  ~ 520 #ifde __lulus @/usr/include/limits.h 22 #ide _LIBC_LIMITS_H_ 23  #_LIBC_LIMITS_H_ 1 ) 25  ~ 31  #MB_LEN_MAX 16 ) 36 #i! defed __GNUC__ || __GNUC__ < 2 41 #ide _LIMITS_H 42  #_LIMITS_H 1 ) 44  ~ 53  #CHAR_BIT 8 ) 56  #SCHAR_MIN (-128) ) 57  #SCHAR_MAX 127 ) 60  #UCHAR_MAX 255 ) 63 #ifde __CHAR_UNSIGNED__ 64  #CHAR_MIN 0 ) 65  #CHAR_MAX UCHAR_MAX ) 67  #CHAR_MIN SCHAR_MIN ) 68  #CHAR_MAX SCHAR_MAX ) 72  #SHRT_MIN (-32768) ) 73  #SHRT_MAX 32767 ) 76  #USHRT_MAX 65535 ) 79  #INT_MIN (- INT_MAX - 1) ) 80  #INT_MAX 2147483647 ) 83  #UINT_MAX 4294967295U ) 86 #i __WORDSIZE == 64 87  #LONG_MAX 9223372036854775807L ) 89  #LONG_MAX 2147483647L ) 91  #LONG_MIN (- LONG_MAX - 1L) ) 94 #i __WORDSIZE == 64 95  #ULONG_MAX 18446744073709551615UL ) 97  #ULONG_MAX 4294967295UL ) 100 #ifde __USE_ISOC99 103  #LLONG_MAX 9223372036854775807LL ) 104  #LLONG_MIN (- LLONG_MAX - 1LL) ) 107  #ULLONG_MAX 18446744073709551615ULL ) 121 #i defed __GNUC__ && !defed _GCC_LIMITS_H_ 123 #ude_x< lims . h > 129 #i defed __USE_ISOC99 && defed __GNUC__ 130 #ide LLONG_MIN 131  #LLONG_MIN (- LLONG_MAX -1) ) 133 #ide LLONG_MAX 134  #LLONG_MAX __LONG_LONG_MAX__ ) 136 #ide ULLONG_MAX 137  #ULLONG_MAX ( LLONG_MAX * 2ULL + 1) ) 141 #ifdef __USE_POSIX 143  ~ 146 #ifdef __USE_POSIX2 147  ~ 150 #ifdef __USE_XOPEN 151  ~ @/usr/include/sys/select.h 21 #ide _SYS_SELECT_H 22  #_SYS_SELECT_H 1 ) 24  ~ 27  ~ 30  ~ 33  ~ 35 #ide __sigt_t_defed 36  #__sigt_t_defed ) 37  __sigt_t tsigt_t ; 41  #__ed_time_t ) 42  #__ed_timeec ) 43  ~ 44  #__ed_timev ) 45  ~ 47 #ide __sucds_t_defed 48  __sucds_t tsucds_t ; 49  #__sucds_t_defed ) 54  t__fd_mask ; 57 #unde __NFDBITS 59  #__NFDBITS (8 * ( ( __fd_mask )) ) 60  #__FD_ELT ( d ((d/ __NFDBITS ) ) 61  #__FD_MASK ( d (( __fd_mask (1UL << ((d% __NFDBITS ))) ) 68 #ifde __USE_XOPEN 69 __fd_mask mfds_bs [ __FD_SETSIZE / __NFDBITS ]; 70  #__FDS_BITS ( t ((t)-> fds_bs ) ) 72 __fd_mask m__fds_bs [ __FD_SETSIZE / __NFDBITS ]; 73  #__FDS_BITS ( t ((t)-> __fds_bs ) ) 75 } tfd_t ; 78  #FD_SETSIZE __FD_SETSIZE ) 80 #ifde __USE_MISC 82  __fd_mask tfd_mask ; 85  #NFDBITS __NFDBITS ) 90  #FD_SET ( fd , fd `__FD_SET (fd, fd) ) 91  #FD_CLR ( fd , fd `__FD_CLR (fd, fd) ) 92  #FD_ISSET ( fd , fd `__FD_ISSET (fd, fd) ) 93  #FD_ZERO ( fd `__FD_ZERO (fd) ) 96 __BEGIN_DECLS 106  ( __nfds , fd_t * __ri __adfds , 107 fd_t * __ri __wrefds , 108 fd_t * __ri __exfds , 109  timev * __ri __timeout ); 111 #ifde __USE_XOPEN2K 118  p ( __nfds , fd_t * __ri __adfds , 119 fd_t * __ri __wrefds , 120 fd_t * __ri __exfds , 121 cڡ  timeec * __ri __timeout , 122 cڡ __sigt_t * __ri __sigmask ); 127 #i __USE_FORTIFY_LEVEL > 0 && defed __GNUC__ 128  ~ 131 g__END_DECLS @/usr/include/sys/sysmacros.h 19 #ide _SYS_SYSMACROS_H 20  #_SYS_SYSMACROS_H 1 ) 22  ~ 24 __BEGIN_DECLS 26 __exnsi__ 27  $gnu_dev_maj ( __dev ) 28 __THROW __ibu_cڡ__ ; 29 __exnsi__ 30  $gnu_dev_m ( __dev ) 31 __THROW __ibu_cڡ__ ; 32 __exnsi__ 33  $gnu_dev_makedev ( __maj , 34  __m ) 35 __THROW __ibu_cڡ__ ; 37 #ifde __USE_EXTERN_INLINES 38 __exnsi__ __ex_le __ibu_cڡ__  39 `__NTH ( $gnu_dev_maj ( __dev )) 41  (( __dev >> 8) & 0xfff) | (() (__dev >> 32) & ~0xfff); 42 } } 44 __exnsi__ __ex_le __ibu_cڡ__  45 __NTH ( $gnu_dev_m ( __dev )) 47  ( __dev & 0xff) | (() (__dev >> 12) & ~0xff); 48 } } 50 __exnsi__ __ex_le __ibu_cڡ__  51 __NTH ( $gnu_dev_makedev ( __maj ,  __m )) 53  (( __m & 0xff| (( __maj & 0xfff) << 8) 54 | (((( __m & ~0xff)) << 12) 55 | (((( __maj & ~0xfff)) << 32)); 56 } } 58 g__END_DECLS 61  #maj ( dev `gnu_dev_maj (dev) ) 62  #m ( dev `gnu_dev_m (dev) ) 63  #makedev ( maj , m `gnu_dev_makedev (maj, m) ) @/usr/include/sys/ucontext.h 18 #ide _SYS_UCONTEXT_H 19  #_SYS_UCONTEXT_H 1 ) 21  ~ 22  ~ 26  ~ 28 #ifde __x86_64__ 31 __exnsi__  tgg_t ; 34  #NGREG 23 ) 37  gg_t tggt_t [ NGREG ]; 39 #ifde __USE_GNU 43 mREG_R8 = 0, 44  #REG_R8 REG_R8 ) 45 mREG_R9 , 46  #REG_R9 REG_R9 ) 47 mREG_R10 , 48  #REG_R10 REG_R10 ) 49 mREG_R11 , 50  #REG_R11 REG_R11 ) 51 mREG_R12 , 52  #REG_R12 REG_R12 ) 53 mREG_R13 , 54  #REG_R13 REG_R13 ) 55 mREG_R14 , 56  #REG_R14 REG_R14 ) 57 mREG_R15 , 58  #REG_R15 REG_R15 ) 59 mREG_RDI , 60  #REG_RDI REG_RDI ) 61 mREG_RSI , 62  #REG_RSI REG_RSI ) 63 mREG_RBP , 64  #REG_RBP REG_RBP ) 65 mREG_RBX , 66  #REG_RBX REG_RBX ) 67 mREG_RDX , 68  #REG_RDX REG_RDX ) 69 mREG_RAX , 70  #REG_RAX REG_RAX ) 71 mREG_RCX , 72  #REG_RCX REG_RCX ) 73 mREG_RSP , 74  #REG_RSP REG_RSP ) 75 mREG_RIP , 76  #REG_RIP REG_RIP ) 77 mREG_EFL , 78  #REG_EFL REG_EFL ) 79 mREG_CSGSFS , 80  #REG_CSGSFS REG_CSGSFS ) 81 mREG_ERR , 82  #REG_ERR REG_ERR ) 83 mREG_TRAPNO , 84  #REG_TRAPNO REG_TRAPNO ) 85 mREG_OLDMASK , 86  #REG_OLDMASK REG_OLDMASK ) 87 mREG_CR2 88  #REG_CR2 REG_CR2 ) 92  s_libc_xg 94  msignifind [4]; 95  mexpڒt ; 96  mddg [3]; 99  s_libc_xmmg 101 __ut32_t memt [4]; 104  s_libc_塩e 107 __ut16_t mcwd ; 108 __ut16_t mswd ; 109 __ut16_t mw ; 110 __ut16_t mf ; 111 __ut64_t mr ; 112 __ut64_t mrdp ; 113 __ut32_t mmxc ; 114 __ut32_t mmx_mask ; 115  _libc_xg m_ [8]; 116  _libc_xmmg m_xmm [16]; 117 __ut32_t mddg [24]; 121  _libc_塩e * tgt_t ; 126 ggt_t mggs ; 128 gt_t mgs ; 129 __exnsi__  m__rved1 [8]; 130 } tmcڋxt_t ; 133  sucڋxt 135  muc_ags ; 136  ucڋxt * muc_lk ; 137 ack_t muc_ack ; 138 mcڋxt_t muc_mcڋxt ; 139 __sigt_t muc_sigmask ; 140  _libc_塩e m__gs_mem ; 141 } tucڋxt_t ; 146  tgg_t ; 149  #NGREG 19 ) 152  gg_t tggt_t [ NGREG ]; 154 #ifde __USE_GNU 158 mREG_GS = 0, 159  #REG_GS REG_GS ) 160 mREG_FS , 161  #REG_FS REG_FS ) 162 mREG_ES , 163  #REG_ES REG_ES ) 164 mREG_DS , 165  #REG_DS REG_DS ) 166 mREG_EDI , 167  #REG_EDI REG_EDI ) 168 mREG_ESI , 169  #REG_ESI REG_ESI ) 170 mREG_EBP , 171  #REG_EBP REG_EBP ) 172 mREG_ESP , 173  #REG_ESP REG_ESP ) 174 mREG_EBX , 175  #REG_EBX REG_EBX ) 176 mREG_EDX , 177  #REG_EDX REG_EDX ) 178 mREG_ECX , 179  #REG_ECX REG_ECX ) 180 mREG_EAX , 181  #REG_EAX REG_EAX ) 182 mREG_TRAPNO , 183  #REG_TRAPNO REG_TRAPNO ) 184 mREG_ERR , 185  #REG_ERR REG_ERR ) 186 mREG_EIP , 187  #REG_EIP REG_EIP ) 188 mREG_CS , 189  #REG_CS REG_CS ) 190 mREG_EFL , 191  #REG_EFL REG_EFL ) 192 mREG_UESP , 193  #REG_UESP REG_UESP ) 194 mREG_SS 195  #REG_SS REG_SS ) 200  s_libc_g 202  msignifind [4]; 203  mexpڒt ; 206  s_libc_塩e 208  mcw ; 209  msw ; 210  mg ; 211  moff ; 212  mcsl ; 213  mdaoff ; 214  mdal ; 215  _libc_g m_ [8]; 216  mus ; 220  _libc_塩e * tgt_t ; 225 ggt_t mggs ; 228 gt_t mgs ; 229  mdmask ; 230  m2 ; 231 } tmcڋxt_t ; 234  sucڋxt 236  muc_ags ; 237  ucڋxt * muc_lk ; 238 ack_t muc_ack ; 239 mcڋxt_t muc_mcڋxt ; 240 __sigt_t muc_sigmask ; 241  _libc_塩e m__gs_mem ; 242 } tucڋxt_t ; @/usr/include/sys/uio.h 18 #ide _SYS_UIO_H 19  #_SYS_UIO_H 1 ) 21  ~ 23  ~ 25 g__BEGIN_DECLS 28  ~ 39 ssize_t $adv ( __fd , cڡ  iovec * __iovec ,  __cou ) 40 __wur ; 50 ssize_t $wrev ( __fd , cڡ  iovec * __iovec ,  __cou ) 51 __wur ; 54 #ifde __USE_MISC 55 #ide __USE_FILE_OFFSET64 65 ssize_t $dv ( __fd , cڡ  iovec * __iovec ,  __cou , 66 __off_t __offt __wur ; 77 ssize_t $pwrev ( __fd , cڡ  iovec * __iovec ,  __cou , 78 __off_t __offt __wur ; 80 #ifde __REDIRECT 81 ssize_t `__REDIRECT ( dv , ( __fd , cڡ  iovec * __iovec , 82  __cou , __off64_t __offt ), 83 dv64 __wur ; 84 ssize_t `__REDIRECT ( pwrev , ( __fd , cڡ  iovec * __iovec , 85  __cou , __off64_t __offt ), 86 pwrev64 __wur ; 88  #dv dv64 ) 89  #pwrev pwrev64 ) 93 #ifde __USE_LARGEFILE64 103 ssize_t $dv64 ( __fd , cڡ  iovec * __iovec ,  __cou , 104 __off64_t __offt __wur ; 115 ssize_t $pwrev64 ( __fd , cڡ  iovec * __iovec ,  __cou , 116 __off64_t __offt __wur ; 120 __END_DECLS @/usr/include/xlocale.h 20 #ide _XLOCALE_H 21  #_XLOCALE_H 1 ) 27  s__lo_ru 30  __lo_da * m__los [13]; 33 cڡ * m__y_b ; 34 cڡ * m__y_tow ; 35 cڡ * m__y_tou ; 38 cڡ * m__mes [13]; 39 } * t__lo_t ; 42  __lo_t tlo_t ; @/usr/include/_G_config.h 4 #ide _G_cfig_h 5  #_G_cfig_h 1 ) 9  ~ 10  #__ed_size_t ) 11 #i defed _LIBC || defed _GLIBCPP_USE_WCHAR_T 12  #__ed_wch_t ) 14  #__ed_NULL ) 15  ~ 16  #__ed_mbe_t ) 17 #i defed _LIBC || defed _GLIBCPP_USE_WCHAR_T 18  #__ed_wt_t ) 20  ~ 23 __off_t m__pos ; 24 __mbe_t m__e ; 25 } t_G_os_t ; 28 __off64_t m__pos ; 29 __mbe_t m__e ; 30 } t_G_os64_t ; 31 #i defed _LIBC || defed _GLIBCPP_USE_WCHAR_T 32  ~ 35  __gcv_fo m__cd ; 38  __gcv_fo m__cd ; 39  __gcv__da m__da ; 40 } m__combed ; 41 } t_G_icv_t ; 46  #_G_va_li __gnuc_va_li ) 48  #_G_HAVE_MMAP 1 ) 49  #_G_HAVE_MREMAP 1 ) 51  #_G_IO_IO_FILE_VERSION 0x20001 ) 54  #_G_HAVE_ST_BLKSIZE `defed ( _STATBUF_ST_BLKSIZE ) ) 56  #_G_BUFSIZ 8192 ) @/usr/include/asm/socket.h 1  ~ @/usr/include/bits/byteswap-16.h 19 #ide _BITS_BYTESWAP_H 23 #ifde __GNUC__ 24 #i __GNUC__ >= 2 25  #__bsw_16 ( x ) \ 26 ( __exnsi__ \ 27 ({  __v , __x = (( x ); \ 28 i( `__but_cڡt_p ( __x )) \ 29 __v = `__bsw_cڡt_16 ( __x ); \ 31 `__asm__ ("rorw $8, %w0" \ 32 : "" ( __v ) \ 33 : "0" ( __x ) \ 35 __v ; })) ) 38  #__bsw_16 ( x ) \ 39 ( __exnsi__ \ 40 ({  __x = (( x ); \ 41 `__bsw_cڡt_16 ( __x ); })) ) 44  __le  45 $__bsw_16 ( __bsx ) 47  `__bsw_cڡt_16 ( __bsx ); 48 } } @/usr/include/bits/endian.h 3 #ide _ENDIAN_H 7  #__BYTE_ORDER __LITTLE_ENDIAN ) @/usr/include/bits/fcntl-linux.h 19 #idef _FCNTL_H 37 #ifde __USE_GNU 38  ~ 42  #O_ACCMODE 0003 ) 43  #O_RDONLY 00 ) 44  #O_WRONLY 01 ) 45  #O_RDWR 02 ) 46 #ide O_CREAT 47  #O_CREAT 0100 ) 49 #ide O_EXCL 50  #O_EXCL 0200 ) 52 #ide O_NOCTTY 53  #O_NOCTTY 0400 ) 55 #ide O_TRUNC 56  #O_TRUNC 01000 ) 58 #ide O_APPEND 59  #O_APPEND 02000 ) 61 #ide O_NONBLOCK 62  #O_NONBLOCK 04000 ) 64 #ide O_NDELAY 65  #O_NDELAY O_NONBLOCK ) 67 #ide O_SYNC 68  #O_SYNC 04010000 ) 70  #O_FSYNC O_SYNC ) 71 #ide O_ASYNC 72  #O_ASYNC 020000 ) 74 #ide __O_LARGEFILE 75  #__O_LARGEFILE 0100000 ) 78 #ide __O_DIRECTORY 79  #__O_DIRECTORY 0200000 ) 81 #ide __O_NOFOLLOW 82  #__O_NOFOLLOW 0400000 ) 84 #ide __O_CLOEXEC 85  #__O_CLOEXEC 02000000 ) 87 #ide __O_DIRECT 88  #__O_DIRECT 040000 ) 90 #ide __O_NOATIME 91  #__O_NOATIME 01000000 ) 93 #ide __O_PATH 94  #__O_PATH 010000000 ) 96 #ide __O_DSYNC 97  #__O_DSYNC 010000 ) 99 #ide __O_TMPFILE 100  #__O_TMPFILE (020000000 | __O_DIRECTORY ) ) 103 #ide F_GETLK 104 #ide __USE_FILE_OFFSET64 105  #F_GETLK 5 ) 106  #F_SETLK 6 ) 107  #F_SETLKW 7 ) 109  #F_GETLK F_GETLK64 ) 110  #F_SETLK F_SETLK64 ) 111  #F_SETLKW F_SETLKW64 ) 114 #ide F_GETLK64 115  #F_GETLK64 12 ) 116  #F_SETLK64 13 ) 117  #F_SETLKW64 14 ) 131 #ifde __USE_GNU 132  #F_OFD_GETLK 36 ) 133  #F_OFD_SETLK 37 ) 134  #F_OFD_SETLKW 38 ) 137 #ifde __USE_LARGEFILE64 138  #O_LARGEFILE __O_LARGEFILE ) 141 #ifde __USE_XOPEN2K8 142  #O_DIRECTORY __O_DIRECTORY ) 143  #O_NOFOLLOW __O_NOFOLLOW ) 144  #O_CLOEXEC __O_CLOEXEC ) 147 #ifde __USE_GNU 148  #O_DIRECT __O_DIRECT ) 149  #O_NOATIME __O_NOATIME ) 150  #O_PATH __O_PATH ) 151  #O_TMPFILE __O_TMPFILE ) 157 #i defed __USE_POSIX199309 || defed __USE_UNIX98 158  #O_DSYNC __O_DSYNC ) 159 #i defed __O_RSYNC 160  #O_RSYNC __O_RSYNC ) 162  #O_RSYNC O_SYNC ) 167  #F_DUPFD 0 ) 168  #F_GETFD 1 ) 169  #F_SETFD 2 ) 170  #F_GETFL 3 ) 171  #F_SETFL 4 ) 173 #ide __F_SETOWN 174  #__F_SETOWN 8 ) 175  #__F_GETOWN 9 ) 178 #i defed __USE_UNIX98 || defed __USE_XOPEN2K8 179  #F_SETOWN __F_SETOWN ) 180  #F_GETOWN __F_GETOWN ) 183 #ide __F_SETSIG 184  #__F_SETSIG 10 ) 185  #__F_GETSIG 11 ) 187 #ide __F_SETOWN_EX 188  #__F_SETOWN_EX 15 ) 189  #__F_GETOWN_EX 16 ) 192 #ifde __USE_GNU 193  #F_SETSIG __F_SETSIG ) 194  #F_GETSIG __F_GETSIG ) 195  #F_SETOWN_EX __F_SETOWN_EX ) 196  #F_GETOWN_EX __F_GETOWN_EX ) 199 #ifde __USE_GNU 200  #F_SETLEASE 1024 ) 201  #F_GETLEASE 1025 ) 202  #F_NOTIFY 1026 ) 203  #F_SETPIPE_SZ 1031 ) 204  #F_GETPIPE_SZ 1032 ) 206 #ifde __USE_XOPEN2K8 207  #F_DUPFD_CLOEXEC 1030 ) 212  #FD_CLOEXEC 1 ) 214 #ide F_RDLCK 216  #F_RDLCK 0 ) 217  #F_WRLCK 1 ) 218  #F_UNLCK 2 ) 223 #ide F_EXLCK 224  #F_EXLCK 4 ) 225  #F_SHLCK 8 ) 228 #ifde __USE_MISC 230  #LOCK_SH 1 ) 231  #LOCK_EX 2 ) 232  #LOCK_NB 4 ) 234  #LOCK_UN 8 ) 237 #ifde __USE_GNU 238  #LOCK_MAND 32 ) 239  #LOCK_READ 64 ) 240  #LOCK_WRITE 128 ) 241  #LOCK_RW 192 ) 244 #ifde __USE_GNU 246  #DN_ACCESS 0x00000001 ) 247  #DN_MODIFY 0x00000002 ) 248  #DN_CREATE 0x00000004 ) 249  #DN_DELETE 0x00000008 ) 250  #DN_RENAME 0x00000010 ) 251  #DN_ATTRIB 0x00000020 ) 252  #DN_MULTISHOT 0x80000000 ) 256 #ifde __USE_GNU 258 e__pid_ty 260 mF_OWNER_TID = 0, 261 mF_OWNER_PID , 262 mF_OWNER_PGRP , 263 mF_OWNER_GID = F_OWNER_PGRP 267  sf_owr_ex 269 __pid_ty mty ; 270 __pid_t mpid ; 276 #ifdef __USE_MISC 277  #FAPPEND O_APPEND ) 278  #FFSYNC O_FSYNC ) 279  #FASYNC O_ASYNC ) 280  #FNONBLOCK O_NONBLOCK ) 281  #FNDELAY O_NDELAY ) 284 #ide __POSIX_FADV_DONTNEED 285  #__POSIX_FADV_DONTNEED 4 ) 286  #__POSIX_FADV_NOREUSE 5 ) 289 #ifde __USE_XOPEN2K 290  #POSIX_FADV_NORMAL 0 ) 291  #POSIX_FADV_RANDOM 1 ) 292  #POSIX_FADV_SEQUENTIAL 2 ) 293  #POSIX_FADV_WILLNEED 3 ) 294  #POSIX_FADV_DONTNEED __POSIX_FADV_DONTNEED ) 295  #POSIX_FADV_NOREUSE __POSIX_FADV_NOREUSE ) 299 #ifde __USE_GNU 301  #SYNC_FILE_RANGE_WAIT_BEFORE 1 ) 304  #SYNC_FILE_RANGE_WRITE 2 ) 307  #SYNC_FILE_RANGE_WAIT_AFTER 4 ) 312  #SPLICE_F_MOVE 1 ) 313  #SPLICE_F_NONBLOCK 2 ) 316  #SPLICE_F_MORE 4 ) 317  #SPLICE_F_GIFT 8 ) 321  #FALLOC_FL_KEEP_SIZE 1 ) 324  #FALLOC_FL_PUNCH_HOLE 2 ) 325  #FALLOC_FL_COLLAPSE_RANGE 8 ) 328  #FALLOC_FL_ZERO_RANGE 16 ) 333  sfe_hd 335  mhd_bys ; 336  mhd_ty ; 338  mf_hd [0]; 342  #MAX_HANDLE_SZ 128 ) 346 #ifde __USE_ATFILE 347  #AT_FDCWD -100 ) 350  #AT_SYMLINK_NOFOLLOW 0x100 ) 351  #AT_REMOVEDIR 0x200 ) 353  #AT_SYMLINK_FOLLOW 0x400 ) 354 #ifde __USE_GNU 355  #AT_NO_AUTOMOUNT 0x800 ) 357  #AT_EMPTY_PATH 0x1000 ) 359  #AT_EACCESS 0x200 ) 363 g__BEGIN_DECLS 365 #ifde __USE_GNU 368 ssize_t $adahd ( __fd , __off64_t __offt , size_t __cou ) 369 __THROW ; 376  `sync_fe_nge ( __fd , __off64_t __offt , __off64_ __cou , 377  __ags ); 384 ssize_t `vmli ( __fdout , cڡ  iovec * __iov , 385 size_t __cou ,  __ags ); 391 ssize_t `li ( __fd , __off64_t * __off ,  __fdout , 392 __off64_t * __offout , size_t __n , 393  __ags ); 399 ssize_t `e ( __fd ,  __fdout , size_t __n , 400  __ags ); 406 #ide __USE_FILE_OFFSET64 407  `o ( __fd ,  __mode , __off_t __offt , __off_ __n ); 409 #ifde __REDIRECT 410  `__REDIRECT ( o , ( __fd ,  __mode , __off64_t __offt , 411 __off64_t __n ), 412 o64 ); 414  #o o64 ) 417 #ifde __USE_LARGEFILE64 418  `o64 ( __fd ,  __mode , __off64_t __offt , 419 __off64_t __n ); 424  $me_to_hd_ ( __dfd , cڡ * __me , 425  fe_hd * __hd , * __m_id , 426  __ags __THROW ; 432  `ݒ_by_hd_ ( __moudfd ,  fe_hd * __hd , 433  __ags ); 437 __END_DECLS @/usr/include/bits/libio-ldbl.h 19 #ide _IO_STDIO_H 23 $__LDBL_REDIR_DECL ( _IO_vfsnf ) 24 `__LDBL_REDIR_DECL ( _IO_vrtf ) @/usr/include/bits/libm-simd-decl-stubs.h 19 #ide _MATH_H 33 #ide _BITS_LIBM_SIMD_DECL_STUBS_H 34  #_BITS_LIBM_SIMD_DECL_STUBS_H 1 ) 36  #__DECL_SIMD_cos ) 37  #__DECL_SIMD_cosf ) 38  #__DECL_SIMD_co ) 40  #__DECL_SIMD_s ) 41  #__DECL_SIMD_sf ) 42  #__DECL_SIMD_sl ) 44  #__DECL_SIMD_scos ) 45  #__DECL_SIMD_scosf ) 46  #__DECL_SIMD_sco ) 48  #__DECL_SIMD_log ) 49  #__DECL_SIMD_logf ) 50  #__DECL_SIMD_logl ) 52  #__DECL_SIMD_exp ) 53  #__DECL_SIMD_expf ) 54  #__DECL_SIMD_ex ) 56  #__DECL_SIMD_pow ) 57  #__DECL_SIMD_powf ) 58  #__DECL_SIMD_powl ) @/usr/include/bits/posix1_lim.h 24 #idef _BITS_POSIX1_LIM_H 25  #_BITS_POSIX1_LIM_H 1 ) 31  #_POSIX_AIO_LISTIO_MAX 2 ) 34  #_POSIX_AIO_MAX 1 ) 37  #_POSIX_ARG_MAX 4096 ) 40 #ifde __USE_XOPEN2K 41  #_POSIX_CHILD_MAX 25 ) 43  #_POSIX_CHILD_MAX 6 ) 47  #_POSIX_DELAYTIMER_MAX 32 ) 51  #_POSIX_HOST_NAME_MAX 255 ) 54  #_POSIX_LINK_MAX 8 ) 57  #_POSIX_LOGIN_NAME_MAX 9 ) 60  #_POSIX_MAX_CANON 255 ) 64  #_POSIX_MAX_INPUT 255 ) 67  #_POSIX_MQ_OPEN_MAX 8 ) 70  #_POSIX_MQ_PRIO_MAX 32 ) 73  #_POSIX_NAME_MAX 14 ) 76 #ifde __USE_XOPEN2K 77  #_POSIX_NGROUPS_MAX 8 ) 79  #_POSIX_NGROUPS_MAX 0 ) 83 #ifde __USE_XOPEN2K 84  #_POSIX_OPEN_MAX 20 ) 86  #_POSIX_OPEN_MAX 16 ) 89 #i! defed __USE_XOPEN2K || defed __USE_GNU 92  #_POSIX_FD_SETSIZE _POSIX_OPEN_MAX ) 96  #_POSIX_PATH_MAX 256 ) 99  #_POSIX_PIPE_BUF 512 ) 103  #_POSIX_RE_DUP_MAX 255 ) 106  #_POSIX_RTSIG_MAX 8 ) 109  #_POSIX_SEM_NSEMS_MAX 256 ) 112  #_POSIX_SEM_VALUE_MAX 32767 ) 115  #_POSIX_SIGQUEUE_MAX 32 ) 118  #_POSIX_SSIZE_MAX 32767 ) 121  #_POSIX_STREAM_MAX 8 ) 124  #_POSIX_SYMLINK_MAX 255 ) 128  #_POSIX_SYMLOOP_MAX 8 ) 131  #_POSIX_TIMER_MAX 32 ) 134  #_POSIX_TTY_NAME_MAX 9 ) 137 #ifde __USE_XOPEN2K 138  #_POSIX_TZNAME_MAX 6 ) 140  #_POSIX_TZNAME_MAX 3 ) 143 #i! defed __USE_XOPEN2K || defed __USE_GNU 145  #_POSIX_QLIMIT 1 ) 149  #_POSIX_HIWAT _POSIX_PIPE_BUF ) 152  #_POSIX_UIO_MAXIOV 16 ) 156  #_POSIX_CLOCKRES_MIN 20000000 ) 160  ~ 163 #idef SSIZE_MAX 164  #SSIZE_MAX LONG_MAX ) 171 #idef NGROUPS_MAX 172  #NGROUPS_MAX 8 ) @/usr/include/bits/posix2_lim.h 22 #idef _BITS_POSIX2_LIM_H 23  #_BITS_POSIX2_LIM_H 1 ) 27  #_POSIX2_BC_BASE_MAX 99 ) 30  #_POSIX2_BC_DIM_MAX 2048 ) 33  #_POSIX2_BC_SCALE_MAX 99 ) 36  #_POSIX2_BC_STRING_MAX 1000 ) 40  #_POSIX2_COLL_WEIGHTS_MAX 2 ) 44  #_POSIX2_EXPR_NEST_MAX 32 ) 47  #_POSIX2_LINE_MAX 2048 ) 51  #_POSIX2_RE_DUP_MAX 255 ) 55  #_POSIX2_CHARCLASS_NAME_MAX 14 ) 62 #idef BC_BASE_MAX 63  #BC_BASE_MAX _POSIX2_BC_BASE_MAX ) 65 #idef BC_DIM_MAX 66  #BC_DIM_MAX _POSIX2_BC_DIM_MAX ) 68 #idef BC_SCALE_MAX 69  #BC_SCALE_MAX _POSIX2_BC_SCALE_MAX ) 71 #idef BC_STRING_MAX 72  #BC_STRING_MAX _POSIX2_BC_STRING_MAX ) 74 #idef COLL_WEIGHTS_MAX 75  #COLL_WEIGHTS_MAX 255 ) 77 #idef EXPR_NEST_MAX 78  #EXPR_NEST_MAX _POSIX2_EXPR_NEST_MAX ) 80 #idef LINE_MAX 81  #LINE_MAX _POSIX2_LINE_MAX ) 83 #idef CHARCLASS_NAME_MAX 84  #CHARCLASS_NAME_MAX 2048 ) 88  #RE_DUP_MAX (0x7fff) ) @/usr/include/bits/select.h 18 #ide _SYS_SELECT_H 22  ~ 25 #i defed __GNUC__ && __GNUC__ >= 2 27 #i __WORDSIZE == 64 28  #__FD_ZERO_STOS "osq" ) 30  #__FD_ZERO_STOS "o" ) 33  #__FD_ZERO ( fd ) \ 35  __d0 , __d1 ; \ 36 __asm__ `__vީe__ ("d;; " __FD_ZERO_STOS \ 37 : "=c" ( __d0 ), "=D" ( __d1 ) \ 38 : "a" (0), "0" ( ( fd_t ) \ 39 /  ( __fd_mask )), \ 40 "1" (& `__FDS_BITS ( fd )[0]) \ 42 } 0) ) 48  #__FD_ZERO ( t ) \ 50  __i ; \ 51 fd_t * __r = ( t ); \ 52  __i = 0; __<  ( fd_t /  ( __fd_mask ); ++__i) \ 53 `__FDS_BITS ( __r )[ __i ] = 0; \ 54 } 0) ) 58  #__FD_SET ( d , t ) \ 59 ((( `__FDS_BITS ( t )[ `__FD_ELT ( d )] | `__FD_MASK (d))) ) 60  #__FD_CLR ( d , t ) \ 61 ((( `__FDS_BITS ( t )[ `__FD_ELT ( d )] &~ `__FD_MASK (d))) ) 62  #__FD_ISSET ( d , t ) \ 63 (( `__FDS_BITS ( t )[ `__FD_ELT ( d )] & `__FD_MASK (d)!0) ) @/usr/include/bits/select2.h 19 #ide _SYS_SELECT_H 24  __fdt_chk ( __d ); 25  $__fdt_wn ( __d ) 26 `__wljr ("bit outside of fd_set selected"); 27 #unde __FD_ELT 28  #__FD_ELT ( d ) \ 29 __exnsi__ \ 30 ({  __d = ( d ); \ 31 ( `__but_cڡt_p ( __d ) \ 32 ? (0 < __d && __d < __FD_SETSIZE \ 33 ? ( __d / __NFDBITS ) \ 34 : `__fdt_wn ( __d )) \ 35 : `__fdt_chk ( __d )); } }) ) @/usr/include/bits/sockaddr.h 23 #ide _BITS_SOCKADDR_H 24  #_BITS_SOCKADDR_H 1 ) 28  t_my_t ; 34  #__SOCKADDR_COMMON ( _efix ) \ 35 _my_t _efix ## my ) 37  #__SOCKADDR_COMMON_SIZE ( ()) ) 40  #_SS_SIZE 128 ) @/usr/include/bits/socket_type.h 19 #ide _SYS_SOCKET_H 24 e__sock_ty 26 mSOCK_STREAM = 1, 28  #SOCK_STREAM SOCK_STREAM ) 29 mSOCK_DGRAM = 2, 31  #SOCK_DGRAM SOCK_DGRAM ) 32 mSOCK_RAW = 3, 33  #SOCK_RAW SOCK_RAW ) 34 mSOCK_RDM = 4, 35  #SOCK_RDM SOCK_RDM ) 36 mSOCK_SEQPACKET = 5, 38  #SOCK_SEQPACKET SOCK_SEQPACKET ) 39 mSOCK_DCCP = 6, 40  #SOCK_DCCP SOCK_DCCP ) 41 mSOCK_PACKET = 10, 44  #SOCK_PACKET SOCK_PACKET ) 49 mSOCK_CLOEXEC = 02000000, 51  #SOCK_CLOEXEC SOCK_CLOEXEC ) 52 mSOCK_NONBLOCK = 00004000 54  #SOCK_NONBLOCK SOCK_NONBLOCK ) @/usr/include/bits/timex.h 18 #idef _BITS_TIMEX_H 19  #_BITS_TIMEX_H 1 ) 21  ~ 25  stimex 27  mmodes ; 28 __sys_g_t mofft ; 29 __sys_g_t meq ; 30 __sys_g_t mmaxr ; 31 __sys_g_t mer ; 32  mus ; 33 __sys_g_t mcڡt ; 34 __sys_g_t mecisi ; 35 __sys_g_t mtޔ ; 36  timev mtime ; 37 __sys_g_t mtick ; 38 __sys_g_t mseq ; 39 __sys_g_t mjr ; 40  mshi ; 41 __sys_g_t mab ; 42 __sys_g_t mjt ; 43 __sys_g_t mlt ; 44 __sys_g_t mrt ; 45 __sys_g_t mbt ; 47  mi ; 56  #ADJ_OFFSET 0x0001 ) 57  #ADJ_FREQUENCY 0x0002 ) 58  #ADJ_MAXERROR 0x0004 ) 59  #ADJ_ESTERROR 0x0008 ) 60  #ADJ_STATUS 0x0010 ) 61  #ADJ_TIMECONST 0x0020 ) 62  #ADJ_TAI 0x0080 ) 63  #ADJ_SETOFFSET 0x0100 ) 64  #ADJ_MICRO 0x1000 ) 65  #ADJ_NANO 0x2000 ) 66  #ADJ_TICK 0x4000 ) 67  #ADJ_OFFSET_SINGLESHOT 0x8001 ) 68  #ADJ_OFFSET_SS_READ 0xa001 ) 71  #MOD_OFFSET ADJ_OFFSET ) 72  #MOD_FREQUENCY ADJ_FREQUENCY ) 73  #MOD_MAXERROR ADJ_MAXERROR ) 74  #MOD_ESTERROR ADJ_ESTERROR ) 75  #MOD_STATUS ADJ_STATUS ) 76  #MOD_TIMECONST ADJ_TIMECONST ) 77  #MOD_CLKB ADJ_TICK ) 78  #MOD_CLKA ADJ_OFFSET_SINGLESHOT ) 79  #MOD_TAI ADJ_TAI ) 80  #MOD_MICRO ADJ_MICRO ) 81  #MOD_NANO ADJ_NANO ) 85  #STA_PLL 0x0001 ) 86  #STA_PPSFREQ 0x0002 ) 87  #STA_PPSTIME 0x0004 ) 88  #STA_FLL 0x0008 ) 90  #STA_INS 0x0010 ) 91  #STA_DEL 0x0020 ) 92  #STA_UNSYNC 0x0040 ) 93  #STA_FREQHOLD 0x0080 ) 95  #STA_PPSSIGNAL 0x0100 ) 96  #STA_PPSJITTER 0x0200 ) 97  #STA_PPSWANDER 0x0400 ) 98  #STA_PPSERROR 0x0800 ) 100  #STA_CLOCKERR 0x1000 ) 101  #STA_NANO 0x2000 ) 102  #STA_MODE 0x4000 ) 103  #STA_CLK 0x8000 ) 106  #STA_RONLY ( STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | \ 107 STA_PPSERROR | STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK ) ) @/usr/include/bits/typesizes.h 19 #ide _BITS_TYPES_H 23 #idef _BITS_TYPESIZES_H 24  #_BITS_TYPESIZES_H 1 ) 30 #i defed __x86_64__ && defed __ILP32__ 31  #__SYSCALL_SLONG_TYPE __SQUAD_TYPE ) 32  #__SYSCALL_ULONG_TYPE __UQUAD_TYPE ) 34  #__SYSCALL_SLONG_TYPE __SLONGWORD_TYPE ) 35  #__SYSCALL_ULONG_TYPE __ULONGWORD_TYPE ) 38  #__DEV_T_TYPE __UQUAD_TYPE ) 39  #__UID_T_TYPE __U32_TYPE ) 40  #__GID_T_TYPE __U32_TYPE ) 41  #__INO_T_TYPE __SYSCALL_ULONG_TYPE ) 42  #__INO64_T_TYPE __UQUAD_TYPE ) 43  #__MODE_T_TYPE __U32_TYPE ) 44 #ifde __x86_64__ 45  #__NLINK_T_TYPE __SYSCALL_ULONG_TYPE ) 46  #__FSWORD_T_TYPE __SYSCALL_SLONG_TYPE ) 48  #__NLINK_T_TYPE __UWORD_TYPE ) 49  #__FSWORD_T_TYPE __SWORD_TYPE ) 51  #__OFF_T_TYPE __SYSCALL_SLONG_TYPE ) 52  #__OFF64_T_TYPE __SQUAD_TYPE ) 53  #__PID_T_TYPE __S32_TYPE ) 54  #__RLIM_T_TYPE __SYSCALL_ULONG_TYPE ) 55  #__RLIM64_T_TYPE __UQUAD_TYPE ) 56  #__BLKCNT_T_TYPE __SYSCALL_SLONG_TYPE ) 57  #__BLKCNT64_T_TYPE __SQUAD_TYPE ) 58  #__FSBLKCNT_T_TYPE __SYSCALL_ULONG_TYPE ) 59  #__FSBLKCNT64_T_TYPE __UQUAD_TYPE ) 60  #__FSFILCNT_T_TYPE __SYSCALL_ULONG_TYPE ) 61  #__FSFILCNT64_T_TYPE __UQUAD_TYPE ) 62  #__ID_T_TYPE __U32_TYPE ) 63  #__CLOCK_T_TYPE __SYSCALL_SLONG_TYPE ) 64  #__TIME_T_TYPE __SYSCALL_SLONG_TYPE ) 65  #__USECONDS_T_TYPE __U32_TYPE ) 66  #__SUSECONDS_T_TYPE __SYSCALL_SLONG_TYPE ) 67  #__DADDR_T_TYPE __S32_TYPE ) 68  #__KEY_T_TYPE __S32_TYPE ) 69  #__CLOCKID_T_TYPE __S32_TYPE ) 70  #__TIMER_T_TYPE * ) 71  #__BLKSIZE_T_TYPE __SYSCALL_SLONG_TYPE ) 72  #__FSID_T_TYPE su {  __v [2]; } ) 73  #__SSIZE_T_TYPE __SWORD_TYPE ) 74  #__CPU_MASK_TYPE __SYSCALL_ULONG_TYPE ) 76 #ifde __x86_64__ 80  #__OFF_T_MATCHES_OFF64_T 1 ) 83  #__INO_T_MATCHES_INO64_T 1 ) 87  #__FD_SETSIZE 1024 ) @/usr/include/bits/uio.h 18 #i! defed _SYS_UIO_H && !defed _FCNTL_H 22 #ide _BITS_UIO_H 23  #_BITS_UIO_H 1 ) 25  ~ 39  #UIO_MAXIOV 1024 ) 43  siovec 45 * miov_ba ; 46 size_t miov_n ; 52 #ifde __USE_GNU 53 #i defed _SYS_UIO_H && !defed _BITS_UIO_H_FOR_SYS_UIO_H 54  #_BITS_UIO_H_FOR_SYS_UIO_H 1 ) 56 __BEGIN_DECLS 59 ssize_t $oss_vm_adv ( pid_t __pid , cڡ  iovec * __lvec , 60  __liovt , 61 cڡ  iovec * __rvec , 62  __riovt , 63  __ags ) 64 __THROW ; 67 ssize_t $oss_vm_wrev ( pid_t __pid , cڡ  iovec * __lvec , 68  __liovt , 69 cڡ  iovec * __rvec , 70  __riovt , 71  __ags ) 72 __THROW ; 74 __END_DECLS @/usr/include/bits/xopen_lim.h 29 #ide _XOPEN_LIM_H 30  #_XOPEN_LIM_H 1 ) 32  #__ed_IOV_MAX ) 33  ~ 65  #_XOPEN_IOV_MAX _POSIX_UIO_MAXIOV ) 70  #NL_ARGMAX _POSIX_ARG_MAX ) 73  #NL_LANGMAX _POSIX2_LINE_MAX ) 76  #NL_MSGMAX INT_MAX ) 80  #NL_NMAX INT_MAX ) 83  #NL_SETMAX INT_MAX ) 86  #NL_TEXTMAX INT_MAX ) 89  #NZERO 20 ) 93 #ifde INT_MAX 94 #i INT_MAX == 32767 95  #WORD_BIT 16 ) 97 #i INT_MAX == 2147483647 98  #WORD_BIT 32 ) 101  #WORD_BIT 64 ) 104 #i defed __INT_MAX__ 105 #i __INT_MAX__ == 32767 106  #WORD_BIT 16 ) 108 #i __INT_MAX__ == 2147483647 109  #WORD_BIT 32 ) 112  #WORD_BIT 64 ) 116  #WORD_BIT 32 ) 120 #ifde LONG_MAX 121 #i LONG_MAX == 2147483647 122  #LONG_BIT 32 ) 125  #LONG_BIT 64 ) 127 #i defed __LONG_MAX__ 128 #i __LONG_MAX__ == 2147483647 129  #LONG_BIT 32 ) 132  #LONG_BIT 64 ) 135  ~ 136 #i __WORDSIZE == 64 137  #LONG_BIT 64 ) 139  #LONG_BIT 32 ) @/usr/include/gnu/stubs.h 6 #i! defed __x86_64__ 7  ~ 9 #i defed __x86_64__ && defed __LP64__ 10  ~ 12 #i defed __x86_64__ && defed __ILP32__ 13  ~ @/usr/include/linux/errno.h 1  ~ @/usr/include/linux/limits.h 1 #ide _LINUX_LIMITS_H 2  #_LINUX_LIMITS_H ) 4  #NR_OPEN 1024 ) 6  #NGROUPS_MAX 65536 ) 7  #ARG_MAX 131072 ) 8  #LINK_MAX 127 ) 9  #MAX_CANON 255 ) 10  #MAX_INPUT 255 ) 11  #NAME_MAX 255 ) 12  #PATH_MAX 4096 ) 13  #PIPE_BUF 4096 ) 14  #XATTR_NAME_MAX 255 ) 15  #XATTR_SIZE_MAX 65536 ) 16  #XATTR_LIST_MAX 65536 ) 18  #RTSIG_MAX 32 ) @/usr/include/linux/param.h 1 #ide _LINUX_PARAM_H 2  #_LINUX_PARAM_H ) 4  ~ @/usr/include/stdc-predef.h 18 #idef _STDC_PREDEF_H 19  #_STDC_PREDEF_H 1 ) 36 #ifde __GCC_IEC_559 37 #i __GCC_IEC_559 > 0 38  #__STDC_IEC_559__ 1 ) 41  #__STDC_IEC_559__ 1 ) 44 #ifde __GCC_IEC_559_COMPLEX 45 #i __GCC_IEC_559_COMPLEX > 0 46  #__STDC_IEC_559_COMPLEX__ 1 ) 49  #__STDC_IEC_559_COMPLEX__ 1 ) 55  #__STDC_ISO_10646__ 201505L ) 58  #__STDC_NO_THREADS__ 1 ) @/usr/include/sys/cdefs.h 18 #idef _SYS_CDEFS_H 19  #_SYS_CDEFS_H 1 ) 22 #ide _FEATURES_H 23  ~ 29 #i defed __GNUC__ && !defed __STDC__ 34 #unde __P 35 #unde __PMT 37 #ifde __GNUC__ 41 #i __GNUC_PREREQ (4, 6&& ! defed _LIBC 42  #__LEAF , __af__ ) 43  #__LEAF_ATTR `__ibu__ (( __af__ )) ) 45  #__LEAF ) 46  #__LEAF_ATTR ) 54 #i! defed __lulus && __GNUC_PREREQ (3, 3) 55  #__THROW `__ibu__ (( __nhrow__ __LEAF )) ) 56  #__THROWNL `__ibu__ (( __nhrow__ )) ) 57  #__NTH ( f `__ibu__ (( __nhrow__ __LEAF ) ) fct 59 #i defed __lulus && __GNUC_PREREQ (2,8) 60  #__THROW `throw () ) 61  #__THROWNL `throw () ) 62  #__NTH ( f __LEAF_ATTR f `throw () ) 64  #__THROW ) 65  #__THROWNL ) 66  #__NTH ( f ) fct 72  #__le ) 74  #__THROW ) 75  #__THROWNL ) 76  #__NTH ( f ) fct 82  #__P ( gs ) args 83  #__PMT ( gs ) args 88  #__CONCAT ( x , y x ## ) y 89  #__STRING ( x #x ) 92  #__r_t * ) 93  #__lg_doub_t  ) 97 #ifdef __lulus 98  #__BEGIN_DECLS "C" { ) 99  #__END_DECLS } ) 101  #__BEGIN_DECLS ) 102  #__END_DECLS ) 111 #i defed __lulus && defed _GLIBCPP_USE_NAMESPACES 112  #__BEGIN_NAMESPACE_STD mea d { ) 113  #__END_NAMESPACE_STD } ) 114  #__USING_NAMESPACE_STD ( me usg d ::me; ) 115  #__BEGIN_NAMESPACE_C99 mea __c99 { ) 116  #__END_NAMESPACE_C99 } ) 117  #__USING_NAMESPACE_C99 ( me usg __c99 ::me; ) 122  #__BEGIN_NAMESPACE_STD ) 123  #__END_NAMESPACE_STD ) 124  #__USING_NAMESPACE_STD ( me ) ) 125  #__BEGIN_NAMESPACE_C99 ) 126  #__END_NAMESPACE_C99 ) 127  #__USING_NAMESPACE_C99 ( me ) ) 132  #__bos ( r `__but_obje_size (r, __USE_FORTIFY_LEVEL > 1) ) 133  #__bos0 ( r `__but_obje_size (r, 0) ) 135 #i __GNUC_PREREQ (4,3) 136  #__wnde ( me , msg ) \ 137  `me ( `__ibu__ (( `__wng__ ( msg ))) ) 138  #__wljr ( msg `__ibu__ (( `__wng__ (msg))) ) 139  #__rde ( me , msg ) \ 140  `me ( `__ibu__ (( `__r__ ( msg ))) ) 142  #__wnde ( me , msg  `me () ) 143  #__wljr ( msg ) ) 144  #__rde ( me , msg  `me () ) 148 #i __GNUC_PREREQ (2,97) 150  #__exr [] ) 152 #ifde __GNUC__ 153  #__exr [0] ) 155 #i defed __STDC_VERSION__ && __STDC_VERSION__ >= 199901L 156  #__exr [] ) 159  #__exr [1] ) 175 #i defed __GNUC__ && __GNUC__ >= 2 177  #__REDIRECT ( me , o , s m `__asm__ ( `__ASMNAME (#s)) ) 178 #ifde __lulus 179  #__REDIRECT_NTH ( me , o , s ) \ 180 me o __THROW `__asm__ ( `__ASMNAME (#s)) ) 181  #__REDIRECT_NTHNL ( me , o , s ) \ 182 me o __THROWNL `__asm__ ( `__ASMNAME (#s)) ) 184  #__REDIRECT_NTH ( me , o , s ) \ 185 me o `__asm__ ( `__ASMNAME (#s) __THROW ) 186  #__REDIRECT_NTHNL ( me , o , s ) \ 187 me o `__asm__ ( `__ASMNAME (#s) __THROWNL ) 189  #__ASMNAME ( ame `__ASMNAME2 ( __USER_LABEL_PREFIX__ , cme) ) 190  #__ASMNAME2 ( efix , ame `__STRING (efix ) cname 203 #i! defed __GNUC__ || __GNUC__ < 2 204  #__ibu__ ( xyz ) 210 #i __GNUC_PREREQ (2,96) 211  #__ibu_mloc__ `__ibu__ (( __mloc__ )) ) 213  #__ibu_mloc__ ) 218 #i __GNUC_PREREQ (4, 3) 219  #__ibu_loc_size__ ( ms ) \ 220 `__ibu__ (( __loc_size__ ms )) ) 222  #__ibu_loc_size__ ( ms ) 228 #i __GNUC_PREREQ (2,96) 229  #__ibu_pu__ `__ibu__ (( __pu__ )) ) 231  #__ibu_pu__ ) 235 #i __GNUC_PREREQ (2,5) 236  #__ibu_cڡ__ `__ibu__ (( __cڡ__ )) ) 238  #__ibu_cڡ__ ) 244 #i __GNUC_PREREQ (3,1) 245  #__ibu_ud__ `__ibu__ (( __ud__ )) ) 246  #__ibu_nole__ `__ibu__ (( __nole__ )) ) 248  #__ibu_ud__ `__ibu__ (( __unud__ )) ) 249  #__ibu_nole__ ) 253 #i __GNUC_PREREQ (3,2) 254  #__ibu_dd__ `__ibu__ (( __dd__ )) ) 256  #__ibu_dd__ ) 265 #i __GNUC_PREREQ (2,8) 266  #__ibu_fm_g__ ( x `__ibu__ (( `__fm_g__ (x))) ) 268  #__ibu_fm_g__ ( x ) 275 #i __GNUC_PREREQ (2,97) 276  #__ibu_fm_rfm__ ( a , b ) \ 277 `__ibu__ (( `__fm__ ( __rfm__ , a , b ))) ) 279  #__ibu_fm_rfm__ ( a , b ) 284 #i __GNUC_PREREQ (3,3) 285  #__nnu ( ms `__ibu__ (( __nnu__ ams)) ) 287  #__nnu ( ms ) ) 292 #i __GNUC_PREREQ (3,4) 293  #__ibu_wn_unud_su__ \ 294 `__ibu__ (( __wn_unud_su__ )) ) 295 #i __USE_FORTIFY_LEVEL > 0 296  #__wur __ibu_wn_unud_su__ ) 299  #__ibu_wn_unud_su__ ) 301 #ide __wur 302  #__wur ) 306 #i __GNUC_PREREQ (3,2) 307  #__ways_le __le `__ibu__ (( __ways_le__ )) ) 309  #__ways_le __le ) 314 #i __GNUC_PREREQ (4,3) 315  #__ibu_tificl__ `__ibu__ (( __tificl__ )) ) 317  #__ibu_tificl__ ) 329 #i(! defed __lulus || __GNUC_PREREQ (4,3) \ 330 || ( defed __g__ && (defed __GNUC_STDC_INLINE__ \ 331 || defed __GNUC_GNU_INLINE__ ))) 332 #i defed __GNUC_STDC_INLINE__ || defed __lulus 333  #__ex_le __le `__ibu__ (( __gnu_le__ )) ) 334  #__ex_ways_le \ 335 __ways_le `__ibu__ (( __gnu_le__ )) ) 337  #__ex_le __le ) 338  #__ex_ways_le __ways_le ) 342 #ifde __ex_ways_le 343  #__ftify_funi __ex_ways_le __ibu_tificl__ ) 348 #i __GNUC_PREREQ (4,3) 349  #__va_g_ck ( `__but_va_g_ck () ) 350  #__va_g_ck_n ( `__but_va_g_ck_n () ) 357 #i! __GNUC_PREREQ (2,8) 358  #__exnsi__ ) 362 #i! __GNUC_PREREQ (2,92) 363  #__ri ) 369 #i __GNUC_PREREQ (3,1&& ! defed __GNUG__ 370  #__ri_r __ri ) 372 #ifde __GNUC__ 373  #__ri_r ) 375 #i defed __STDC_VERSION__ && __STDC_VERSION__ >= 199901L 376  #__ri_r ri ) 379  #__ri_r ) 384 #i __GNUC__ >= 3 385  #__glibc_uiky ( cd `__but_ex ((cd), 0) ) 386  #__glibc_liky ( cd `__but_ex ((cd), 1) ) 388  #__glibc_uiky ( cd (cd) ) 389  #__glibc_liky ( cd (cd) ) 392 #i(! defed _Nܑu \ 393 && ( defed __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \ 394 && ! $__GNUC_PREREQ (4,7)) 395 #i `__GNUC_PREREQ (2,8) 396  #_Nܑu `__ibu__ (( __nܑu__ )) ) 398  #_Nܑu ) 402 #i(! defed _Stic_as && !defed __lulus \ 403 && ( defed __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \ 404 && (! `__GNUC_PREREQ (4, 6|| defed __STRICT_ANSI__ )) 405  #_Stic_as ( ex , dgnoic ) \ 406 (* `__Stic_as_funi ()) \ 407 [!! (ru {  __r_if_give : ( ex ? 2 : -1; })] ) 410  ~ 412 #i defed __LONG_DOUBLE_MATH_OPTIONAL && defed __NO_LONG_DOUBLE_MATH 413  #__LDBL_COMPAT 1 ) 414 #ifde __REDIRECT 415  #__LDBL_REDIR1 ( me , o , s `__REDIRECT (me,ro,ls) ) 416  #__LDBL_REDIR ( me , o ) \ 417 `__LDBL_REDIR1 ( me , o , __dbl_ ##me) ) 418  #__LDBL_REDIR1_NTH ( me , o , s `__REDIRECT_NTH (me,ro,ls) ) 419  #__LDBL_REDIR_NTH ( me , o ) \ 420 `__LDBL_REDIR1_NTH ( me , o , __dbl_ ##me) ) 421  #__LDBL_REDIR1_DECL ( me , s ) \ 422 `__tyof ( me m `__asm ( `__ASMNAME (#s)); ) 423  #__LDBL_REDIR_DECL ( me ) \ 424 `__tyof ( me m `__asm ( `__ASMNAME ("__dbl_" #me)); ) 425  #__REDIRECT_LDBL ( me , o , s ) \ 426 `__LDBL_REDIR1 ( me , o , __dbl_ ## s ) ) 427  #__REDIRECT_NTH_LDBL ( me , o , s ) \ 428 `__LDBL_REDIR1_NTH ( me , o , __dbl_ ## s ) ) 431 #i! defed __LDBL_COMPAT || !defed __REDIRECT 432  #__LDBL_REDIR1 ( me , o , s m ) proto 433  #__LDBL_REDIR ( me , o m ) proto 434  #__LDBL_REDIR1_NTH ( me , o , s m __THROW ) 435  #__LDBL_REDIR_NTH ( me , o m __THROW ) 436  #__LDBL_REDIR_DECL ( me ) ) 437 #ifde __REDIRECT 438  #__REDIRECT_LDBL ( me , o , s `__REDIRECT (me,ro,ls) ) 439  #__REDIRECT_NTH_LDBL ( me , o , s ) \ 440 `__REDIRECT_NTH ( me , o , s ) ) @/usr/include/asm-generic/socket.h 1 #ide __ASM_GENERIC_SOCKET_H 2  #__ASM_GENERIC_SOCKET_H ) 4  ~ 7  #SOL_SOCKET 1 ) 9  #SO_DEBUG 1 ) 10  #SO_REUSEADDR 2 ) 11  #SO_TYPE 3 ) 12  #SO_ERROR 4 ) 13  #SO_DONTROUTE 5 ) 14  #SO_BROADCAST 6 ) 15  #SO_SNDBUF 7 ) 16  #SO_RCVBUF 8 ) 17  #SO_SNDBUFFORCE 32 ) 18  #SO_RCVBUFFORCE 33 ) 19  #SO_KEEPALIVE 9 ) 20  #SO_OOBINLINE 10 ) 21  #SO_NO_CHECK 11 ) 22  #SO_PRIORITY 12 ) 23  #SO_LINGER 13 ) 24  #SO_BSDCOMPAT 14 ) 25  #SO_REUSEPORT 15 ) 26 #ide SO_PASSCRED 27  #SO_PASSCRED 16 ) 28  #SO_PEERCRED 17 ) 29  #SO_RCVLOWAT 18 ) 30  #SO_SNDLOWAT 19 ) 31  #SO_RCVTIMEO 20 ) 32  #SO_SNDTIMEO 21 ) 36  #SO_SECURITY_AUTHENTICATION 22 ) 37  #SO_SECURITY_ENCRYPTION_TRANSPORT 23 ) 38  #SO_SECURITY_ENCRYPTION_NETWORK 24 ) 40  #SO_BINDTODEVICE 25 ) 43  #SO_ATTACH_FILTER 26 ) 44  #SO_DETACH_FILTER 27 ) 45  #SO_GET_FILTER SO_ATTACH_FILTER ) 47  #SO_PEERNAME 28 ) 48  #SO_TIMESTAMP 29 ) 49  #SCM_TIMESTAMP SO_TIMESTAMP ) 51  #SO_ACCEPTCONN 30 ) 53  #SO_PEERSEC 31 ) 54  #SO_PASSSEC 34 ) 55  #SO_TIMESTAMPNS 35 ) 56  #SCM_TIMESTAMPNS SO_TIMESTAMPNS ) 58  #SO_MARK 36 ) 60  #SO_TIMESTAMPING 37 ) 61  #SCM_TIMESTAMPING SO_TIMESTAMPING ) 63  #SO_PROTOCOL 38 ) 64  #SO_DOMAIN 39 ) 66  #SO_RXQ_OVFL 40 ) 68  #SO_WIFI_STATUS 41 ) 69  #SCM_WIFI_STATUS SO_WIFI_STATUS ) 70  #SO_PEEK_OFF 42 ) 73  #SO_NOFCS 43 ) 75  #SO_LOCK_FILTER 44 ) 77  #SO_SELECT_ERR_QUEUE 45 ) 79  #SO_BUSY_POLL 46 ) 81  #SO_MAX_PACING_RATE 47 ) 83  #SO_BPF_EXTENSIONS 48 ) 85  #SO_INCOMING_CPU 49 ) 87  #SO_ATTACH_BPF 50 ) 88  #SO_DETACH_BPF SO_DETACH_FILTER ) @/usr/include/asm/errno.h 1  ~ @/usr/include/asm/param.h 1  ~ @/usr/include/bits/local_lim.h 24 #ide NR_OPEN 25  #__undef_NR_OPEN ) 27 #ide LINK_MAX 28  #__undef_LINK_MAX ) 30 #ide OPEN_MAX 31  #__undef_OPEN_MAX ) 33 #ide ARG_MAX 34  #__undef_ARG_MAX ) 38  ~ 41 #ifde __undef_NR_OPEN 42 #unde NR_OPEN 43 #unde __undef_NR_OPEN 46 #ifde __undef_LINK_MAX 47 #unde LINK_MAX 48 #unde __undef_LINK_MAX 51 #ifde __undef_OPEN_MAX 52 #unde OPEN_MAX 53 #unde __undef_OPEN_MAX 56 #ifde __undef_ARG_MAX 57 #unde ARG_MAX 58 #unde __undef_ARG_MAX 62  #_POSIX_THREAD_KEYS_MAX 128 ) 64  #PTHREAD_KEYS_MAX 1024 ) 67  #_POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 ) 69  #PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS ) 72  #_POSIX_THREAD_THREADS_MAX 64 ) 74 #unde PTHREAD_THREADS_MAX 78  #AIO_PRIO_DELTA_MAX 20 ) 81  #PTHREAD_STACK_MIN 16384 ) 84  #DELAYTIMER_MAX 2147483647 ) 87  #TTY_NAME_MAX 32 ) 90  #LOGIN_NAME_MAX 256 ) 93  #HOST_NAME_MAX 64 ) 96  #MQ_PRIO_MAX 32768 ) 99  #SEM_VALUE_MAX (2147483647) ) @/usr/include/gconv.h 22 #ide _GCONV_H 23  #_GCONV_H 1 ) 25  ~ 26  #__ed_mbe_t ) 27  #__ed_wt_t ) 28  ~ 29  #__ed_size_t ) 30  #__ed_wch_t ) 31  ~ 34  #__UNKNOWN_10646_CHAR (( wch_t 0xfffd) ) 39 m__GCONV_OK = 0, 40 m__GCONV_NOCONV , 41 m__GCONV_NODB , 42 m__GCONV_NOMEM , 44 m__GCONV_EMPTY_INPUT , 45 m__GCONV_FULL_OUTPUT , 46 m__GCONV_ILLEGAL_INPUT , 47 m__GCONV_INCOMPLETE_INPUT , 49 m__GCONV_ILLEGAL_DESCRIPTOR , 50 m__GCONV_INTERNAL_ERROR 57 m__GCONV_IS_LAST = 0x0001, 58 m__GCONV_IGNORE_ERRORS = 0x0002, 59 m__GCONV_SWAP = 0x0004, 60 m__GCONV_TRANSLIT = 0x0008 65  g__gcv_ ; 66  g__gcv__da ; 67  g__gcv_lded_obje ; 71 (* t__gcv_f ( t__gcv_ *,  t__gcv__da *, 73 **, tsize_t *, , ); 76  $wt_t (* t__gcv_btowc_f ( t__gcv_ *, ); 79 (* t__gcv__f ( t__gcv_ *); 80 (* t__gcv_d_f ( t__gcv_ *); 84  s__gcv_ 86  __gcv_lded_obje * __shlib_hd ; 87 cڡ * __modme ; 89  __cou ; 91 * __om_me ; 92 * __to_me ; 94 __gcv_f __f ; 95 __gcv_btowc_f __btowc_f ; 96 __gcv__f ___f ; 97 __gcv_d_f __d_f ; 101  __m_eded_om ; 102  __max_eded_om ; 103  __m_eded_to ; 104  __max_eded_to ; 107  __eful ; 109 * __da ; 114  s__gcv__da 116 * __outbuf ; 117 * __outbund ; 121  __ags ; 125  __voti_cou ; 129  ___u ; 131 __mbe_t * __ ; 132 __mbe_t __e ; 138  s__gcv_fo 140 size_t __ns ; 141  __gcv_ * __s ; 142 __exnsi__  __gcv__da __da __exr ; 143 } * t__gcv_t ; 146  `__gcv_e ( __gcv_ * , 147  __gcv__da * _da , 148 cڡ * buft , 149 cڡ ** bu , 150 cڡ * bund , 151 ** outbuft , 152 size_t * vsib ); @/usr/include/gnu/stubs-32.h 6 #ifde _LIBC 7 #r Alitis may n defe the mao _LIBC 10  #__ub_chags ) 11  #__ub_ach ) 12  #__ub_fchags ) 13  #__ub_fdach ) 14  #__ub_gy ) 15  #__ub_lchmod ) 16  #__ub_voke ) 17  #__ub_og ) 18  #__ub_sigtu ) 19  #__ub_sk ) 20  #__ub_ty ) @/usr/include/gnu/stubs-64.h 6 #ifde _LIBC 7 #r Alitis may n defe the mao _LIBC 10  #__ub___comt_bdush ) 11  #__ub_chags ) 12  #__ub_ach ) 13  #__ub_fchags ) 14  #__ub_fdach ) 15  #__ub_gmsg ) 16  #__ub_gy ) 17  #__ub_lchmod ) 18  #__ub_putmsg ) 19  #__ub_voke ) 20  #__ub_og ) 21  #__ub_sigtu ) 22  #__ub_sk ) 23  #__ub_ty ) @/usr/include/gnu/stubs-x32.h 6 #ifde _LIBC 7 #r Alitis may n defe the mao _LIBC 10  #__ub___comt_bdush ) 11  #__ub___comt__modu ) 12  #__ub___comt_g_kl_syms ) 13  #__ub___comt_quy_modu ) 14  #__ub___comt_ulib ) 15  #__ub_chags ) 16  #__ub_ach ) 17  #__ub_fchags ) 18  #__ub_fdach ) 19  #__ub_gmsg ) 20  #__ub_gy ) 21  #__ub_lchmod ) 22  #__ub_nfsrvl ) 23  #__ub_putmsg ) 24  #__ub_voke ) 25  #__ub_og ) 26  #__ub_sigtu ) 27  #__ub_sk ) 28  #__ub_ty ) @/usr/include/wchar.h 23 #ide _WCHAR_H 25 #i! defed __ed_mbe_t && !defed __ed_wt_t 26  #_WCHAR_H 1 ) 27  ~ 30 #ifde _WCHAR_H 32  #__ed___FILE ) 33 #i defed __USE_UNIX98 || defed __USE_XOPEN2K 34  #__ed_FILE ) 36  ~ 38  #__ed___va_li ) 39  ~ 41  ~ 44  #__ed_size_t ) 45  #__ed_wch_t ) 46  #__ed_NULL ) 48 #i defed _WCHAR_H || defed __ed_wt_t || !defed __WINT_TYPE__ 49 #unde __ed_wt_t 50  #__ed_wt_t ) 51  ~ 55 #ide _WINT_T 60  #_WINT_T ) 61  twt_t ; 65 #i defed __lulus && defed _GLIBCPP_USE_NAMESPACES \ 66 && defed __WINT_TYPE__ 67 __BEGIN_NAMESPACE_STD 68  __WINT_TYPE__ twt_t ; 69 g__END_NAMESPACE_STD 74 #i defed __lulus && __GNUC_PREREQ (4, 4) 75  #__CORRECT_ISO_CPP_WCHAR_H_PROTO ) 79 #i( defed _WCHAR_H || defed __ed_mbe_t && !defed ____mbe_t_defed 80  #____mbe_t_defed 1 ) 84  m__cou ; 87 #ifde __WINT_TYPE__ 88 __WINT_TYPE__ m__wch ; 90 wt_t m__wch ; 92  m__wchb [4]; 93 } m__vue ; 94 } t__mbe_t ; 96 #unde __ed_mbe_t 101 #ifde _WCHAR_H 103 #ide __mbe_t_defed 104 __BEGIN_NAMESPACE_C99 106  __mbe_t tmbe_t ; 107 g__END_NAMESPACE_C99 108  #__mbe_t_defed 1 ) 111 #ifde __USE_GNU 112 $__USING_NAMESPACE_C99 ( mbe_t ) 115 #ide WCHAR_MIN 117  #WCHAR_MIN __WCHAR_MIN ) 118  #WCHAR_MAX __WCHAR_MAX ) 121 #ide WEOF 122  #WEOF (0xffffffffu) ) 127 #i defed __USE_XOPEN && !defed __USE_UNIX98 128  ~ 132 __BEGIN_DECLS 134 __BEGIN_NAMESPACE_STD 137  tm ; 138 __END_NAMESPACE_STD 142 $__USING_NAMESPACE_STD ( tm ) 145 __BEGIN_NAMESPACE_STD 147 wch_t * $wcsy ( wch_t * __ri __de , 148 cڡ wch_t * __ri __c ) 149 __THROW `__nnu ((1, 2)); 152 wch_t * $wcy ( wch_t * __ri __de , 153 cڡ wch_t * __ri __c , size_t __n ) 154 __THROW `__nnu ((1, 2)); 157 wch_t * $wcst ( wch_t * __ri __de , 158 cڡ wch_t * __ri __c ) 159 __THROW `__nnu ((1, 2)); 161 wch_t * $wct ( wch_t * __ri __de , 162 cڡ wch_t * __ri __c , size_t __n ) 163 __THROW `__nnu ((1, 2)); 166  $wcscmp (cڡ wch_t * __s1 , cڡ wch_* __s2 ) 167 __THROW __ibu_pu__ `__nnu ((1, 2)); 169  $wccmp (cڡ wch_t * __s1 , cڡ wch_* __s2 , size_t __n ) 170 __THROW __ibu_pu__ `__nnu ((1, 2)); 171 __END_NAMESPACE_STD 173 #ifde __USE_XOPEN2K8 175  $wcscmp (cڡ wch_t * __s1 , cڡ wch_* __s2 __THROW ; 178  $wccmp (cڡ wch_t * __s1 , cڡ wch_* __s2 , 179 size_t __n __THROW ; 183  ~ 185  $wcscmp_l (cڡ wch_t * __s1 , cڡ wch_* __s2 , 186 __lo_t __loc __THROW ; 188  $wccmp_l (cڡ wch_t * __s1 , cڡ wch_* __s2 , 189 size_t __n , __lo_t __loc __THROW ; 192 __BEGIN_NAMESPACE_STD 195  $wcscl (cڡ wch_t * __s1 , cڡ wch_* __s2 __THROW ; 199 size_t $wcsxm ( wch_t * __ri __s1 , 200 cڡ wch_t * __ri __s2 , size_t __n __THROW ; 201 __END_NAMESPACE_STD 203 #ifde __USE_XOPEN2K8 209  $wcscl_l (cڡ wch_t * __s1 , cڡ wch_* __s2 , 210 __lo_t __loc __THROW ; 215 size_t $wcsxm_l ( wch_t * __s1 , cڡ wch_* __s2 , 216 size_t __n , __lo_t __loc __THROW ; 219 wch_t * $wcsdup (cڡ wch_t * __s __THROW __ibu_mloc__ ; 222 __BEGIN_NAMESPACE_STD 224 #ifde __CORRECT_ISO_CPP_WCHAR_H_PROTO 225 "C++" wch_t * $wcschr ( wch_t * __wcs , wch_ __wc ) 226 __THROW `__asm ("wcschr" __ibu_pu__ ; 227 "C++" cڡ wch_t * $wcschr (cڡ wch_t * __wcs , wch_ __wc ) 228 __THROW `__asm ("wcschr" __ibu_pu__ ; 230 wch_t * $wcschr (cڡ wch_t * __wcs , wch_ __wc ) 231 __THROW __ibu_pu__ ; 234 #ifde __CORRECT_ISO_CPP_WCHAR_H_PROTO 235 "C++" wch_t * $wcchr ( wch_t * __wcs , wch_ __wc ) 236 __THROW `__asm ("wcchr" __ibu_pu__ ; 237 "C++" cڡ wch_t * $wcchr (cڡ wch_t * __wcs , wch_ __wc ) 238 __THROW `__asm ("wcchr" __ibu_pu__ ; 240 wch_t * $wcchr (cڡ wch_t * __wcs , wch_ __wc ) 241 __THROW __ibu_pu__ ; 243 __END_NAMESPACE_STD 245 #ifde __USE_GNU 248 wch_t * $wcschul (cڡ wch_t * __s , wch_ __wc ) 249 __THROW __ibu_pu__ ; 252 __BEGIN_NAMESPACE_STD 255 size_t $wcscn (cڡ wch_t * __wcs , cڡ wch_* __je ) 256 __THROW __ibu_pu__ ; 259 size_t $wcsn (cڡ wch_t * __wcs , cڡ wch_* __ac ) 260 __THROW __ibu_pu__ ; 262 #ifde __CORRECT_ISO_CPP_WCHAR_H_PROTO 263 "C++" wch_t * $wcbrk ( wch_t * __wcs , cڡ wch_* __ac ) 264 __THROW `__asm ("wcbrk" __ibu_pu__ ; 265 "C++" cڡ wch_t * $wcbrk (cڡ wch_t * __wcs , 266 cڡ wch_t * __ac ) 267 __THROW `__asm ("wcbrk" __ibu_pu__ ; 269 wch_t * $wcbrk (cڡ wch_t * __wcs , cڡ wch_* __ac ) 270 __THROW __ibu_pu__ ; 273 #ifde __CORRECT_ISO_CPP_WCHAR_H_PROTO 274 "C++" wch_t * $wcsr ( wch_t * __hayack , cڡ wch_* __ed ) 275 __THROW `__asm ("wcsr" __ibu_pu__ ; 276 "C++" cڡ wch_t * $wcsr (cڡ wch_t * __hayack , 277 cڡ wch_t * __ed ) 278 __THROW `__asm ("wcsr" __ibu_pu__ ; 280 wch_t * $wcsr (cڡ wch_t * __hayack , cڡ wch_* __ed ) 281 __THROW __ibu_pu__ ; 285 wch_t * $wcok ( wch_t * __ri __s , 286 cڡ wch_t * __ri __dim , 287 wch_t ** __ri __r __THROW ; 290 size_t $wc (cڡ wch_t * __s __THROW __ibu_pu__ ; 291 __END_NAMESPACE_STD 293 #ifde __USE_XOPEN 295 #ifde __CORRECT_ISO_CPP_WCHAR_H_PROTO 296 "C++" wch_t * $wcswcs ( wch_t * __hayack , cڡ wch_* __ed ) 297 __THROW `__asm ("wcswcs" __ibu_pu__ ; 298 "C++" cڡ wch_t * $wcswcs (cڡ wch_t * __hayack , 299 cڡ wch_t * __ed ) 300 __THROW `__asm ("wcswcs" __ibu_pu__ ; 302 wch_t * $wcswcs (cڡ wch_t * __hayack , cڡ wch_* __ed ) 303 __THROW __ibu_pu__ ; 307 #ifde __USE_XOPEN2K8 309 size_t $wcn (cڡ wch_t * __s , size_t __maxn ) 310 __THROW __ibu_pu__ ; 314 __BEGIN_NAMESPACE_STD 316 #ifde __CORRECT_ISO_CPP_WCHAR_H_PROTO 317 "C++" wch_t * $wmemchr ( wch_t * __s , wch_ __c , size_t __n ) 318 __THROW `__asm ("wmemchr" __ibu_pu__ ; 319 "C++" cڡ wch_t * $wmemchr (cڡ wch_t * __s , wch_ __c , 320 size_t __n ) 321 __THROW `__asm ("wmemchr" __ibu_pu__ ; 323 wch_t * $wmemchr (cڡ wch_t * __s , wch_ __c , size_t __n ) 324 __THROW __ibu_pu__ ; 328  $wmemcmp (cڡ wch_t * __s1 , cڡ wch_* __s2 , size_t __n ) 329 __THROW __ibu_pu__ ; 332 wch_t * $wmemy ( wch_t * __ri __s1 , 333 cڡ wch_t * __ri __s2 , size_t __n __THROW ; 337 wch_t * $wmemmove ( wch_t * __s1 , cڡ wch_* __s2 , size_t __n ) 338 __THROW ; 341 wch_t * $wmemt ( wch_t * __s , wch_ __c , size_t __n __THROW ; 342 __END_NAMESPACE_STD 344 #ifde __USE_GNU 347 wch_t * $wmempy ( wch_t * __ri __s1 , 348 cڡ wch_t * __ri __s2 , size_t __n ) 349 __THROW ; 353 __BEGIN_NAMESPACE_STD 356 wt_t $btowc ( __c __THROW ; 360  $wob ( wt_t __c __THROW ; 364  $mbs (cڡ mbe_t * __ps __THROW __ibu_pu__ ; 368 size_t $mbowc ( wch_t * __ri __pwc , 369 cڡ * __ri __s , size_t __n , 370 mbe_t * __ri __p __THROW ; 373 size_t $wtomb (* __ri __s , wch_t __wc , 374 mbe_t * __ri __ps __THROW ; 377 size_t $__mb (cڡ * __ri __s , size_t __n , 378 mbe_t * __ri __ps __THROW ; 379 size_t $mb (cڡ * __ri __s , size_t __n , 380 mbe_t * __ri __ps __THROW ; 381 __END_NAMESPACE_STD 383 #ifde __USE_EXTERN_INLINES 389 wt_t $__btowc_s ( __c `__asm ("btowc"); 390 __ex_le wt_t 391 `__NTH ( $btowc ( __c )) 392 {  ( `__but_cڡt_p ( __c ) && __c >= '\0' && __c <= '\x7f' 393 ? ( wt_t __c : `__btowc_s (__c)); } } 395  $__wob_s ( wt_t __c `__asm ("wctob"); 396 __ex_le  397 `__NTH ( $wob ( wt_t __wc )) 398 {  ( `__but_cڡt_p ( __wc && __w> L '\0' && __wc <= L'\x7f' 399 ? ( __wc : `__wob_s (__wc)); } } 401 __ex_le size_t 402 __NTH ( $mb (cڡ * __ri __s , size_t __n , 403 mbe_t * __ri __ps )) 404 {  ( __ps ! NULL 405 ? `mbowc ( NULL , __s , __n , __ps : `__mb (__s, __n, NULL)); } } 408 __BEGIN_NAMESPACE_STD 411 size_t $mbtowcs ( wch_t * __ri __d , 412 cڡ ** __ri __c , size_t __n , 413 mbe_t * __ri __ps __THROW ; 417 size_t $wctombs (* __ri __d , 418 cڡ wch_t ** __ri __c , size_t __n , 419 mbe_t * __ri __ps __THROW ; 420 __END_NAMESPACE_STD 423 #ifdef __USE_XOPEN2K8 426 size_t $mbowcs ( wch_t * __ri __d , 427 cڡ ** __ri __c , size_t __nmc , 428 size_t __n , mbe_t * __ri __ps __THROW ; 432 size_t $wcombs (* __ri __d , 433 cڡ wch_t ** __ri __c , 434 size_t __nwc , size_ __n , 435 mbe_t * __ri __ps __THROW ; 440 #ifde __USE_XOPEN 442  $wcwidth ( wch_t __c __THROW ; 446  $wcswidth (cڡ wch_t * __s , size_t __n __THROW ; 450 __BEGIN_NAMESPACE_STD 453  $wcod (cڡ wch_t * __ri __Ō , 454 wch_t ** __ri __dr __THROW ; 455 __END_NAMESPACE_STD 457 #ifde __USE_ISOC99 458 __BEGIN_NAMESPACE_C99 460  $wcof (cڡ wch_t * __ri __Ō , 461 wch_t ** __ri __dr __THROW ; 462  $wcd (cڡ wch_t * __ri __Ō , 463 wch_t ** __ri __dr __THROW ; 464 __END_NAMESPACE_C99 468 __BEGIN_NAMESPACE_STD 471  $wc (cڡ wch_t * __ri __Ō , 472 wch_t ** __ri __dr ,  __ba __THROW ; 476  $wcoul (cڡ wch_t * __ri __Ō , 477 wch_t ** __ri __dr ,  __ba ) 478 __THROW ; 479 __END_NAMESPACE_STD 481 #ifde __USE_ISOC99 482 __BEGIN_NAMESPACE_C99 485 __exnsi__ 486  $wcl (cڡ wch_t * __ri __Ō , 487 wch_t ** __ri __dr ,  __ba ) 488 __THROW ; 492 __exnsi__ 493  $wcou (cڡ wch_t * __ri __Ō , 494 wch_t ** __ri __dr , 495  __ba __THROW ; 496 __END_NAMESPACE_C99 499 #ifde __USE_GNU 502 __exnsi__ 503  $wcoq (cڡ wch_t * __ri __Ō , 504 wch_t ** __ri __dr ,  __ba ) 505 __THROW ; 509 __exnsi__ 510  $wcouq (cڡ wch_t * __ri __Ō , 511 wch_t ** __ri __dr , 512  __ba __THROW ; 515 #ifde __USE_GNU 529  ~ 533  $wc_l (cڡ wch_t * __ri __Ō , 534 wch_t ** __ri __dr ,  __ba , 535 __lo_t __loc __THROW ; 537  $wcoul_l (cڡ wch_t * __ri __Ō , 538 wch_t ** __ri __dr , 539  __ba , __lo_t __loc __THROW ; 541 __exnsi__ 542  $wcl_l (cڡ wch_t * __ri __Ō , 543 wch_t ** __ri __dr , 544  __ba , __lo_t __loc __THROW ; 546 __exnsi__ 547  $wcou_l (cڡ wch_t * __ri __Ō , 548 wch_t ** __ri __dr , 549  __ba , __lo_t __loc ) 550 __THROW ; 552  $wcod_l (cڡ wch_t * __ri __Ō , 553 wch_t ** __ri __dr , __lo_t __loc ) 554 __THROW ; 556  $wcof_l (cڡ wch_t * __ri __Ō , 557 wch_t ** __ri __dr , __lo_t __loc ) 558 __THROW ; 560  $wcd_l (cڡ wch_t * __ri __Ō , 561 wch_t ** __ri __dr , 562 __lo_t __loc __THROW ; 566 #ifde __USE_XOPEN2K8 569 wch_t * $wy ( wch_t * __ri __de , 570 cڡ wch_t * __ri __c __THROW ; 574 wch_t * $wny ( wch_t * __ri __de , 575 cڡ wch_t * __ri __c , size_t __n ) 576 __THROW ; 583 __FILE * $ݒ_wmemam ( wch_t ** __buoc , size_t * __sizoc __THROW ; 586 #i defed __USE_ISOC95 || defed __USE_UNIX98 587 __BEGIN_NAMESPACE_STD 590  $fwide ( __FILE * __ ,  __mode __THROW ; 597  `fwtf ( __FILE * __ri __am , 598 cڡ wch_t * __ri __fm , ...) 604  `wtf (cڡ wch_t * __ri __fm , ...) 607  $swtf ( wch_t * __ri __s , size_t __n , 608 cڡ wch_t * __ri __fm , ...) 609 __THROW ; 615  `vfwtf ( __FILE * __ri __s , 616 cڡ wch_t * __ri __fm , 617 __gnuc_va_li __g ) 623  `vwtf (cڡ wch_t * __ri __fm , 624 __gnuc_va_li __g ) 628  $vswtf ( wch_t * __ri __s , size_t __n , 629 cڡ wch_t * __ri __fm , 630 __gnuc_va_li __g ) 631 __THROW ; 638  `fwsnf ( __FILE * __ri __am , 639 cڡ wch_t * __ri __fm , ...) 645  `wsnf (cڡ wch_t * __ri __fm , ...) 648  $swsnf (cڡ wch_t * __ri __s , 649 cڡ wch_t * __ri __fm , ...) 650 __THROW ; 652 #i defed __USE_ISOC99 && !defed __USE_GNU \ 653 && (! defed __LDBL_COMPAT || !defed __REDIRECT ) \ 654 && ( defed __STRICT_ANSI__ || defed __USE_XOPEN2K ) 655 #ifde __REDIRECT 659  `__REDIRECT ( fwsnf , ( __FILE * __ri __am , 660 cڡ wch_t * __ri __fm , ...), 661 __isoc99_fwsnf ) 663  `__REDIRECT ( wsnf , (cڡ wch_t * __ri __fm , ...), 664 __isoc99_wsnf ) 666  `__REDIRECT_NTH ( swsnf , (cڡ wch_t * __ri __s , 667 cڡ wch_t * __ri __fm , 668 ...), __isoc99_swsnf ) 671  `__isoc99_fwsnf ( __FILE * __ri __am , 672 cڡ wch_t * __ri __fm , ...); 673  `__isoc99_wsnf (cڡ wch_t * __ri __fm , ...); 674  $__isoc99_swsnf (cڡ wch_t * __ri __s , 675 cڡ wch_t * __ri __fm , ...) 676 __THROW ; 677  #fwsnf __isoc99_fwsnf ) 678  #wsnf __isoc99_wsnf ) 679  #swsnf __isoc99_swsnf ) 683 __END_NAMESPACE_STD 686 #ifde __USE_ISOC99 687 __BEGIN_NAMESPACE_C99 692  `vfwsnf ( __FILE * __ri __s , 693 cڡ wch_t * __ri __fm , 694 __gnuc_va_li __g ) 700  `vwsnf (cڡ wch_t * __ri __fm , 701 __gnuc_va_li __g ) 704  $vswsnf (cڡ wch_t * __ri __s , 705 cڡ wch_t * __ri __fm , 706 __gnuc_va_li __g ) 707 __THROW ; 709 #i! defed __USE_GNU \ 710 && (! defed __LDBL_COMPAT || !defed __REDIRECT ) \ 711 && ( defed __STRICT_ANSI__ || defed __USE_XOPEN2K ) 712 #ifde __REDIRECT 713  `__REDIRECT ( vfwsnf , ( __FILE * __ri __s , 714 cڡ wch_t * __ri __fm , 715 __gnuc_va_li __g ), __isoc99_vfwsnf ) 717  `__REDIRECT ( vwsnf , (cڡ wch_t * __ri __fm , 718 __gnuc_va_li __g ), __isoc99_vwsnf ) 720  `__REDIRECT_NTH ( vswsnf , (cڡ wch_t * __ri __s , 721 cڡ wch_t * __ri __fm , 722 __gnuc_va_li __g ), __isoc99_vswsnf ) 725  `__isoc99_vfwsnf ( __FILE * __ri __s , 726 cڡ wch_t * __ri __fm , 727 __gnuc_va_li __g ); 728  `__isoc99_vwsnf (cڡ wch_t * __ri __fm , 729 __gnuc_va_li __g ); 730  $__isoc99_vswsnf (cڡ wch_t * __ri __s , 731 cڡ wch_t * __ri __fm , 732 __gnuc_va_li __g __THROW ; 733  #vfwsnf __isoc99_vfwsnf ) 734  #vwsnf __isoc99_vwsnf ) 735  #vswsnf __isoc99_vswsnf ) 739 __END_NAMESPACE_C99 743 __BEGIN_NAMESPACE_STD 748 wt_t `fgwc ( __FILE * __am ); 749 wt_t `gwc ( __FILE * __am ); 755 wt_t `gwch (); 762 wt_t `utwc ( wch_t __wc , __FILE * __am ); 763 wt_t `putwc ( wch_t __wc , __FILE * __am ); 769 wt_t `putwch ( wch_t __wc ); 777 wch_t * `fgws (wch_* __ri __ws ,  __n , 778 __FILE * __ri __am ); 784  `utws (cڡ wch_t * __ri __ws , 785 __FILE * __ri __am ); 792 wt_t `ungwc (wt_ __wc , __FILE * __am ); 793 __END_NAMESPACE_STD 796 #ifde __USE_GNU 804 wt_t `gwc_uocked ( __FILE * __am ); 805 wt_t `gwch_uocked (); 813 wt_t `fgwc_uocked ( __FILE * __am ); 821 wt_t `utwc_uocked ( wch_t __wc , __FILE * __am ); 830 wt_t `putwc_uocked ( wch_t __wc , __FILE * __am ); 831 wt_t `putwch_uocked ( wch_t __wc ); 840 wch_t * `fgws_uocked (wch_* __ri __ws ,  __n , 841 __FILE * __ri __am ); 849  `utws_uocked (cڡ wch_t * __ri __ws , 850 __FILE * __ri __am ); 854 __BEGIN_NAMESPACE_C99 858 size_t $wcsime ( wch_t * __ri __s , size_t __maxsize , 859 cڡ wch_t * __ri __fm , 860 cڡ  tm * __ri __ __THROW ; 861 __END_NAMESPACE_C99 863 #ifde __USE_GNU 864  ~ 868 size_t $wcsime_l ( wch_t * __ri __s , size_t __maxsize , 869 cڡ wch_t * __ri __fm , 870 cڡ  tm * __ri __ , 871 __lo_t __loc __THROW ; 880 #i defed __USE_UNIX98 && !defed __USE_GNU 881  #__ed_iswxxx ) 882  ~ 886 #i __USE_FORTIFY_LEVEL > 0 && defed __ftify_funi 887  ~ 890 #ifde __LDBL_COMPAT 891  ~ 894 __END_DECLS 902 #unde __ed_mbe_t 903 #unde __ed_wt_t @/usr/include/asm-generic/errno.h 1 #ide _ASM_GENERIC_ERRNO_H 2  #_ASM_GENERIC_ERRNO_H ) 4  ~ 6  #EDEADLK 35 ) 7  #ENAMETOOLONG 36 ) 8  #ENOLCK 37 ) 17  #ENOSYS 38 ) 19  #ENOTEMPTY 39 ) 20  #ELOOP 40 ) 21  #EWOULDBLOCK EAGAIN ) 22  #ENOMSG 42 ) 23  #EIDRM 43 ) 24  #ECHRNG 44 ) 25  #EL2NSYNC 45 ) 26  #EL3HLT 46 ) 27  #EL3RST 47 ) 28  #ELNRNG 48 ) 29  #EUNATCH 49 ) 30  #ENOCSI 50 ) 31  #EL2HLT 51 ) 32  #EBADE 52 ) 33  #EBADR 53 ) 34  #EXFULL 54 ) 35  #ENOANO 55 ) 36  #EBADRQC 56 ) 37  #EBADSLT 57 ) 39  #EDEADLOCK EDEADLK ) 41  #EBFONT 59 ) 42  #ENOSTR 60 ) 43  #ENODATA 61 ) 44  #ETIME 62 ) 45  #ENOSR 63 ) 46  #ENONET 64 ) 47  #ENOPKG 65 ) 48  #EREMOTE 66 ) 49  #ENOLINK 67 ) 50  #EADV 68 ) 51  #ESRMNT 69 ) 52  #ECOMM 70 ) 53  #EPROTO 71 ) 54  #EMULTIHOP 72 ) 55  #EDOTDOT 73 ) 56  #EBADMSG 74 ) 57  #EOVERFLOW 75 ) 58  #ENOTUNIQ 76 ) 59  #EBADFD 77 ) 60  #EREMCHG 78 ) 61  #ELIBACC 79 ) 62  #ELIBBAD 80 ) 63  #ELIBSCN 81 ) 64  #ELIBMAX 82 ) 65  #ELIBEXEC 83 ) 66  #EILSEQ 84 ) 67  #ERESTART 85 ) 68  #ESTRPIPE 86 ) 69  #EUSERS 87 ) 70  #ENOTSOCK 88 ) 71  #EDESTADDRREQ 89 ) 72  #EMSGSIZE 90 ) 73  #EPROTOTYPE 91 ) 74  #ENOPROTOOPT 92 ) 75  #EPROTONOSUPPORT 93 ) 76  #ESOCKTNOSUPPORT 94 ) 77  #EOPNOTSUPP 95 ) 78  #EPFNOSUPPORT 96 ) 79  #EAFNOSUPPORT 97 ) 80  #EADDRINUSE 98 ) 81  #EADDRNOTAVAIL 99 ) 82  #ENETDOWN 100 ) 83  #ENETUNREACH 101 ) 84  #ENETRESET 102 ) 85  #ECONNABORTED 103 ) 86  #ECONNRESET 104 ) 87  #ENOBUFS 105 ) 88  #EISCONN 106 ) 89  #ENOTCONN 107 ) 90  #ESHUTDOWN 108 ) 91  #ETOOMANYREFS 109 ) 92  #ETIMEDOUT 110 ) 93  #ECONNREFUSED 111 ) 94  #EHOSTDOWN 112 ) 95  #EHOSTUNREACH 113 ) 96  #EALREADY 114 ) 97  #EINPROGRESS 115 ) 98  #ESTALE 116 ) 99  #EUCLEAN 117 ) 100  #ENOTNAM 118 ) 101  #ENAVAIL 119 ) 102  #EISNAM 120 ) 103  #EREMOTEIO 121 ) 104  #EDQUOT 122 ) 106  #ENOMEDIUM 123 ) 107  #EMEDIUMTYPE 124 ) 108  #ECANCELED 125 ) 109  #ENOKEY 126 ) 110  #EKEYEXPIRED 127 ) 111  #EKEYREVOKED 128 ) 112  #EKEYREJECTED 129 ) 115  #EOWNERDEAD 130 ) 116  #ENOTRECOVERABLE 131 ) 118  #ERFKILL 132 ) 120  #EHWPOISON 133 ) @/usr/include/asm-generic/param.h 1 #ide __ASM_GENERIC_PARAM_H 2  #__ASM_GENERIC_PARAM_H ) 4 #ide HZ 5  #HZ 100 ) 8 #ide EXEC_PAGESIZE 9  #EXEC_PAGESIZE 4096 ) 12 #ide NOGROUP 13  #NOGROUP (-1) ) 16  #MAXHOSTNAMELEN 64 ) @/usr/include/asm/sockios.h 1  ~ @/usr/include/bits/wchar-ldbl.h 19 #ide _WCHAR_H 23 #i defed __USE_ISOC95 || defed __USE_UNIX98 24 __BEGIN_NAMESPACE_C99 25 __LDBL_REDIR_DECL ( fwtf ); 26 __LDBL_REDIR_DECL ( wtf ); 27 __LDBL_REDIR_DECL ( swtf ); 28 __LDBL_REDIR_DECL ( vfwtf ); 29 __LDBL_REDIR_DECL ( vwtf ); 30 __LDBL_REDIR_DECL ( vswtf ); 31 #i defed __USE_ISOC99 && !defed __USE_GNU \ 32 && ! defed g__REDIRECT \ 33 && ( defed g__STRICT_ANSI__ || defed g__USE_XOPEN2K ) 34 $__LDBL_REDIR1_DECL ( fwsnf , __dbl___isoc99_fwsnf ) 35 $__LDBL_REDIR1_DECL ( wsnf , __dbl___isoc99_wsnf ) 36 $__LDBL_REDIR1_DECL ( swsnf , __dbl___isoc99_swsnf ) 38 `__LDBL_REDIR_DECL ( fwsnf ); 39 `__LDBL_REDIR_DECL ( wsnf ); 40 `__LDBL_REDIR_DECL ( swsnf ); 42 __END_NAMESPACE_C99 45 #ifde __USE_ISOC99 46 __BEGIN_NAMESPACE_C99 47 `__LDBL_REDIR1_DECL ( wcd , wcod ); 48 #i! defed __USE_GNU && !defed __REDIRECT \ 49 && ( defed __STRICT_ANSI__ || defed __USE_XOPEN2K ) 50 $__LDBL_REDIR1_DECL ( vfwsnf , __dbl___isoc99_vfwsnf ) 51 $__LDBL_REDIR1_DECL ( vwsnf , __dbl___isoc99_vwsnf ) 52 $__LDBL_REDIR1_DECL ( vswsnf , __dbl___isoc99_vswsnf ) 54 `__LDBL_REDIR_DECL ( vfwsnf ); 55 `__LDBL_REDIR_DECL ( vwsnf ); 56 `__LDBL_REDIR_DECL ( vswsnf ); 58 __END_NAMESPACE_C99 61 #ifde __USE_GNU 62 `__LDBL_REDIR1_DECL ( wcd_l , wcod_l ); 65 #i __USE_FORTIFY_LEVEL > 0 && defed __ftify_funi 66 $__LDBL_REDIR_DECL ( __swtf_chk ) 67 $__LDBL_REDIR_DECL ( __vswtf_chk ) 68 #i __USE_FORTIFY_LEVEL > 1 69 $__LDBL_REDIR_DECL ( __fwtf_chk ) 70 $__LDBL_REDIR_DECL ( __wtf_chk ) 71 $__LDBL_REDIR_DECL ( __vfwtf_chk ) 72 $__LDBL_REDIR_DECL ( __vwtf_chk ) @/usr/include/bits/wchar2.h 19 #ide _WCHAR_H 24 wch_t * $__wmemy_chk ( wch_t * __ri __s1 , 25 cڡ wch_t * __ri __s2 , size_t __n , 26 size_t __ns1 __THROW ; 27 wch_t * `__REDIRECT_NTH ( __wmemy_s , 28 ( wch_t * __ri __s1 , 29 cڡ wch_t * __ri __s2 , size_t __n ), 30 wmemy ); 31 wch_t * `__REDIRECT_NTH ( __wmemy_chk_wn , 32 ( wch_t * __ri __s1 , 33 cڡ wch_t * __ri __s2 , size_t __n , 34 size_t __ns1 ), __wmemy_chk ) 35 `__wljr ("wmemcpy called withength biggerhan size of destination " 38 __ftify_funi wch_t * 39 `__NTH ( $wmemy ( wch_t * __ri __s1 , cڡ wch_*__ri __s2 , 40 size_t __n )) 42 i( `__bos0 ( __s1 !( size_t ) -1) 44 i(! `__but_cڡt_p ( __n )) 45  `__wmemy_chk ( __s1 , __s2 , __n , 46 `__bos0 ( __s1 /  ( wch_t )); 48 i( __n > `__bos0 ( __s1 /  ( wch_t )) 49  `__wmemy_chk_wn ( __s1 , __s2 , __n , 50 `__bos0 ( __s1 /  ( wch_t )); 52  `__wmemy_s ( __s1 , __s2 , __n ); 53 } } 56 wch_t * $__wmemmove_chk ( wch_t * __s1 , cڡ wch_* __s2 , 57 size_t __n , size_ __ns1 __THROW ; 58 wch_t * `__REDIRECT_NTH ( __wmemmove_s , (wch_* __s1 , 59 cڡ wch_t * __s2 , 60 size_t __n ), wmemmove ); 61 wch_t * `__REDIRECT_NTH ( __wmemmove_chk_wn , 62 ( wch_t * __s1 , cڡ wch_* __s2 , 63 size_t __n , size_ __ns1 ), __wmemmove_chk ) 64 `__wljr ("wmemmove called withength biggerhan size of destination " 67 __ftify_funi wch_t * 68 `__NTH ( $wmemmove ( wch_t * __s1 , cڡ wch_* __s2 , size_t __n )) 70 i( `__bos0 ( __s1 !( size_t ) -1) 72 i(! `__but_cڡt_p ( __n )) 73  `__wmemmove_chk ( __s1 , __s2 , __n , 74 `__bos0 ( __s1 /  ( wch_t )); 76 i( __n > `__bos0 ( __s1 /  ( wch_t )) 77  `__wmemmove_chk_wn ( __s1 , __s2 , __n , 78 `__bos0 ( __s1 /  ( wch_t )); 80  `__wmemmove_s ( __s1 , __s2 , __n ); 81 } } 84 #ifde __USE_GNU 85 wch_t * $__wmempy_chk ( wch_t * __ri __s1 , 86 cڡ wch_t * __ri __s2 , size_t __n , 87 size_t __ns1 __THROW ; 88 wch_t * `__REDIRECT_NTH ( __wmempy_s , 89 ( wch_t * __ri __s1 , 90 cڡ wch_t * __ri __s2 , 91 size_t __n ), wmempy ); 92 wch_t * `__REDIRECT_NTH ( __wmempy_chk_wn , 93 ( wch_t * __ri __s1 , 94 cڡ wch_t * __ri __s2 , size_t __n , 95 size_t __ns1 ), __wmempy_chk ) 96 `__wljr ("wmempcpy called withength biggerhan size of destination " 99 __ftify_funi wch_t * 100 `__NTH ( $wmempy ( wch_t * __ri __s1 , cڡ wch_*__ri __s2 , 101 size_t __n )) 103 i( `__bos0 ( __s1 !( size_t ) -1) 105 i(! `__but_cڡt_p ( __n )) 106  `__wmempy_chk ( __s1 , __s2 , __n , 107 `__bos0 ( __s1 /  ( wch_t )); 109 i( __n > `__bos0 ( __s1 /  ( wch_t )) 110  `__wmempy_chk_wn ( __s1 , __s2 , __n , 111 `__bos0 ( __s1 /  ( wch_t )); 113  `__wmempy_s ( __s1 , __s2 , __n ); 114 } } 118 wch_t * $__wmemt_chk ( wch_t * __s , wch_ __c , size_t __n , 119 size_t __ns __THROW ; 120 wch_t * `__REDIRECT_NTH ( __wmemt_s , (wch_* __s , wch_ __c , 121 size_t __n ), wmemt ); 122 wch_t * `__REDIRECT_NTH ( __wmemt_chk_wn , 123 ( wch_t * __s , wch_ __c , size_t __n , 124 size_t __ns ), __wmemt_chk ) 125 `__wljr ("wmemset called withength biggerhan size of destination " 128 __ftify_funi wch_t * 129 `__NTH ( $wmemt ( wch_t * __s , wch_ __c , size_t __n )) 131 i( `__bos0 ( __s !( size_t ) -1) 133 i(! `__but_cڡt_p ( __n )) 134  `__wmemt_chk ( __s , __c , __n , `__bos0 (__s/  ( wch_t )); 136 i( __n > `__bos0 ( __s /  ( wch_t )) 137  `__wmemt_chk_wn ( __s , __c , __n , 138 `__bos0 ( __s /  ( wch_t )); 140  `__wmemt_s ( __s , __c , __n ); 141 } } 144 wch_t * $__wcsy_chk ( wch_t * __ri __de , 145 cڡ wch_t * __ri __c , 146 size_t __n __THROW ; 147 wch_t * `__REDIRECT_NTH ( __wcsy_s , 148 ( wch_t * __ri __de , 149 cڡ wch_t * __ri __c ), wcsy ); 151 __ftify_funi wch_t * 152 `__NTH ( $wcsy ( wch_t * __ri __de , cڡ wch_*__ri __c )) 154 i( `__bos ( __de !( size_t ) -1) 155  `__wcsy_chk ( __de , __c , `__bos (__de/  ( wch_t )); 156  `__wcsy_s ( __de , __c ); 157 } } 160 wch_t * $__wy_chk ( wch_t * __ri __de , 161 cڡ wch_t * __ri __c , 162 size_t __den __THROW ; 163 wch_t * `__REDIRECT_NTH ( __wy_s , 164 ( wch_t * __ri __de , 165 cڡ wch_t * __ri __c ), wy ); 167 __ftify_funi wch_t * 168 `__NTH ( $wy ( wch_t * __ri __de , cڡ wch_*__ri __c )) 170 i( `__bos ( __de !( size_t ) -1) 171  `__wy_chk ( __de , __c , `__bos (__de/  ( wch_t )); 172  `__wy_s ( __de , __c ); 173 } } 176 wch_t * $__wcy_chk ( wch_t * __ri __de , 177 cڡ wch_t * __ri __c , size_t __n , 178 size_t __den __THROW ; 179 wch_t * `__REDIRECT_NTH ( __wcy_s , 180 ( wch_t * __ri __de , 181 cڡ wch_t * __ri __c , 182 size_t __n ), wcy ); 183 wch_t * `__REDIRECT_NTH ( __wcy_chk_wn , 184 ( wch_t * __ri __de , 185 cڡ wch_t * __ri __c , 186 size_t __n , size_ __den ), __wcy_chk ) 187 `__wljr ("wcsncpy called withength biggerhan size of destination " 190 __ftify_funi wch_t * 191 `__NTH ( $wcy ( wch_t * __ri __de , cڡ wch_*__ri __c , 192 size_t __n )) 194 i( `__bos ( __de !( size_t ) -1) 196 i(! `__but_cڡt_p ( __n )) 197  `__wcy_chk ( __de , __c , __n , 198 `__bos ( __de /  ( wch_t )); 199 i( __n > `__bos ( __de /  ( wch_t )) 200  `__wcy_chk_wn ( __de , __c , __n , 201 `__bos ( __de /  ( wch_t )); 203  `__wcy_s ( __de , __c , __n ); 204 } } 207 wch_t * $__wny_chk ( wch_t * __ri __de , 208 cڡ wch_t * __ri __c , size_t __n , 209 size_t __den __THROW ; 210 wch_t * `__REDIRECT_NTH ( __wny_s , 211 ( wch_t * __ri __de , 212 cڡ wch_t * __ri __c , 213 size_t __n ), wny ); 214 wch_t * `__REDIRECT_NTH ( __wny_chk_wn , 215 ( wch_t * __ri __de , 216 cڡ wch_t * __ri __c , 217 size_t __n , size_ __den ), __wny_chk ) 218 `__wljr ("wcpncpy called withength biggerhan size of destination " 221 __ftify_funi wch_t * 222 `__NTH ( $wny ( wch_t * __ri __de , cڡ wch_*__ri __c , 223 size_t __n )) 225 i( `__bos ( __de !( size_t ) -1) 227 i(! `__but_cڡt_p ( __n )) 228  `__wny_chk ( __de , __c , __n , 229 `__bos ( __de /  ( wch_t )); 230 i( __n > `__bos ( __de /  ( wch_t )) 231  `__wny_chk_wn ( __de , __c , __n , 232 `__bos ( __de /  ( wch_t )); 234  `__wny_s ( __de , __c , __n ); 235 } } 238 wch_t * $__wcst_chk ( wch_t * __ri __de , 239 cڡ wch_t * __ri __c , 240 size_t __den __THROW ; 241 wch_t * `__REDIRECT_NTH ( __wcst_s , 242 ( wch_t * __ri __de , 243 cڡ wch_t * __ri __c ), wcst ); 245 __ftify_funi wch_t * 246 `__NTH ( $wcst ( wch_t * __ri __de , cڡ wch_*__ri __c )) 248 i( `__bos ( __de !( size_t ) -1) 249  `__wcst_chk ( __de , __c , `__bos (__de/  ( wch_t )); 250  `__wcst_s ( __de , __c ); 251 } } 254 wch_t * $__wct_chk ( wch_t * __ri __de , 255 cڡ wch_t * __ri __c , 256 size_t __n , size_ __den __THROW ; 257 wch_t * `__REDIRECT_NTH ( __wct_s , 258 ( wch_t * __ri __de , 259 cڡ wch_t * __ri __c , 260 size_t __n ), wct ); 262 __ftify_funi wch_t * 263 `__NTH ( $wct ( wch_t * __ri __de , cڡ wch_*__ri __c , 264 size_t __n )) 266 i( `__bos ( __de !( size_t ) -1) 267  `__wct_chk ( __de , __c , __n , 268 `__bos ( __de /  ( wch_t )); 269  `__wct_s ( __de , __c , __n ); 270 } } 273  $__swtf_chk ( wch_t * __ri __s , size_t __n , 274  __ag , size_t __s_n , 275 cڡ wch_t * __ri __fm , ...) 276 __THROW ; 278  `__REDIRECT_NTH_LDBL ( __swtf_s , 279 ( wch_t * __ri __s , size_t __n , 280 cڡ wch_t * __ri __fmt , ...), 281 swtf ); 283 #ifde __va_g_ck 284 __ftify_funi  285 `__NTH ( $swtf ( wch_t * __ri __s , size_t __n , 286 cڡ wch_t * __ri __fmt , ...)) 288 i( `__bos ( __s !( size_t -1 || __USE_FORTIFY_LEVEL > 1) 289  `__swtf_chk ( __s , __n , __USE_FORTIFY_LEVEL - 1, 290 `__bos ( __s /  ( wch_t ), 291 __fmt , `__va_g_ck ()); 292  `__swtf_s ( __s , __n , __fmt , `__va_g_ck ()); 293 } } 294 #i! defed __lulus 296  #swtf ( s , n , ...) \ 297 ( `__bos ( s !( size_t -1 || __USE_FORTIFY_LEVEL > 1 \ 298 ? `__swtf_chk ( s , n , __USE_FORTIFY_LEVEL - 1, \ 299 `__bos ( s /  ( wch_t ), __VA_ARGS__ ) \ 300 : `swtf ( s , n , __VA_ARGS__ )) ) 303  $__vswtf_chk ( wch_t * __ri __s , size_t __n , 304  __ag , size_t __s_n , 305 cڡ wch_t * __ri __fm , 306 __gnuc_va_li __g ) 307 __THROW ; 309  `__REDIRECT_NTH_LDBL ( __vswtf_s , 310 ( wch_t * __ri __s , size_t __n , 311 cڡ wch_t * __ri __fmt , 312 __gnuc_va_li __ ), vswtf ); 314 __ftify_funi  315 `__NTH ( $vswtf ( wch_t * __ri __s , size_t __n , 316 cڡ wch_t * __ri __fmt , __gnuc_va_li __ )) 318 i( `__bos ( __s !( size_t -1 || __USE_FORTIFY_LEVEL > 1) 319  `__vswtf_chk ( __s , __n , __USE_FORTIFY_LEVEL - 1, 320 `__bos ( __s /  ( wch_t ), __fmt , __ ); 321  `__vswtf_s ( __s , __n , __fmt , __ ); 322 } } 325 #i __USE_FORTIFY_LEVEL > 1 327  __fwtf_chk ( __FILE * __ri __am ,  __ag , 328 cڡ wch_t * __ri __fm , ...); 329  __wtf_chk ( __ag , cڡ wch_t * __ri __fm , 331  __vfwtf_chk ( __FILE * __ri __am ,  __ag , 332 cڡ wch_t * __ri __fm , 333 __gnuc_va_li __ ); 334  __vwtf_chk ( __ag , cڡ wch_t * __ri __fm , 335 __gnuc_va_li __ ); 337 #ifde __va_g_ck 338 __ftify_funi  339 $wtf (cڡ wch_t * __ri __fmt , ...) 341  `__wtf_chk ( __USE_FORTIFY_LEVEL - 1, __fmt , `__va_g_ck ()); 342 } } 344 __ftify_funi  345 $fwtf ( __FILE * __ri __am , cڡ wch_t *__ri __fmt , ...) 347  `__fwtf_chk ( __am , __USE_FORTIFY_LEVEL - 1, __fmt , 348 `__va_g_ck ()); 349 } } 350 #i! defed __lulus 351  #wtf (...) \ 352 `__wtf_chk ( __USE_FORTIFY_LEVEL - 1, __VA_ARGS__ ) ) 353  #fwtf ( am , ...) \ 354 `__fwtf_chk ( am , __USE_FORTIFY_LEVEL - 1, __VA_ARGS__ ) ) 357 __ftify_funi  358 $vwtf (cڡ wch_t * __ri __fmt , __gnuc_va_li __ ) 360  `__vwtf_chk ( __USE_FORTIFY_LEVEL - 1, __fmt , __ ); 361 } } 363 __ftify_funi  364 $vfwtf ( __FILE * __ri __am , 365 cڡ wch_t * __ri __fmt , __gnuc_va_li __ ) 367  `__vfwtf_chk ( __am , __USE_FORTIFY_LEVEL - 1, __fmt , __ ); 368 } } 372 wch_t * $__fgws_chk ( wch_t * __ri __s , size_t __size ,  __n , 373 __FILE * __ri __am __wur ; 374 wch_t * `__REDIRECT ( __fgws_s , 375 ( wch_t * __ri __s ,  __n , 376 __FILE * __ri __am ), fgws __wur ; 377 wch_t * `__REDIRECT ( __fgws_chk_wn , 378 ( wch_t * __ri __s , size_t __size ,  __n , 379 __FILE * __ri __am ), __fgws_chk ) 380 __wur `__wljr ("fgetws called with bigger sizehanength " 383 __ftify_funi __wur wch_t * 384 $fgws ( wch_t * __ri __s ,  __n , __FILE *__ri __am ) 386 i( `__bos ( __s !( size_t ) -1) 388 i(! `__but_cڡt_p ( __n ) || __n <= 0) 389  `__fgws_chk ( __s , `__bos (__s/  ( wch_t ), 390 __n , __am ); 392 i(( size_t __n > `__bos ( __s /  ( wch_t )) 393  `__fgws_chk_wn ( __s , `__bos (__s/  ( wch_t ), 394 __n , __am ); 396  `__fgws_s ( __s , __n , __am ); 397 } } 399 #ifde __USE_GNU 400 wch_t * $__fgws_uocked_chk ( wch_t * __ri __s , size_t __size , 401  __n , __FILE * __ri __am ) 402 __wur ; 403 wch_t * `__REDIRECT ( __fgws_uocked_s , 404 ( wch_t * __ri __s ,  __n , 405 __FILE * __ri __am ), fgws_uocked ) 406 __wur ; 407 wch_t * `__REDIRECT ( __fgws_uocked_chk_wn , 408 ( wch_t * __ri __s , size_t __size ,  __n , 409 __FILE * __ri __am ), 410 __fgws_uocked_chk ) 411 __wur `__wljr ("fgetws_unlocked called with bigger sizehanength " 414 __ftify_funi __wur wch_t * 415 $fgws_uocked ( wch_t * __ri __s ,  __n , __FILE *__ri __am ) 417 i( `__bos ( __s !( size_t ) -1) 419 i(! `__but_cڡt_p ( __n ) || __n <= 0) 420  `__fgws_uocked_chk ( __s , `__bos (__s/  ( wch_t ), 421 __n , __am ); 423 i(( size_t __n > `__bos ( __s /  ( wch_t )) 424  `__fgws_uocked_chk_wn ( __s , `__bos (__s/  ( wch_t ), 425 __n , __am ); 427  `__fgws_uocked_s ( __s , __n , __am ); 428 } } 432 size_t $__wtomb_chk (* __ri __s , wch_t __wch , 433 mbe_t * __ri __p , 434 size_t __bu __THROW __wur ; 435 size_t `__REDIRECT_NTH ( __wtomb_s , 436 (* __ri __s , wch_t __wch , 437 mbe_t * __ri __ps ), wtomb __wur ; 439 __ftify_funi __wur size_t 440 `__NTH ( $wtomb (* __ri __s , wch_t __wch , 441 mbe_t * __ri __ps )) 446  #__WCHAR_MB_LEN_MAX 16 ) 447 #i defed MB_LEN_MAX && MB_LEN_MAX ! __WCHAR_MB_LEN_MAX 450 i( `__bos ( __s !( size_t -1 && __WCHAR_MB_LEN_MAX > __bos (__s)) 451  `__wtomb_chk ( __s , __wch , __ps , `__bos (__s)); 452  `__wtomb_s ( __s , __wch , __ps ); 453 } } 456 size_t $__mbtowcs_chk ( wch_t * __ri __d , 457 cڡ ** __ri __c , 458 size_t __n , mbe_t * __ri __ps , 459 size_t __dn __THROW ; 460 size_t `__REDIRECT_NTH ( __mbtowcs_s , 461 ( wch_t * __ri __d , 462 cڡ ** __ri __c , 463 size_t __n , mbe_t * __ri __ps ), 464 mbtowcs ); 465 size_t `__REDIRECT_NTH ( __mbtowcs_chk_wn , 466 ( wch_t * __ri __d , 467 cڡ ** __ri __c , 468 size_t __n , mbe_t * __ri __ps , 469 size_t __dn ), __mbtowcs_chk ) 470 `__wljr ("mbsrtowcs called with dst buffer smallerhanen " 473 __ftify_funi size_t 474 `__NTH ( $mbtowcs ( wch_t * __ri __d , cڡ **__ri __c , 475 size_t __n , mbe_t * __ri __ps )) 477 i( `__bos ( __d !( size_t ) -1) 479 i(! `__but_cڡt_p ( __n )) 480  `__mbtowcs_chk ( __d , __c , __n , __ps , 481 `__bos ( __d /  ( wch_t )); 483 i( __n > `__bos ( __d /  ( wch_t )) 484  `__mbtowcs_chk_wn ( __d , __c , __n , __ps , 485 `__bos ( __d /  ( wch_t )); 487  `__mbtowcs_s ( __d , __c , __n , __ps ); 488 } } 491 size_t $__wctombs_chk (* __ri __d , 492 cڡ wch_t ** __ri __c , 493 size_t __n , mbe_t * __ri __ps , 494 size_t __dn __THROW ; 495 size_t `__REDIRECT_NTH ( __wctombs_s , 496 (* __ri __d , 497 cڡ wch_t ** __ri __c , 498 size_t __n , mbe_t * __ri __ps ), 499 wctombs ); 500 size_t `__REDIRECT_NTH ( __wctombs_chk_wn , 501 (* __ri __d , 502 cڡ wch_t ** __ri __c , 503 size_t __n , mbe_t * __ri __ps , 504 size_t __dn ), __wctombs_chk ) 505 `__wljr ("wcsrtombs called with dst buffer smallerhanen"); 507 __ftify_funi size_t 508 `__NTH ( $wctombs (* __ri __d , cڡ wch_t **__ri __c , 509 size_t __n , mbe_t * __ri __ps )) 511 i( `__bos ( __d !( size_t ) -1) 513 i(! `__but_cڡt_p ( __n )) 514  `__wctombs_chk ( __d , __c , __n , __ps , `__bos (__dst)); 516 i( __n > `__bos ( __d )) 517  `__wctombs_chk_wn ( __d , __c , __n , __ps , `__bos (__dst)); 519  `__wctombs_s ( __d , __c , __n , __ps ); 520 } } 523 #ifde __USE_GNU 524 size_t $__mbowcs_chk ( wch_t * __ri __d , 525 cڡ ** __ri __c , size_t __nmc , 526 size_t __n , mbe_t * __ri __ps , 527 size_t __dn __THROW ; 528 size_t `__REDIRECT_NTH ( __mbowcs_s , 529 ( wch_t * __ri __d , 530 cڡ ** __ri __c , size_t __nmc , 531 size_t __n , mbe_t * __ri __ps ), 532 mbowcs ); 533 size_t `__REDIRECT_NTH ( __mbowcs_chk_wn , 534 ( wch_t * __ri __d , 535 cڡ ** __ri __c , size_t __nmc , 536 size_t __n , mbe_t * __ri __ps , 537 size_t __dn ), __mbowcs_chk ) 538 `__wljr ("mbsnrtowcs called with dst buffer smallerhanen " 541 __ftify_funi size_t 542 `__NTH ( $mbowcs ( wch_t * __ri __d , cڡ **__ri __c , 543 size_t __nmc , size_ __n , mbe_t * __ri __ps )) 545 i( `__bos ( __d !( size_t ) -1) 547 i(! `__but_cڡt_p ( __n )) 548  `__mbowcs_chk ( __d , __c , __nmc , __n , __ps , 549 `__bos ( __d /  ( wch_t )); 551 i( __n > `__bos ( __d /  ( wch_t )) 552  `__mbowcs_chk_wn ( __d , __c , __nmc , __n , __ps , 553 `__bos ( __d /  ( wch_t )); 555  `__mbowcs_s ( __d , __c , __nmc , __n , __ps ); 556 } } 559 size_t $__wcombs_chk (* __ri __d , 560 cڡ wch_t ** __ri __c , 561 size_t __nwc , size_ __n , 562 mbe_t * __ri __ps , size_t __dn ) 563 __THROW ; 564 size_t `__REDIRECT_NTH ( __wcombs_s , 565 (* __ri __d , 566 cڡ wch_t ** __ri __c , 567 size_t __nwc , size_ __n , 568 mbe_t * __ri __ps ), wcombs ); 569 size_t `__REDIRECT_NTH ( __wcombs_chk_wn , 570 (* __ri __d , 571 cڡ wch_t ** __ri __c , 572 size_t __nwc , size_ __n , 573 mbe_t * __ri __ps , 574 size_t __dn ), __wcombs_chk ) 575 `__wljr ("wcsnrtombs called with dst buffer smallerhanen"); 577 __ftify_funi size_t 578 `__NTH ( $wcombs (* __ri __d , cڡ wch_t **__ri __c , 579 size_t __nwc , size_ __n , mbe_t * __ri __ps )) 581 i( `__bos ( __d !( size_t ) -1) 583 i(! `__but_cڡt_p ( __n )) 584  `__wcombs_chk ( __d , __c , __nwc , __n , __ps , 585 `__bos ( __d )); 587 i( __n > `__bos ( __d )) 588  `__wcombs_chk_wn ( __d , __c , __nwc , __n , __ps , 589 `__bos ( __d )); 591  `__wcombs_s ( __d , __c , __nwc , __n , __ps ); 592 } } @/usr/include/wctype.h 23 #ide _WCTYPE_H 25  ~ 26  ~ 28 #ide __ed_iswxxx 29  #_WCTYPE_H 1 ) 32  #__ed_wt_t ) 33  ~ 37 #ide WEOF 38  #WEOF (0xffffffffu) ) 41 #unde __ed_iswxxx 46 #ide __iswxxx_defed 47  #__iswxxx_defed 1 ) 49 __BEGIN_NAMESPACE_C99 52  twy_t ; 53 g__END_NAMESPACE_C99 55 #ide _ISwb 60  ~ 61 #i __BYTE_ORDER = __BIG_ENDIAN 62  #_ISwb ( b (1 << (b)) ) 64  #_ISwb ( b ) \ 65 (( b ) < 8 ? () ((1UL << (bit)) << 24) \ 66 : (( b ) < 16 ? () ((1UL << (bit)) << 8) \ 67 : (( b ) < 24 ? () ((1UL << (bit)) >> 8) \ 68 : (((1UL << ( b )>> 24)))) ) 73 m__ISwu = 0, 74 m__ISwlow = 1, 75 m__ISwpha = 2, 76 m__ISwdig = 3, 77 m__ISwxdig = 4, 78 m__ISwa = 5, 79 m__ISwt = 6, 80 m__ISwgph = 7, 81 m__ISwbnk = 8, 82 m__ISwl = 9, 83 m__ISwpun = 10, 84 m__ISwnum = 11, 86 m_ISwu = _ISwb ( __ISwu ), 87 m_ISwlow = _ISwb ( __ISwlow ), 88 m_ISwpha = _ISwb ( __ISwpha ), 89 m_ISwdig = _ISwb ( __ISwdig ), 90 m_ISwxdig = _ISwb ( __ISwxdig ), 91 m_ISwa = _ISwb ( __ISwa ), 92 m_ISwt = _ISwb ( __ISwt ), 93 m_ISwgph = _ISwb ( __ISwgph ), 94 m_ISwbnk = _ISwb ( __ISwbnk ), 95 m_ISwl = _ISwb ( __ISwl ), 96 m_ISwpun = _ISwb ( __ISwpun ), 97 m_ISwnum = _ISwb ( __ISwnum ) 102 __BEGIN_DECLS 104 __BEGIN_NAMESPACE_C99 111  $iswnum ( wt_t __wc __THROW ; 117  $iswpha ( wt_t __wc __THROW ; 120  $iswl ( wt_t __wc __THROW ; 124  $iswdig ( wt_t __wc __THROW ; 128  $iswgph ( wt_t __wc __THROW ; 133  $iswlow ( wt_t __wc __THROW ; 136  $iswt ( wt_t __wc __THROW ; 141  $iswpun ( wt_t __wc __THROW ; 146  $iswa ( wt_t __wc __THROW ; 151  $iswu ( wt_t __wc __THROW ; 156  $iswxdig ( wt_t __wc __THROW ; 161 #ifde __USE_ISOC99 162  $iswbnk ( wt_t __wc __THROW ; 171 wy_t $wy (cڡ * __ݔty __THROW ; 175  $iswy ( wt_t __wc , wy_t __desc __THROW ; 176 __END_NAMESPACE_C99 183 __BEGIN_NAMESPACE_C99 186 cڡ t__t32_t * twns_t ; 187 __END_NAMESPACE_C99 188 #ifde __USE_GNU 189 $__USING_NAMESPACE_C99 ( wns_t ) 192 __BEGIN_NAMESPACE_C99 194 wt_t $towlow ( wt_t __wc __THROW ; 197 wt_t $towu ( wt_t __wc __THROW ; 198 __END_NAMESPACE_C99 200 __END_DECLS 207 #ifde _WCTYPE_H 213 __BEGIN_DECLS 215 __BEGIN_NAMESPACE_C99 218 wns_t $wns (cڡ * __ݔty __THROW ; 221 wt_t $towns ( wt_t __wc , wns_t __desc __THROW ; 222 __END_NAMESPACE_C99 224 #ifde __USE_XOPEN2K8 226  ~ 230  $iswnum_l ( wt_t __wc , __lo_t __lo __THROW ; 236  $iswpha_l ( wt_t __wc , __lo_t __lo __THROW ; 239  $iswl_l ( wt_t __wc , __lo_t __lo __THROW ; 243  $iswdig_l ( wt_t __wc , __lo_t __lo __THROW ; 247  $iswgph_l ( wt_t __wc , __lo_t __lo __THROW ; 252  $iswlow_l ( wt_t __wc , __lo_t __lo __THROW ; 255  $iswt_l ( wt_t __wc , __lo_t __lo __THROW ; 260  $iswpun_l ( wt_t __wc , __lo_t __lo __THROW ; 265  $iswa_l ( wt_t __wc , __lo_t __lo __THROW ; 270  $iswu_l ( wt_t __wc , __lo_t __lo __THROW ; 275  $iswxdig_l ( wt_t __wc , __lo_t __lo __THROW ; 280  $iswbnk_l ( wt_t __wc , __lo_t __lo __THROW ; 284 wy_t $wy_l (cڡ * __ݔty , __lo_t __lo ) 285 __THROW ; 289  $iswy_l ( wt_t __wc , wy_t __desc , __lo_t __lo ) 290 __THROW ; 298 wt_t $towlow_l ( wt_t __wc , __lo_t __lo __THROW ; 301 wt_t $towu_l ( wt_t __wc , __lo_t __lo __THROW ; 305 wns_t $wns_l (cڡ * __ݔty , __lo_t __lo ) 306 __THROW ; 309 wt_t $towns_l ( wt_t __wc , wns_t __desc , 310 __lo_t __lo __THROW ; 314 __END_DECLS @/usr/include/asm-generic/errno-base.h 1 #ide _ASM_GENERIC_ERRNO_BASE_H 2  #_ASM_GENERIC_ERRNO_BASE_H ) 4  #EPERM 1 ) 5  #ENOENT 2 ) 6  #ESRCH 3 ) 7  #EINTR 4 ) 8  #EIO 5 ) 9  #ENXIO 6 ) 10  #E2BIG 7 ) 11  #ENOEXEC 8 ) 12  #EBADF 9 ) 13  #ECHILD 10 ) 14  #EAGAIN 11 ) 15  #ENOMEM 12 ) 16  #EACCES 13 ) 17  #EFAULT 14 ) 18  #ENOTBLK 15 ) 19  #EBUSY 16 ) 20  #EEXIST 17 ) 21  #EXDEV 18 ) 22  #ENODEV 19 ) 23  #ENOTDIR 20 ) 24  #EISDIR 21 ) 25  #EINVAL 22 ) 26  #ENFILE 23 ) 27  #EMFILE 24 ) 28  #ENOTTY 25 ) 29  #ETXTBSY 26 ) 30  #EFBIG 27 ) 31  #ENOSPC 28 ) 32  #ESPIPE 29 ) 33  #EROFS 30 ) 34  #EMLINK 31 ) 35  #EPIPE 32 ) 36  #EDOM 33 ) 37  #ERANGE 34 ) @/usr/include/asm-generic/sockios.h 1 #ide __ASM_GENERIC_SOCKIOS_H 2  #__ASM_GENERIC_SOCKIOS_H ) 5  #FIOSETOWN 0x8901 ) 6  #SIOCSPGRP 0x8902 ) 7  #FIOGETOWN 0x8903 ) 8  #SIOCGPGRP 0x8904 ) 9  #SIOCATMARK 0x8905 ) 10  #SIOCGSTAMP 0x8906 ) 11  #SIOCGSTAMPNS 0x8907 ) @ 1 . 1 /usr/include 198 5604 VIL/acl/lib_acl.c VIL/acl/lib_acl.h VIL/alg/lib_ftp_alg.c VIL/alg/lib_ftp_alg.h VIL/alg/lib_sip_alg.c VIL/alg/lib_sip_alg.h VIL/conntrack/rte_cnxn_tracking.c VIL/conntrack/rte_cnxn_tracking.h VIL/conntrack/rte_ct_synproxy.c VIL/conntrack/rte_ct_tcp.c VIL/conntrack/rte_ct_tcp.h VIL/conntrack/rte_ct_udp.c VIL/l2l3_stack/bond.c VIL/l2l3_stack/hle.c VIL/l2l3_stack/hle.h VIL/l2l3_stack/interface.c VIL/l2l3_stack/interface.h VIL/l2l3_stack/l2_proto.c VIL/l2l3_stack/l2_proto.h VIL/l2l3_stack/l3fwd_common.h VIL/l2l3_stack/l3fwd_lpm4.c VIL/l2l3_stack/l3fwd_lpm4.h VIL/l2l3_stack/l3fwd_lpm6.c VIL/l2l3_stack/l3fwd_lpm6.h VIL/l2l3_stack/l3fwd_main.c VIL/l2l3_stack/lib_arp.c VIL/l2l3_stack/lib_arp.h VIL/l2l3_stack/lib_icmpv6.c VIL/l2l3_stack/lib_icmpv6.h VIL/l2l3_stack/main_l2l3.c VIL/l2l3_stack/tsx.c VIL/l2l3_stack/tsx.h VIL/pipeline_arpicmp/pipeline_arpicmp.c VIL/pipeline_arpicmp/pipeline_arpicmp.h VIL/pipeline_arpicmp/pipeline_arpicmp_be.c VIL/pipeline_arpicmp/pipeline_arpicmp_be.h VIL/pipeline_common/pipeline_common_be.c VIL/pipeline_common/pipeline_common_be.h VIL/pipeline_common/pipeline_common_fe.c VIL/pipeline_common/pipeline_common_fe.h VIL/pipeline_loadb/pipeline_loadb.c VIL/pipeline_loadb/pipeline_loadb.h VIL/pipeline_loadb/pipeline_loadb_be.c VIL/pipeline_loadb/pipeline_loadb_be.h VIL/pipeline_master/pipeline_master.c VIL/pipeline_master/pipeline_master.h VIL/pipeline_master/pipeline_master_be.c VIL/pipeline_master/pipeline_master_be.h VIL/pipeline_passthrough/pipeline_passthrough.c VIL/pipeline_passthrough/pipeline_passthrough.h VIL/pipeline_passthrough/pipeline_passthrough_be.c VIL/pipeline_passthrough/pipeline_passthrough_be.h VIL/pipeline_txrx/pipeline_txrx.c VIL/pipeline_txrx/pipeline_txrx.h VIL/pipeline_txrx/pipeline_txrx_be.c VIL/pipeline_txrx/pipeline_txrx_be.h vnf_common/app.h vnf_common/config_check.c vnf_common/config_parse.c vnf_common/config_parse_tm.c vnf_common/cpu_core_map.c vnf_common/cpu_core_map.h vnf_common/hash_func.h vnf_common/parser.h vnf_common/pipeline.h vnf_common/pipeline_actions_common.h vnf_common/pipeline_be.h vnf_common/thread.c vnf_common/thread.h vnf_common/thread_fe.c vnf_common/thread_fe.h vnf_common/vnf_common.c vnf_common/vnf_common.h vnf_common/vnf_define.h /usr/include/arpa/inet.h /usr/include/ctype.h /usr/include/errno.h /usr/include/execinfo.h /usr/include/fcntl.h /usr/include/getopt.h /usr/include/inttypes.h /usr/include/libgen.h /usr/include/math.h /usr/include/netinet/in.h /usr/include/setjmp.h /usr/include/signal.h /usr/include/stdint.h /usr/include/stdio.h /usr/include/stdlib.h /usr/include/string.h /usr/include/sys/param.h /usr/include/sys/queue.h /usr/include/sys/socket.h /usr/include/sys/types.h /usr/include/sys/wait.h /usr/include/time.h /usr/include/unistd.h /usr/include/alloca.h /usr/include/bits/byteswap.h /usr/include/bits/confname.h /usr/include/bits/environments.h /usr/include/bits/errno.h /usr/include/bits/fcntl.h /usr/include/bits/fcntl2.h /usr/include/bits/huge_val.h /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h /usr/include/bits/in.h /usr/include/bits/inf.h /usr/include/bits/math-finite.h /usr/include/bits/math-vector.h /usr/include/bits/mathcalls.h /usr/include/bits/mathdef.h /usr/include/bits/mathinline.h /usr/include/bits/nan.h /usr/include/bits/param.h /usr/include/bits/posix_opt.h /usr/include/bits/pthreadtypes.h /usr/include/bits/setjmp.h /usr/include/bits/setjmp2.h /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h /usr/include/bits/siginfo.h /usr/include/bits/signum.h /usr/include/bits/sigset.h /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h /usr/include/bits/socket.h /usr/include/bits/socket2.h /usr/include/bits/stat.h /usr/include/bits/stdio-ldbl.h /usr/include/bits/stdio.h /usr/include/bits/stdio2.h /usr/include/bits/stdio_lim.h /usr/include/bits/stdlib-bsearch.h /usr/include/bits/stdlib-float.h /usr/include/bits/stdlib-ldbl.h /usr/include/bits/stdlib.h /usr/include/bits/string.h /usr/include/bits/string2.h /usr/include/bits/string3.h /usr/include/bits/sys_errlist.h /usr/include/bits/time.h /usr/include/bits/types.h /usr/include/bits/unistd.h /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h /usr/include/bits/wchar.h /usr/include/bits/wordsize.h /usr/include/endian.h /usr/include/features.h /usr/include/libio.h /usr/include/limits.h /usr/include/sys/select.h /usr/include/sys/sysmacros.h /usr/include/sys/ucontext.h /usr/include/sys/uio.h /usr/include/xlocale.h /usr/include/_G_config.h /usr/include/asm/socket.h /usr/include/bits/byteswap-16.h /usr/include/bits/endian.h /usr/include/bits/fcntl-linux.h /usr/include/bits/libio-ldbl.h /usr/include/bits/libm-simd-decl-stubs.h /usr/include/bits/posix1_lim.h /usr/include/bits/posix2_lim.h /usr/include/bits/select.h /usr/include/bits/select2.h /usr/include/bits/sockaddr.h /usr/include/bits/socket_type.h /usr/include/bits/timex.h /usr/include/bits/typesizes.h /usr/include/bits/uio.h /usr/include/bits/xopen_lim.h /usr/include/gnu/stubs.h /usr/include/linux/errno.h /usr/include/linux/limits.h /usr/include/linux/param.h /usr/include/stdc-predef.h /usr/include/sys/cdefs.h /usr/include/asm-generic/socket.h /usr/include/asm/errno.h /usr/include/asm/param.h /usr/include/bits/local_lim.h /usr/include/gconv.h /usr/include/gnu/stubs-32.h /usr/include/gnu/stubs-64.h /usr/include/gnu/stubs-x32.h /usr/include/wchar.h /usr/include/asm-generic/errno.h /usr/include/asm-generic/param.h /usr/include/asm/sockios.h /usr/include/bits/wchar-ldbl.h /usr/include/bits/wchar2.h /usr/include/wctype.h /usr/include/asm-generic/errno-base.h /usr/include/asm-generic/sockios.h