Lines Matching defs:clnp

80 #include <netiso/clnp.h>
142 * PURPOSE: output the data in the mbuf as a clnp datagram
144 * The data specified by m0 is sent as a clnp datagram.
151 * clnp rules. Options will not be freed.
163 * be send as raw clnp.
174 * CLNP_NO_CKSUM - don't compute clnp checksum
177 * When checking for a cached packet, clnp checks
182 * must invalidate the clnp cache. It might be perferable
183 * to have clnp check that the route has the same dest, but
195 struct mbuf *m = m0; /* mbuf for clnp header chain */
196 struct clnp_fixed *clnp; /* ptr to fixed part of hdr */
282 clnp = mtod(m, struct clnp_fixed *);
284 struct clnp_optidx *oidx = NULL; /* index to clnp options */
411 clnp = mtod(m, struct clnp_fixed *);
418 *clnp = raw_template;
420 *clnp = echo_template;
422 *clnp = echor_template;
424 *clnp = dt_template;
427 clnp->cnf_type &= ~CNF_SEG_OK;
429 clnp->cnf_type &= ~CNF_ERR_OK;
487 hoff = (char *) clnp + sizeof(struct clnp_fixed);
494 if (clnp->cnf_type & CNF_SEG_OK) {
495 clcp->clc_segoff = hoff - (char *)clnp;
498 clnp->cnf_hdr_len = m->m_len = (u_char)(hoff - (char *)clnp);
499 hdrlen = clnp->cnf_hdr_len;
510 clnp->cnf_hdr_len += sizeof(qos_option);
531 clnp->cnf_hdr_len += opt_copy->m_len;
542 clcp->clc_hdr = m_copy(m, 0, (int) clnp->cnf_hdr_len);
554 total_len = clnp->cnf_hdr_len + datalen;
555 if (clnp->cnf_type & CNF_SEG_OK) {
560 (void)memcpy((char *)clnp + clcp->clc_segoff, &seg_part,
564 HTOC(clnp->cnf_seglen_msb, clnp->cnf_seglen_lsb, total_len);
567 * Compute clnp checksum (on header only)
570 HTOC(clnp->cnf_cksum_msb, clnp->cnf_cksum_lsb, 0);
572 iso_gen_csum(m, CLNP_CKSUM_OFF, (int) clnp->cnf_hdr_len);