Lines Matching refs:hdr

268 	struct tipc_msg *hdr;  in tipc_link_create()  local
275 hdr = l->pmsg; in tipc_link_create()
276 tipc_msg_init(ownnode, hdr, LINK_PROTOCOL, RESET_MSG, INT_H_SIZE, peer); in tipc_link_create()
277 msg_set_size(hdr, sizeof(l->proto_msg)); in tipc_link_create()
278 msg_set_session(hdr, session); in tipc_link_create()
279 msg_set_bearer_id(hdr, l->bearer_id); in tipc_link_create()
285 strcpy((char *)msg_data(hdr), if_name); in tipc_link_create()
714 struct tipc_msg *hdr = buf_msg(skb_peek(list)); in tipc_link_xmit() local
716 unsigned int i, imp = msg_importance(hdr); in tipc_link_xmit()
730 if (unlikely(msg_size(hdr) > mtu)) in tipc_link_xmit()
736 hdr = buf_msg(skb); in tipc_link_xmit()
737 msg_set_seqno(hdr, seqno); in tipc_link_xmit()
738 msg_set_ack(hdr, ack); in tipc_link_xmit()
739 msg_set_bcast_ack(hdr, bc_ack); in tipc_link_xmit()
753 if (tipc_msg_bundle(skb_peek_tail(backlogq), hdr, mtu)) { in tipc_link_xmit()
758 if (tipc_msg_make_bundle(&bskb, hdr, mtu, l->addr)) { in tipc_link_xmit()
776 struct tipc_msg *hdr; in tipc_link_advance_backlog() local
789 hdr = buf_msg(skb); in tipc_link_advance_backlog()
790 l->backlog[msg_importance(hdr)].len--; in tipc_link_advance_backlog()
794 msg_set_seqno(hdr, seqno); in tipc_link_advance_backlog()
795 msg_set_ack(hdr, ack); in tipc_link_advance_backlog()
796 msg_set_bcast_ack(hdr, bc_ack); in tipc_link_advance_backlog()
805 struct tipc_msg *hdr = buf_msg(skb); in link_retransmit_failure() local
810 msg_user(hdr), msg_type(hdr), msg_size(hdr), msg_errcode(hdr)); in link_retransmit_failure()
812 msg_seqno(hdr), msg_prevnode(hdr), msg_orignode(hdr)); in link_retransmit_failure()
819 struct tipc_msg *hdr; in tipc_link_retrans() local
844 hdr = buf_msg(skb); in tipc_link_retrans()
848 hdr = buf_msg(_skb); in tipc_link_retrans()
849 msg_set_ack(hdr, ack); in tipc_link_retrans()
850 msg_set_bcast_ack(hdr, bc_ack); in tipc_link_retrans()
897 struct tipc_msg *hdr = buf_msg(skb); in tipc_link_input() local
901 int usr = msg_user(hdr); in tipc_link_input()
907 if (msg_type(hdr) == SYNCH_MSG) { in tipc_link_input()
915 hdr = buf_msg(skb); in tipc_link_input()
916 if (less(msg_seqno(hdr), l->drop_point)) in tipc_link_input()
920 usr = msg_user(hdr); in tipc_link_input()
927 l->stats.recv_bundled += msg_msgcnt(hdr); in tipc_link_input()
944 tipc_link_bc_init_rcv(l->bc_rcvlink, hdr); in tipc_link_input()
1027 struct tipc_msg *hdr; in tipc_link_rcv() local
1032 hdr = buf_msg(skb); in tipc_link_rcv()
1033 seqno = msg_seqno(hdr); in tipc_link_rcv()
1038 if (unlikely(msg_user(hdr) == LINK_PROTOCOL)) in tipc_link_rcv()
1057 if (likely(tipc_link_release_pkts(l, msg_ack(hdr)))) { in tipc_link_rcv()
1111 struct tipc_msg *hdr = l->pmsg; in tipc_link_build_proto_msg() local
1118 msg_set_type(hdr, mtyp); in tipc_link_build_proto_msg()
1119 msg_set_net_plane(hdr, l->net_plane); in tipc_link_build_proto_msg()
1120 msg_set_next_sent(hdr, l->snd_nxt); in tipc_link_build_proto_msg()
1121 msg_set_ack(hdr, l->rcv_nxt - 1); in tipc_link_build_proto_msg()
1122 msg_set_bcast_ack(hdr, l->bc_rcvlink->rcv_nxt - 1); in tipc_link_build_proto_msg()
1123 msg_set_last_bcast(hdr, l->bc_sndlink->snd_nxt - 1); in tipc_link_build_proto_msg()
1124 msg_set_link_tolerance(hdr, tolerance); in tipc_link_build_proto_msg()
1125 msg_set_linkprio(hdr, priority); in tipc_link_build_proto_msg()
1126 msg_set_redundant_link(hdr, node_up); in tipc_link_build_proto_msg()
1127 msg_set_seq_gap(hdr, 0); in tipc_link_build_proto_msg()
1130 msg_set_seqno(hdr, l->snd_nxt + U16_MAX / 2); in tipc_link_build_proto_msg()
1140 msg_set_seq_gap(hdr, rcvgap); in tipc_link_build_proto_msg()
1143 msg_set_probe(hdr, probe); in tipc_link_build_proto_msg()
1150 msg_set_max_pkt(hdr, l->advertised_mtu); in tipc_link_build_proto_msg()
1151 msg_set_ack(hdr, l->rcv_nxt - 1); in tipc_link_build_proto_msg()
1152 msg_set_next_sent(hdr, 1); in tipc_link_build_proto_msg()
1154 skb = tipc_buf_acquire(msg_size(hdr)); in tipc_link_build_proto_msg()
1157 skb_copy_to_linear_data(skb, hdr, msg_size(hdr)); in tipc_link_build_proto_msg()
1169 struct tipc_msg *hdr, tnlhdr; in tipc_link_tnl_prepare() local
1201 hdr = buf_msg(skb); in tipc_link_tnl_prepare()
1203 msg_set_seqno(hdr, seqno++); in tipc_link_tnl_prepare()
1204 pktlen = msg_size(hdr); in tipc_link_tnl_prepare()
1212 skb_copy_to_linear_data_offset(tnlskb, INT_H_SIZE, hdr, pktlen); in tipc_link_tnl_prepare()
1237 struct tipc_msg *hdr = buf_msg(skb); in tipc_link_proto_rcv() local
1239 u16 ack = msg_ack(hdr); in tipc_link_proto_rcv()
1240 u16 gap = msg_seq_gap(hdr); in tipc_link_proto_rcv()
1241 u16 peers_snd_nxt = msg_next_sent(hdr); in tipc_link_proto_rcv()
1242 u16 peers_tol = msg_link_tolerance(hdr); in tipc_link_proto_rcv()
1243 u16 peers_prio = msg_linkprio(hdr); in tipc_link_proto_rcv()
1245 int mtyp = msg_type(hdr); in tipc_link_proto_rcv()
1252 if (link_own_addr(l) > msg_prevnode(hdr)) in tipc_link_proto_rcv()
1253 l->net_plane = msg_net_plane(hdr); in tipc_link_proto_rcv()
1259 if ((less_eq(msg_session(hdr), l->peer_session)) && in tipc_link_proto_rcv()
1270 if (msg_data_sz(hdr) < TIPC_MAX_IF_NAME) in tipc_link_proto_rcv()
1272 strncpy(if_name, msg_data(hdr), TIPC_MAX_IF_NAME); in tipc_link_proto_rcv()
1290 l->peer_session = msg_session(hdr); in tipc_link_proto_rcv()
1291 l->peer_bearer_id = msg_bearer_id(hdr); in tipc_link_proto_rcv()
1292 if (l->mtu > msg_max_pkt(hdr)) in tipc_link_proto_rcv()
1293 l->mtu = msg_max_pkt(hdr); in tipc_link_proto_rcv()
1304 if (msg_probe(hdr)) in tipc_link_proto_rcv()
1316 if (rcvgap || (msg_probe(hdr))) in tipc_link_proto_rcv()
1343 struct tipc_msg *hdr; in tipc_link_build_bc_proto_msg() local
1352 hdr = buf_msg(skb); in tipc_link_build_bc_proto_msg()
1353 msg_set_last_bcast(hdr, l->bc_sndlink->snd_nxt - 1); in tipc_link_build_bc_proto_msg()
1354 msg_set_bcast_ack(hdr, ack); in tipc_link_build_bc_proto_msg()
1355 msg_set_bcgap_after(hdr, ack); in tipc_link_build_bc_proto_msg()
1358 msg_set_bcgap_to(hdr, gap_to); in tipc_link_build_bc_proto_msg()
1359 msg_set_non_seq(hdr, bcast); in tipc_link_build_bc_proto_msg()
1382 void tipc_link_bc_init_rcv(struct tipc_link *l, struct tipc_msg *hdr) in tipc_link_bc_init_rcv() argument
1384 int mtyp = msg_type(hdr); in tipc_link_bc_init_rcv()
1385 u16 peers_snd_nxt = msg_bc_snd_nxt(hdr); in tipc_link_bc_init_rcv()
1390 if (msg_user(hdr) == BCAST_PROTOCOL) { in tipc_link_bc_init_rcv()
1399 if (msg_peer_node_is_up(hdr)) in tipc_link_bc_init_rcv()
1409 void tipc_link_bc_sync_rcv(struct tipc_link *l, struct tipc_msg *hdr, in tipc_link_bc_sync_rcv() argument
1412 u16 peers_snd_nxt = msg_bc_snd_nxt(hdr); in tipc_link_bc_sync_rcv()
1417 if (!msg_peer_node_is_up(hdr)) in tipc_link_bc_sync_rcv()
1487 struct tipc_msg *hdr = buf_msg(skb); in tipc_link_bc_nack_rcv() local
1488 u32 dnode = msg_destnode(hdr); in tipc_link_bc_nack_rcv()
1489 int mtyp = msg_type(hdr); in tipc_link_bc_nack_rcv()
1490 u16 acked = msg_bcast_ack(hdr); in tipc_link_bc_nack_rcv()
1492 u16 to = msg_bcgap_to(hdr); in tipc_link_bc_nack_rcv()
1777 void *hdr; in __tipc_nl_add_link() local
1782 hdr = genlmsg_put(msg->skb, msg->portid, msg->seq, &tipc_genl_family, in __tipc_nl_add_link()
1784 if (!hdr) in __tipc_nl_add_link()
1829 genlmsg_end(msg->skb, hdr); in __tipc_nl_add_link()
1838 genlmsg_cancel(msg->skb, hdr); in __tipc_nl_add_link()