Lines Matching refs:ehdr

274 static inline int tipc_ehdr_size(struct tipc_ehdr *ehdr);
742 struct tipc_ehdr *ehdr; in tipc_aead_encrypt() local
791 ehdr = (struct tipc_ehdr *)skb->data; in tipc_aead_encrypt()
794 salt ^= __be32_to_cpu(ehdr->addr); in tipc_aead_encrypt()
798 memcpy(iv + 4, (u8 *)&ehdr->seqno, 8); in tipc_aead_encrypt()
801 ehsz = tipc_ehdr_size(ehdr); in tipc_aead_encrypt()
894 struct tipc_ehdr *ehdr; in tipc_aead_decrypt() local
925 ehdr = (struct tipc_ehdr *)skb->data; in tipc_aead_decrypt()
928 salt ^= __be32_to_cpu(ehdr->addr); in tipc_aead_decrypt()
929 else if (ehdr->destined) in tipc_aead_decrypt()
932 memcpy(iv + 4, (u8 *)&ehdr->seqno, 8); in tipc_aead_decrypt()
935 ehsz = tipc_ehdr_size(ehdr); in tipc_aead_decrypt()
998 static inline int tipc_ehdr_size(struct tipc_ehdr *ehdr) in tipc_ehdr_size() argument
1000 return (ehdr->user != LINK_CONFIG) ? EHDR_SIZE : EHDR_CFG_SIZE; in tipc_ehdr_size()
1011 struct tipc_ehdr *ehdr; in tipc_ehdr_validate() local
1017 ehdr = (struct tipc_ehdr *)skb->data; in tipc_ehdr_validate()
1018 if (unlikely(ehdr->version != TIPC_EVERSION)) in tipc_ehdr_validate()
1020 ehsz = tipc_ehdr_size(ehdr); in tipc_ehdr_validate()
1044 struct tipc_ehdr *ehdr; in tipc_ehdr_build() local
1052 ehdr = (struct tipc_ehdr *)skb_push(skb, ehsz); in tipc_ehdr_build()
1068 ehdr->seqno = cpu_to_be64(seqno); in tipc_ehdr_build()
1071 ehdr->version = TIPC_EVERSION; in tipc_ehdr_build()
1072 ehdr->user = 0; in tipc_ehdr_build()
1073 ehdr->keepalive = 0; in tipc_ehdr_build()
1074 ehdr->tx_key = tx_key; in tipc_ehdr_build()
1075 ehdr->destined = (__rx) ? 1 : 0; in tipc_ehdr_build()
1076 ehdr->rx_key_active = (__rx) ? __rx->key.active : 0; in tipc_ehdr_build()
1077 ehdr->rx_nokey = (__rx) ? __rx->nokey : 0; in tipc_ehdr_build()
1078 ehdr->master_key = aead->crypto->key_master; in tipc_ehdr_build()
1079 ehdr->reserved_1 = 0; in tipc_ehdr_build()
1080 ehdr->reserved_2 = 0; in tipc_ehdr_build()
1084 ehdr->user = LINK_CONFIG; in tipc_ehdr_build()
1085 memcpy(ehdr->id, tipc_own_id(net), NODE_ID_LEN); in tipc_ehdr_build()
1089 ehdr->user = LINK_PROTOCOL; in tipc_ehdr_build()
1090 ehdr->keepalive = msg_is_keepalive(hdr); in tipc_ehdr_build()
1092 ehdr->addr = hdr->hdr[3]; in tipc_ehdr_build()
1392 struct tipc_ehdr *ehdr = (struct tipc_ehdr *)skb_network_header(skb); in tipc_crypto_key_synch() local
1402 rx->key_master = ehdr->master_key; in tipc_crypto_key_synch()
1407 if (!ehdr->destined || msg_short(hdr) || msg_destnode(hdr) != self) in tipc_crypto_key_synch()
1411 if (ehdr->rx_nokey) { in tipc_crypto_key_synch()
1430 new = ehdr->rx_key_active; in tipc_crypto_key_synch()
1904 struct tipc_ehdr *ehdr; in tipc_crypto_rcv_complete() local
1927 ehdr = (struct tipc_ehdr *)(*skb)->data; in tipc_crypto_rcv_complete()
1929 WARN_ON(ehdr->user != LINK_CONFIG); in tipc_crypto_rcv_complete()
1930 n = tipc_node_create(net, 0, ehdr->id, 0xffffu, 0, in tipc_crypto_rcv_complete()
1938 if (ehdr->tx_key == KEY_MASTER) in tipc_crypto_rcv_complete()
1943 if (tipc_crypto_key_attach(rx, tmp, ehdr->tx_key, false) < 0) { in tipc_crypto_rcv_complete()
1964 ehdr = (struct tipc_ehdr *)(*skb)->data; in tipc_crypto_rcv_complete()
1967 if (rx->key.passive && ehdr->tx_key == rx->key.passive) in tipc_crypto_rcv_complete()
1971 skb_pull(*skb, tipc_ehdr_size(ehdr)); in tipc_crypto_rcv_complete()