Lines Matching refs:ehdr
270 static inline int tipc_ehdr_size(struct tipc_ehdr *ehdr);
731 struct tipc_ehdr *ehdr; in tipc_aead_encrypt() local
791 ehdr = (struct tipc_ehdr *)skb->data; in tipc_aead_encrypt()
794 salt ^= ehdr->addr; /* __be32 */ 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()
885 struct tipc_ehdr *ehdr; in tipc_aead_decrypt() local
922 ehdr = (struct tipc_ehdr *)skb->data; in tipc_aead_decrypt()
925 salt ^= ehdr->addr; /* __be32 */ in tipc_aead_decrypt()
926 else if (ehdr->destined) in tipc_aead_decrypt()
929 memcpy(iv + 4, (u8 *)&ehdr->seqno, 8); in tipc_aead_decrypt()
932 ehsz = tipc_ehdr_size(ehdr); in tipc_aead_decrypt()
995 static inline int tipc_ehdr_size(struct tipc_ehdr *ehdr) in tipc_ehdr_size() argument
997 return (ehdr->user != LINK_CONFIG) ? EHDR_SIZE : EHDR_CFG_SIZE; in tipc_ehdr_size()
1008 struct tipc_ehdr *ehdr; in tipc_ehdr_validate() local
1014 ehdr = (struct tipc_ehdr *)skb->data; in tipc_ehdr_validate()
1015 if (unlikely(ehdr->version != TIPC_EVERSION)) in tipc_ehdr_validate()
1017 ehsz = tipc_ehdr_size(ehdr); in tipc_ehdr_validate()
1041 struct tipc_ehdr *ehdr; in tipc_ehdr_build() local
1049 ehdr = (struct tipc_ehdr *)skb_push(skb, ehsz); in tipc_ehdr_build()
1065 ehdr->seqno = cpu_to_be64(seqno); in tipc_ehdr_build()
1068 ehdr->version = TIPC_EVERSION; in tipc_ehdr_build()
1069 ehdr->user = 0; in tipc_ehdr_build()
1070 ehdr->keepalive = 0; in tipc_ehdr_build()
1071 ehdr->tx_key = tx_key; in tipc_ehdr_build()
1072 ehdr->destined = (__rx) ? 1 : 0; in tipc_ehdr_build()
1073 ehdr->rx_key_active = (__rx) ? __rx->key.active : 0; in tipc_ehdr_build()
1074 ehdr->rx_nokey = (__rx) ? __rx->nokey : 0; in tipc_ehdr_build()
1075 ehdr->master_key = aead->crypto->key_master; in tipc_ehdr_build()
1076 ehdr->reserved_1 = 0; in tipc_ehdr_build()
1077 ehdr->reserved_2 = 0; in tipc_ehdr_build()
1081 ehdr->user = LINK_CONFIG; in tipc_ehdr_build()
1082 memcpy(ehdr->id, tipc_own_id(net), NODE_ID_LEN); in tipc_ehdr_build()
1086 ehdr->user = LINK_PROTOCOL; in tipc_ehdr_build()
1087 ehdr->keepalive = msg_is_keepalive(hdr); in tipc_ehdr_build()
1089 ehdr->addr = hdr->hdr[3]; in tipc_ehdr_build()
1389 struct tipc_ehdr *ehdr = (struct tipc_ehdr *)skb_network_header(skb); in tipc_crypto_key_synch() local
1399 rx->key_master = ehdr->master_key; in tipc_crypto_key_synch()
1404 if (!ehdr->destined || msg_short(hdr) || msg_destnode(hdr) != self) in tipc_crypto_key_synch()
1408 if (ehdr->rx_nokey) { in tipc_crypto_key_synch()
1427 new = ehdr->rx_key_active; in tipc_crypto_key_synch()
1899 struct tipc_ehdr *ehdr; in tipc_crypto_rcv_complete() local
1922 ehdr = (struct tipc_ehdr *)(*skb)->data; in tipc_crypto_rcv_complete()
1924 WARN_ON(ehdr->user != LINK_CONFIG); in tipc_crypto_rcv_complete()
1925 n = tipc_node_create(net, 0, ehdr->id, 0xffffu, 0, in tipc_crypto_rcv_complete()
1933 if (ehdr->tx_key == KEY_MASTER) in tipc_crypto_rcv_complete()
1937 if (tipc_crypto_key_attach(rx, tmp, ehdr->tx_key, false) < 0) { in tipc_crypto_rcv_complete()
1958 ehdr = (struct tipc_ehdr *)(*skb)->data; in tipc_crypto_rcv_complete()
1961 if (rx->key.passive && ehdr->tx_key == rx->key.passive) in tipc_crypto_rcv_complete()
1965 skb_pull(*skb, tipc_ehdr_size(ehdr)); in tipc_crypto_rcv_complete()