Lines Matching defs:from

21  *    may be used to endorse or promote products derived from this software
60 struct sockaddr_in *from;
64 from = (struct sockaddr_in *)msg->msg_name;
66 /* First see if this packet came from a remote gateway. */
67 if (findremote && ((ifp = findremoteif(from->sin_addr.s_addr)) != NULL))
71 * It did not come from a remote gateway. Determine which
85 if (ifp1->int_addr == from->sin_addr.s_addr)
89 on_net(from->sin_addr.s_addr, ifp1->int_net,
105 return (iflookup(from->sin_addr.s_addr));
114 struct sockaddr_in from;
126 msg.msg_name = &from;
130 msg.msg_namelen = sizeof (from);
147 input(&from, ifp, &inbuf.rip, cc);
154 input(struct sockaddr_in *from, /* received from this IP address */
159 #define FROM_NADDR from->sin_addr.s_addr
177 /* Notice when we hear from a remote gateway */
181 trace_rip("Recv", "from", from, ifp, rip, cc);
198 "RIP version 0, cmd %d, packet received from %s",
205 "Treating RIP version %d packet received from %s as "
213 "packet at least %d bytes too long received from %s",
233 "RIPv2 message with authentication from %s discarded",
259 } else if (from->sin_port == htons(RIP_PORT)) {
265 /* did the request come from a router? */
266 if (!poll_answer && (from->sin_port == htons(RIP_PORT))) {
293 msglim(&bad_len, FROM_NADDR, "empty request from %s",
299 "request of bad length (%d) from %s",
348 * Answer a full-table query from a utility
352 (from->sin_port != htons(RIP_PORT))) {
353 supply(from, ifp, OUT_QUERY, 0,
365 * from picking us as a router.
405 * interface to keep the remote router from
409 supply(from, ifp, OUT_UNICAST, 0,
422 "request from %s for unsupported"
435 "bad queried destination %s from %s",
499 * from ports other than 520. Log other types
502 if (!poll_answer && (from->sin_port == htons(RIP_PORT))) {
504 "Received suspicious request from %s port %d",
507 if (poll_answer || (from->sin_port != htons(RIP_PORT))) {
509 (void) output(OUT_QUERY, from, ifp, v12buf.buf,
512 (void) output(OUT_UNICAST, from, ifp,
527 * First verify message came from a privileged port.
529 if (ntohs(from->sin_port) > IPPORT_RESERVED) {
530 trace_pkt("trace command from untrusted port %d on %s",
531 ntohs(from->sin_port), naddr_ntoa(FROM_NADDR));
537 * messages from remote systems.
540 "trace command from non-local host %s",
549 trace_pkt("trace command from "
567 trace_pkt("trace command unauthenticated from %s",
590 "response of bad length (%d) from %s",
597 "discard RIP response from bad source address %s",
602 /* verify message came from a router */
603 if (from->sin_port != htons(RIP_PORT)) {
605 " discard RIP response from unknown port"
606 " %d on host %s", ntohs(from->sin_port),
647 * Accept routing packets from routers directly connected
648 * via broadcast or point-to-point networks, and from
653 " discard response from %s"
667 msglim(&bad_len, FROM_NADDR, "empty response from %s",
703 " from untrusted router %s",
730 /* Should we trust this route from this router? */
748 * default routes learned from Router Discovery.
772 "route from %s to unsupported"
780 "bad destination %s from %s",
787 "bad metric %d from %s"
855 * Should we trust this route from this router?
963 msglim(&bad_len, FROM_NADDR, "empty request from %s",
969 "request of bad length (%d) from %s",
987 "POLLENTRY request from %s for unsupported"
1000 "bad queried destination %s from %s",
1047 (void) output(OUT_QUERY, from, ifp, v12buf.buf,
1113 * from a distant RIPv2 router with the standard
1137 * Found a route from the router already in the table.
1141 * If the new route is a route broken down from an
1143 * not a broken down route or was broken down from a finer
1201 * but not from a familiar router.
1261 * Get a peer_hash structure from the hash of known peers. Create a
1266 get_peer_info(in_addr_t from)
1286 ph_pp = peer_hashes + (from % hash_table_sizes[ph_index]);
1288 if (php->ph_addr == from)
1315 ph_pp += from % hash_table_sizes[ph_index];
1322 php->ph_addr = from;
1374 in_addr_t from,
1387 msglim(use_authp, from, "missing auth data from %s",
1388 naddr_ntoa(from));
1419 (php = get_peer_info(from)) != NULL) {
1429 msglim(use_authp, from,
1461 msglim(use_authp, from,
1463 " instead of %d from %s",
1465 naddr_ntoa(from));
1479 msglim(use_authp, from,
1481 " instead of %#x from %s",
1484 naddr_ntoa(from));
1486 msglim(use_authp, from,
1488 " instead of %#x from %s",
1490 naddr_ntoa(from));
1492 msglim(use_authp, from,
1494 " instead of %#x from %s",
1497 naddr_ntoa(from));
1513 msglim(use_authp, from, "bad auth data from %s",
1514 naddr_ntoa(from));