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
802 ehdr = (struct tipc_ehdr *)skb->data; in tipc_aead_encrypt()
805 salt ^= __be32_to_cpu(ehdr->addr); in tipc_aead_encrypt()
809 memcpy(iv + 4, (u8 *)&ehdr->seqno, 8); in tipc_aead_encrypt()
812 ehsz = tipc_ehdr_size(ehdr); in tipc_aead_encrypt()
896 struct tipc_ehdr *ehdr; in tipc_aead_decrypt() local
927 ehdr = (struct tipc_ehdr *)skb->data; in tipc_aead_decrypt()
930 salt ^= __be32_to_cpu(ehdr->addr); in tipc_aead_decrypt()
931 else if (ehdr->destined) in tipc_aead_decrypt()
934 memcpy(iv + 4, (u8 *)&ehdr->seqno, 8); in tipc_aead_decrypt()
937 ehsz = tipc_ehdr_size(ehdr); in tipc_aead_decrypt()
1000 static inline int tipc_ehdr_size(struct tipc_ehdr *ehdr) in tipc_ehdr_size() argument
1002 return (ehdr->user != LINK_CONFIG) ? EHDR_SIZE : EHDR_CFG_SIZE; in tipc_ehdr_size()
1013 struct tipc_ehdr *ehdr; in tipc_ehdr_validate() local
1019 ehdr = (struct tipc_ehdr *)skb->data; in tipc_ehdr_validate()
1020 if (unlikely(ehdr->version != TIPC_EVERSION)) in tipc_ehdr_validate()
1022 ehsz = tipc_ehdr_size(ehdr); in tipc_ehdr_validate()
1046 struct tipc_ehdr *ehdr; in tipc_ehdr_build() local
1054 ehdr = (struct tipc_ehdr *)skb_push(skb, ehsz); in tipc_ehdr_build()
1070 ehdr->seqno = cpu_to_be64(seqno); in tipc_ehdr_build()
1073 ehdr->version = TIPC_EVERSION; in tipc_ehdr_build()
1074 ehdr->user = 0; in tipc_ehdr_build()
1075 ehdr->keepalive = 0; in tipc_ehdr_build()
1076 ehdr->tx_key = tx_key; in tipc_ehdr_build()
1077 ehdr->destined = (__rx) ? 1 : 0; in tipc_ehdr_build()
1078 ehdr->rx_key_active = (__rx) ? __rx->key.active : 0; in tipc_ehdr_build()
1079 ehdr->rx_nokey = (__rx) ? __rx->nokey : 0; in tipc_ehdr_build()
1080 ehdr->master_key = aead->crypto->key_master; in tipc_ehdr_build()
1081 ehdr->reserved_1 = 0; in tipc_ehdr_build()
1082 ehdr->reserved_2 = 0; in tipc_ehdr_build()
1086 ehdr->user = LINK_CONFIG; in tipc_ehdr_build()
1087 memcpy(ehdr->id, tipc_own_id(net), NODE_ID_LEN); in tipc_ehdr_build()
1091 ehdr->user = LINK_PROTOCOL; in tipc_ehdr_build()
1092 ehdr->keepalive = msg_is_keepalive(hdr); in tipc_ehdr_build()
1094 ehdr->addr = hdr->hdr[3]; in tipc_ehdr_build()
1394 struct tipc_ehdr *ehdr = (struct tipc_ehdr *)skb_network_header(skb); in tipc_crypto_key_synch() local
1404 rx->key_master = ehdr->master_key; in tipc_crypto_key_synch()
1409 if (!ehdr->destined || msg_short(hdr) || msg_destnode(hdr) != self) in tipc_crypto_key_synch()
1413 if (ehdr->rx_nokey) { in tipc_crypto_key_synch()
1432 new = ehdr->rx_key_active; in tipc_crypto_key_synch()
1906 struct tipc_ehdr *ehdr; in tipc_crypto_rcv_complete() local
1929 ehdr = (struct tipc_ehdr *)(*skb)->data; in tipc_crypto_rcv_complete()
1931 WARN_ON(ehdr->user != LINK_CONFIG); in tipc_crypto_rcv_complete()
1932 n = tipc_node_create(net, 0, ehdr->id, 0xffffu, 0, in tipc_crypto_rcv_complete()
1940 if (ehdr->tx_key == KEY_MASTER) in tipc_crypto_rcv_complete()
1945 if (tipc_crypto_key_attach(rx, tmp, ehdr->tx_key, false) < 0) { in tipc_crypto_rcv_complete()
1966 ehdr = (struct tipc_ehdr *)(*skb)->data; in tipc_crypto_rcv_complete()
1969 if (rx->key.passive && ehdr->tx_key == rx->key.passive) in tipc_crypto_rcv_complete()
1973 skb_pull(*skb, tipc_ehdr_size(ehdr)); in tipc_crypto_rcv_complete()