Lines Matching refs:ehdr
272 static inline int tipc_ehdr_size(struct tipc_ehdr *ehdr);
731 struct tipc_ehdr *ehdr;
780 ehdr = (struct tipc_ehdr *)skb->data;
783 salt ^= __be32_to_cpu(ehdr->addr);
787 memcpy(iv + 4, (u8 *)&ehdr->seqno, 8);
790 ehsz = tipc_ehdr_size(ehdr);
883 struct tipc_ehdr *ehdr;
914 ehdr = (struct tipc_ehdr *)skb->data;
917 salt ^= __be32_to_cpu(ehdr->addr);
918 else if (ehdr->destined)
921 memcpy(iv + 4, (u8 *)&ehdr->seqno, 8);
924 ehsz = tipc_ehdr_size(ehdr);
996 static inline int tipc_ehdr_size(struct tipc_ehdr *ehdr)
998 return (ehdr->user != LINK_CONFIG) ? EHDR_SIZE : EHDR_CFG_SIZE;
1009 struct tipc_ehdr *ehdr;
1015 ehdr = (struct tipc_ehdr *)skb->data;
1016 if (unlikely(ehdr->version != TIPC_EVERSION))
1018 ehsz = tipc_ehdr_size(ehdr);
1042 struct tipc_ehdr *ehdr;
1050 ehdr = (struct tipc_ehdr *)skb_push(skb, ehsz);
1063 ehdr->seqno = cpu_to_be64(seqno);
1066 ehdr->version = TIPC_EVERSION;
1067 ehdr->user = 0;
1068 ehdr->keepalive = 0;
1069 ehdr->tx_key = tx_key;
1070 ehdr->destined = (__rx) ? 1 : 0;
1071 ehdr->rx_key_active = (__rx) ? __rx->key.active : 0;
1072 ehdr->rx_nokey = (__rx) ? __rx->nokey : 0;
1073 ehdr->master_key = aead->crypto->key_master;
1074 ehdr->reserved_1 = 0;
1075 ehdr->reserved_2 = 0;
1079 ehdr->user = LINK_CONFIG;
1080 memcpy(ehdr->id, tipc_own_id(net), NODE_ID_LEN);
1084 ehdr->user = LINK_PROTOCOL;
1085 ehdr->keepalive = msg_is_keepalive(hdr);
1087 ehdr->addr = hdr->hdr[3];
1372 * @skb: TIPCv2 message buffer (incl. the ehdr from peer)
1384 struct tipc_ehdr *ehdr = (struct tipc_ehdr *)skb_network_header(skb);
1394 rx->key_master = ehdr->master_key;
1399 if (!ehdr->destined || msg_short(hdr) || msg_destnode(hdr) != self)
1403 if (ehdr->rx_nokey) {
1422 new = ehdr->rx_key_active;
1894 struct tipc_ehdr *ehdr;
1917 ehdr = (struct tipc_ehdr *)(*skb)->data;
1919 WARN_ON(ehdr->user != LINK_CONFIG);
1920 n = tipc_node_create(net, 0, ehdr->id, 0xffffu, 0,
1928 if (ehdr->tx_key == KEY_MASTER)
1933 if (tipc_crypto_key_attach(rx, tmp, ehdr->tx_key, false) < 0) {
1953 /* Remove ehdr & auth. tag prior to tipc_rcv() */
1954 ehdr = (struct tipc_ehdr *)(*skb)->data;
1957 if (rx->key.passive && ehdr->tx_key == rx->key.passive)
1961 skb_pull(*skb, tipc_ehdr_size(ehdr));