- /* XXX manufacture and send NAK packet */
- Message(M_WARNING,"Need to send NAK\n");
+ uint32_t source,dest;
+ /* Manufacture and send NAK packet */
+ source=get_uint32(st->rbuf->start); /* Us */
+ dest=get_uint32(st->rbuf->start+4); /* Them */
+ Message(M_INFO,"udp (port %d): sending NAK\n",st->port);
+ buffer_init(st->rbuf,0);
+ buf_append_uint32(st->rbuf,dest);
+ buf_append_uint32(st->rbuf,source);
+ buf_append_uint32(st->rbuf,0); /* NAK is msg type 0 */
+ sendto(st->fd, st->rbuf->start, st->rbuf->size, 0,
+ (struct sockaddr *)&from, sizeof(from));