Lines Matching defs:ddp
59 #include <netat/ddp.h>
84 snmpStats_t snmpStats; /* snmp ddp & echo stats */
351 dPrintf(D_M_DDP, D_L_STARTUP, ("ddp:adding ifID_table[%d]\n", port));
355 ifID->ifPort = port; /* set ddp port # in ifID */
475 *ddp = (at_ddp_t *)gbuf_rptr(m),
479 if (UAS_VALUE(ddp->checksum)) {
481 UAS_ASSIGN_HTON(ddp->checksum, tmp);
489 NET_NET(tmp_ddp->src_net, ddp->src_net);
490 tmp_ddp->src_node = ddp->src_node;
491 tmp_ddp->src_socket = ddp->src_socket;
494 UAS_ASSIGN_HTON(ddp->checksum, tmp);
512 * Called to queue a atp/ddp data packet on the network interface.
524 register at_ddp_t *ddp;
543 ddp = (at_ddp_t *)gbuf_rptr(m);
553 if ((ddp->dst_socket > (unsigned) (DDP_SOCKET_LAST + 1)) ||
554 (ddp->dst_socket < DDP_SOCKET_1st_RESERVED)) {
557 ddp->dst_socket));
575 DDPLEN_ASSIGN(ddp, len);
576 ddp->hopcount =
577 ddp->unused = 0;
586 dst_net = NET_VALUE(ddp->dst_net);
592 if ((ddp->dst_node == 0xfe) &&
597 NET_ASSIGN(ddp->dst_net, ifID_home->ifARouter.s_net);
599 ddp->dst_node = ifID_home->ifARouter.s_node;
602 if (MULTIHOME_MODE && (ifIDTmp = forUs(ddp))) {
610 loop = ((ddp->dst_node == ifID->ifThisNode.s_node) &&
617 NET_ASSIGN(ddp->src_net, ifID->ifThisNode.s_net);
618 ddp->src_node = ifID->ifThisNode.s_node;
620 ddp->src_socket = src_socket;
624 NET_VALUE(ddp->dst_net),
625 ddp->dst_node,
632 ddp->src_socket, ddp->dst_socket));
641 if ((ddp->dst_socket == ZIP_SOCKET) &&
643 ddp->src_socket = src_socket;
721 ddp->src_node = ifID->ifThisNode.s_node;
722 NET_ASSIGN(ddp->src_net, ifID->ifThisNode.s_net);
724 ddp->src_socket = src_socket;
744 at_dest.atalk_node = ddp->dst_node;
766 ddp->src_node = ifID->ifThisNode.s_node;
767 NET_ASSIGN(ddp->src_net, ifID->ifThisNode.s_net);
771 ddp->src_node = ifID_home->ifThisNode.s_node;
772 NET_ASSIGN(ddp->src_net, ifID_home->ifThisNode.s_net);
774 ddp->src_socket = src_socket;
778 dst_net, ddp->dst_node, ddp->dst_socket, ifID->ifName));
790 /* the incoming frame is of the form {flag, address, ddp...}
832 /* At this point, rptr points to ddp header for sure */
852 * we don't want elap to be looking into ddp header, so
873 register at_ddp_t *ddp; /* DDP header */
901 * stripped in the lap level immediately below ddp
918 * form {extended ddp,...}. The packet is meant to go
925 * the form {ddp,...}.
936 * {extended ddp, ... }.
938 ddp = (at_ddp_t *)gbuf_rptr(mp);
939 len = DDPLEN_VALUE(ddp);
945 ("Length problems, ddp length %d, buffer length %d",
960 ("Length problems, ddp length %d, buffer length %d",
968 socket = ddp->dst_socket;
979 ddp->dst_socket));
987 if (UAS_VALUE(ddp->checksum) &&
988 (UAS_VALUE_NTOH(ddp->checksum) != ddp_checksum(mp, 4))) {
991 ddp_checksum(mp, 4), UAS_VALUE_NTOH(ddp->checksum)));
1020 dst_net = NET_VALUE(ddp->dst_net);
1023 forUs(ddp) ||
1025 ((ddp->dst_node == 255) &&
1036 if (ddp->type == DDP_ATP) {
1042 } else if (ddp->type == DDP_ADSP) {
1055 (gref->ddptype == 0 || gref->ddptype == ddp->type)) {
1062 ddp_in.sat_addr.s_net = NET_VALUE(ddp->src_net);
1063 ddp_in.sat_addr.s_node = ddp->src_node;
1064 ddp_in.sat_port = ddp->src_socket;
1100 ifID->ifPort, ddp->dst_socket));
1124 * address found in the ddp packet... This is the trick about routing, the
1137 register at_ddp_t *ddp;
1148 ddp = (at_ddp_t *)gbuf_rptr(mp);
1184 if ((ddp->dst_node == ifID->ifThisNode.s_node) &&
1185 (NET_VALUE(ddp->dst_net) == ifID->ifThisNode.s_net)) {
1188 ifID->ifPort, ddp->dst_socket));
1190 UAS_ASSIGN(ddp->checksum, 0);
1202 ifID->ifPort, NET_VALUE(ddp->dst_net), ddp->dst_node, router_net,
1211 ifID->ifPort, NET_VALUE(ddp->dst_net), ddp->dst_node));
1229 /* the incoming frame is of the form {flag, address, ddp...}
1272 /* At this point, rptr points to ddp header for sure */
1292 * we don't want elap to be looking into ddp header, so
1398 at_ifaddr_t *forUs(ddp)
1399 register at_ddp_t *ddp;
1404 if ((ddp->dst_node == ifID->ifThisNode.s_node) &&
1405 (NET_VALUE(ddp->dst_net) == ifID->ifThisNode.s_net)