Lines Matching refs:value
291 app_uid_stats_value *value = bpf_map_lookup_elem(&app_uid_stats_map, &sock_uid);
292 if (value == NULL) {
295 value = bpf_map_lookup_elem(&app_uid_stats_map, &sock_uid);
297 if (value != NULL) {
298 __sync_fetch_and_add(&value->rxPackets, 1);
299 __sync_fetch_and_add(&value->rxBytes, skb->len);
381 app_uid_stats_value *value = bpf_map_lookup_elem(&app_uid_stats_map, &sock_uid);
382 if (value == NULL) {
385 value = bpf_map_lookup_elem(&app_uid_stats_map, &sock_uid);
387 if (value != NULL) {
388 __sync_fetch_and_add(&value->txPackets, 1);
389 __sync_fetch_and_add(&value->txBytes, skb->len);
467 sock_permission_value *value = bpf_map_lookup_elem(map_ptr, &uid);
468 // value == NULL means that the process attached to this uid is not a hap process which started by appspawn
470 if (value == NULL) {
473 // *value == 0 means no permission
474 if (*value == 0) {
498 net_bear_type_map_value *net_bear_type, uid_access_policy_value *value)
501 (!value->wifiPolicy)) ||
503 (!value->cellularPolicy))) {
531 uid_access_policy_value *value = bpf_map_lookup_elem(map_ptr, &uid);
532 // value == NULL means that the process attached to this uid is not a hap process which has a default configuration
533 if (value == NULL) {
546 if (socket_check_network_policy(net_bear_mark_type, net_bear_type, value) == 0) {
547 if (value->diagAckFlag) {
552 if (value->configSetFromFlag) {
554 value->diagAckFlag = 1;
557 value->netIfIndex = *net_bear_type;
558 bpf_map_update_elem(map_ptr, &uid, value, BPF_NOEXIST);
562 value->netIfIndex = *net_bear_type;
563 bpf_map_update_elem(map_ptr, &uid, value, BPF_NOEXIST);
577 uid_access_policy_value *value = bpf_map_lookup_elem(map_ptr, &uid);
578 // value == NULL means that the process attached to this uid is not a hap process which has a default configuration
579 if (value == NULL) {
592 if (socket_check_network_policy(net_bear_mark_type, net_bear_type, value) == 0) {
593 if (value->diagAckFlag) {
598 if (value->configSetFromFlag) {
600 value->diagAckFlag = 1;
603 value->netIfIndex = *net_bear_type;
604 bpf_map_update_elem(map_ptr, &uid, value, BPF_NOEXIST);
608 value->netIfIndex = *net_bear_type;
609 bpf_map_update_elem(map_ptr, &uid, value, BPF_NOEXIST);
623 uid_access_policy_value *value = bpf_map_lookup_elem(map_ptr, &uid);
624 // value == NULL means that the process attached to this uid is not a hap process which has a default configuration
625 if (value == NULL) {
638 if (socket_check_network_policy(net_bear_mark_type, net_bear_type, value) == 0) {
639 if (value->diagAckFlag) {
644 if (value->configSetFromFlag) {
646 value->diagAckFlag = 1;
649 value->netIfIndex = *net_bear_type;
650 bpf_map_update_elem(map_ptr, &uid, value, BPF_NOEXIST);
654 value->netIfIndex = *net_bear_type;
655 bpf_map_update_elem(map_ptr, &uid, value, BPF_NOEXIST);
670 uid_access_policy_value *value = bpf_map_lookup_elem(map_ptr, &uid);
671 // value == NULL means that the process attached to this uid is not a hap process which has a default configuration
672 if (value == NULL) {
685 if (socket_check_network_policy(net_bear_mark_type, net_bear_type, value) == 0) {
686 if (value->diagAckFlag) {
691 if (value->configSetFromFlag) {
693 value->diagAckFlag = 1;
696 value->netIfIndex = *net_bear_type;
697 bpf_map_update_elem(map_ptr, &uid, value, BPF_NOEXIST);
701 value->netIfIndex = *net_bear_type;
702 bpf_map_update_elem(map_ptr, &uid, value, BPF_NOEXIST);
716 uid_access_policy_value *value = bpf_map_lookup_elem(map_ptr, &uid);
717 // value == NULL means that the process attached to this uid is not a hap process which has a default configuration
718 if (value == NULL) {
731 if (socket_check_network_policy(net_bear_mark_type, net_bear_type, value) == 0) {
732 if (value->diagAckFlag) {
737 if (value->configSetFromFlag) {
739 value->diagAckFlag = 1;
742 value->netIfIndex = *net_bear_type;
743 bpf_map_update_elem(map_ptr, &uid, value, BPF_NOEXIST);
747 value->netIfIndex = *net_bear_type;
748 bpf_map_update_elem(map_ptr, &uid, value, BPF_NOEXIST);
762 uid_access_policy_value *value = bpf_map_lookup_elem(map_ptr, &uid);
763 // value == NULL means that the process attached to this uid is not a hap process which has a default configuration
764 if (value == NULL) {
777 if (socket_check_network_policy(net_bear_mark_type, net_bear_type, value) == 0) {
778 if (value->diagAckFlag) {
783 if (value->configSetFromFlag) {
785 value->diagAckFlag = 1;
788 value->netIfIndex = *net_bear_type;
789 bpf_map_update_elem(map_ptr, &uid, value, BPF_NOEXIST);
793 value->netIfIndex = *net_bear_type;
794 bpf_map_update_elem(map_ptr, &uid, value, BPF_NOEXIST);