Lines Matching defs:ehdr

274 static inline int tipc_ehdr_size(struct tipc_ehdr *ehdr);
742 struct tipc_ehdr *ehdr;
791 ehdr = (struct tipc_ehdr *)skb->data;
794 salt ^= __be32_to_cpu(ehdr->addr);
798 memcpy(iv + 4, (u8 *)&ehdr->seqno, 8);
801 ehsz = tipc_ehdr_size(ehdr);
885 struct tipc_ehdr *ehdr;
916 ehdr = (struct tipc_ehdr *)skb->data;
919 salt ^= __be32_to_cpu(ehdr->addr);
920 else if (ehdr->destined)
923 memcpy(iv + 4, (u8 *)&ehdr->seqno, 8);
926 ehsz = tipc_ehdr_size(ehdr);
989 static inline int tipc_ehdr_size(struct tipc_ehdr *ehdr)
991 return (ehdr->user != LINK_CONFIG) ? EHDR_SIZE : EHDR_CFG_SIZE;
1002 struct tipc_ehdr *ehdr;
1008 ehdr = (struct tipc_ehdr *)skb->data;
1009 if (unlikely(ehdr->version != TIPC_EVERSION))
1011 ehsz = tipc_ehdr_size(ehdr);
1035 struct tipc_ehdr *ehdr;
1043 ehdr = (struct tipc_ehdr *)skb_push(skb, ehsz);
1059 ehdr->seqno = cpu_to_be64(seqno);
1062 ehdr->version = TIPC_EVERSION;
1063 ehdr->user = 0;
1064 ehdr->keepalive = 0;
1065 ehdr->tx_key = tx_key;
1066 ehdr->destined = (__rx) ? 1 : 0;
1067 ehdr->rx_key_active = (__rx) ? __rx->key.active : 0;
1068 ehdr->rx_nokey = (__rx) ? __rx->nokey : 0;
1069 ehdr->master_key = aead->crypto->key_master;
1070 ehdr->reserved_1 = 0;
1071 ehdr->reserved_2 = 0;
1075 ehdr->user = LINK_CONFIG;
1076 memcpy(ehdr->id, tipc_own_id(net), NODE_ID_LEN);
1080 ehdr->user = LINK_PROTOCOL;
1081 ehdr->keepalive = msg_is_keepalive(hdr);
1083 ehdr->addr = hdr->hdr[3];
1369 * @skb: TIPCv2 message buffer (incl. the ehdr from peer)
1383 struct tipc_ehdr *ehdr = (struct tipc_ehdr *)skb_network_header(skb);
1393 rx->key_master = ehdr->master_key;
1398 if (!ehdr->destined || msg_short(hdr) || msg_destnode(hdr) != self)
1402 if (ehdr->rx_nokey) {
1421 new = ehdr->rx_key_active;
1895 struct tipc_ehdr *ehdr;
1918 ehdr = (struct tipc_ehdr *)(*skb)->data;
1920 WARN_ON(ehdr->user != LINK_CONFIG);
1921 n = tipc_node_create(net, 0, ehdr->id, 0xffffu, 0,
1929 if (ehdr->tx_key == KEY_MASTER)
1934 if (tipc_crypto_key_attach(rx, tmp, ehdr->tx_key, false) < 0) {
1954 /* Remove ehdr & auth. tag prior to tipc_rcv() */
1955 ehdr = (struct tipc_ehdr *)(*skb)->data;
1958 if (rx->key.passive && ehdr->tx_key == rx->key.passive)
1962 skb_pull(*skb, tipc_ehdr_size(ehdr));