* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: bundle.c,v 1.30 2000/02/27 01:38:24 brian Exp $
+ * $OpenBSD: bundle.c,v 1.31 2000/03/03 21:52:56 brian Exp $
*/
#include <sys/param.h>
msg.msg_control = cmsgbuf;
msg.msg_controllen = sizeof cmsgbuf;
- log_Printf(LogDEBUG, "Expecting %d scatter/gather bytes\n", iov[0].iov_len);
+ log_Printf(LogDEBUG, "Expecting %u scatter/gather bytes\n",
+ (unsigned)iov[0].iov_len);
if ((got = recvmsg(s, &msg, MSG_WAITALL)) != iov[0].iov_len) {
if (got == -1)
log_Printf(LogERROR, "Failed recvmsg: %s\n", strerror(errno));
else
- log_Printf(LogERROR, "Failed recvmsg: Got %d, not %d\n",
- got, iov[0].iov_len);
+ log_Printf(LogERROR, "Failed recvmsg: Got %d, not %u\n",
+ got, (unsigned)iov[0].iov_len);
while (niov--)
free(iov[niov].iov_base);
return;
log_Printf(LogERROR, "setsockopt(SO_RCVBUF, %d): %s\n", expect,
strerror(errno));
- log_Printf(LogDEBUG, "Sending %d descriptor%s and %d bytes in scatter"
- "/gather array\n", nfd, nfd == 1 ? "" : "s", iov[0].iov_len);
+ log_Printf(LogDEBUG, "Sending %d descriptor%s and %u bytes in scatter"
+ "/gather array\n", nfd, nfd == 1 ? "" : "s",
+ (unsigned)iov[0].iov_len);
if ((got = sendmsg(s, &msg, 0)) == -1)
log_Printf(LogERROR, "Failed sendmsg: %s: %s\n",
sun->sun_path, strerror(errno));
else if (got != iov[0].iov_len)
- log_Printf(LogERROR, "%s: Failed initial sendmsg: Only sent %d of %d\n",
- sun->sun_path, got, iov[0].iov_len);
+ log_Printf(LogERROR, "%s: Failed initial sendmsg: Only sent %d of %u\n",
+ sun->sun_path, got, (unsigned)iov[0].iov_len);
else {
/* We must get the ACK before closing the descriptor ! */
int res;
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $OpenBSD: ipcp.c,v 1.21 2000/02/27 01:38:26 brian Exp $
+ * $OpenBSD: ipcp.c,v 1.22 2000/03/03 21:52:57 brian Exp $
*
* TODO:
* o Support IPADDRS properly
inet_ntoa(ipcp->peer_ip), vj2asc(ipcp->peer_compproto));
prompt_Printf(arg->prompt, " My side: %s, %s\n",
inet_ntoa(ipcp->my_ip), vj2asc(ipcp->my_compproto));
- prompt_Printf(arg->prompt, " Queued packets: %d\n", ip_QueueLen(ipcp));
+ prompt_Printf(arg->prompt, " Queued packets: %lu\n",
+ (unsigned long)ip_QueueLen(ipcp));
}
if (ipcp->route) {
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $OpenBSD: mbuf.c,v 1.10 2000/02/27 01:38:27 brian Exp $
+ * $OpenBSD: mbuf.c,v 1.11 2000/03/03 21:52:57 brian Exp $
*
*/
#include <sys/types.h>
*/
*mb = (struct mbucket *)malloc(BUCKET_CHUNK * size);
if (*mb == NULL) {
- log_Printf(LogALERT, "Failed to allocate memory (%u)\n",
- BUCKET_CHUNK * size);
+ log_Printf(LogALERT, "Failed to allocate memory (%lu)\n",
+ (unsigned long)BUCKET_CHUNK * size);
AbortProgram(EX_OSERR);
}
bp = &(*mb)->u.m;
} else
queue->last = queue->top = bp;
queue->len++;
- log_Printf(LogDEBUG, "m_enqueue: len = %d\n", queue->len);
+ log_Printf(LogDEBUG, "m_enqueue: len = %lu\n", (unsigned long)queue->len);
}
}
* The code in this file was written by Eivind Eklund <perhaps@yes.no>,
* who places it in the public domain without restriction.
*
- * $OpenBSD: nat_cmd.c,v 1.3 2000/02/27 01:38:27 brian Exp $
+ * $OpenBSD: nat_cmd.c,v 1.4 2000/03/03 21:52:57 brian Exp $
*/
#include <sys/param.h>
bp->m_len = ntohs(pip->ip_len);
if (bp->m_len > MAX_MRU) {
- log_Printf(LogWARN, "nat_LayerPull: Problem with IP header length (%d)\n",
- bp->m_len);
+ log_Printf(LogWARN, "nat_LayerPull: Problem with IP header length (%lu)\n",
+ (unsigned long)bp->m_len);
m_freem(bp);
return NULL;
}
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $OpenBSD: physical.c,v 1.20 2000/02/27 01:38:27 brian Exp $
+ * $OpenBSD: physical.c,v 1.21 2000/03/03 21:52:57 brian Exp $
*
*/
if (p->out) {
nw = physical_Write(p, MBUF_CTOP(p->out), p->out->m_len);
- log_Printf(LogDEBUG, "%s: DescriptorWrite: wrote %d(%d) to %d\n",
- p->link.name, nw, p->out->m_len, p->fd);
+ log_Printf(LogDEBUG, "%s: DescriptorWrite: wrote %d(%lu) to %d\n",
+ p->link.name, nw, (unsigned long)p->out->m_len, p->fd);
if (nw > 0) {
p->out->m_len -= nw;
p->out->m_offset += nw;
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $OpenBSD: slcompress.c,v 1.11 2000/02/27 01:38:28 brian Exp $
+ * $OpenBSD: slcompress.c,v 1.12 2000/03/03 21:52:57 brian Exp $
*
* Van Jacobson (van@helios.ee.lbl.gov), Dec 31, 1989:
* - Initial distribution.
* the caller has already made sure the packet is IP proto TCP).
*/
if ((ip->ip_off & htons(0x3fff)) || m->m_len < 40) {
- log_Printf(LogDEBUG, "??? 1 ip_off = %x, m_len = %d\n",
- ip->ip_off, m->m_len);
+ log_Printf(LogDEBUG, "??? 1 ip_off = %x, m_len = %lu\n",
+ ip->ip_off, (unsigned long)m->m_len);
log_DumpBp(LogDEBUG, "", m);
return (TYPE_IP);
}