Lines Matching refs:index
96 * Arguments: index: index into the open socket table, ip is the inetgram
100 udp_input(int index)
108 printf("udp_input(%d) ###############################\n", index);
110 while ((igp = sockets[index].inq) != NULL) {
114 index, igp->igm_level);
116 del_gram(&sockets[index].inq, igp, TRUE);
122 header_len = (sockets[index].headerlen[TRANSPORT_LVL])(NULL);
129 &igp->igm_target, sockets[index].proto) != 0) {
131 "from %s.\n", index,
133 del_gram(&sockets[index].inq, igp, TRUE);
139 if (sockets[index].bind.sin_port != udphp->uh_dport) {
141 "%d != %d from %s.\n", index,
143 sockets[index].bind.sin_port),
145 del_gram(&sockets[index].inq, igp, TRUE);
150 del_gram(&sockets[index].inq, igp, FALSE);
154 add_grams(&sockets[index].inq, ugp);
166 * Arguments: index: index into the open socket table, ogp is the inetgram
170 udp_output(int index, struct inetgram *ogp)
176 printf("udp_output(%d): 0x%x, %d\n", index, ogp->igm_mp,
185 if (sockets[index].bound)
186 udphp->uh_sport = sockets[index].bind.sin_port;
193 udphp->uh_sum = udp_chksum(udphp, &sockets[index].bind.sin_addr,
194 &ogp->igm_saddr.sin_addr, sockets[index].proto);