diff --git a/usr.sbin/ppp/arp.c b/usr.sbin/ppp/arp.c index 10fa51cce4df..79a5cfa5b226 100644 --- a/usr.sbin/ppp/arp.c +++ b/usr.sbin/ppp/arp.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: arp.c,v 1.27.2.15 1998/05/01 19:23:46 brian Exp $ + * $Id: arp.c,v 1.28 1998/05/21 21:43:51 brian Exp $ * */ @@ -100,7 +100,7 @@ arp_SetProxy(struct bundle *bundle, struct in_addr addr, int s) */ memset(&arpmsg, 0, sizeof arpmsg); if (!get_ether_addr(s, addr, &arpmsg.hwa)) { - log_Printf(LogERROR, "Cannot determine ethernet address for proxy ARP\n"); + log_Printf(LogWARN, "Cannot determine ethernet address for proxy ARP\n"); return 0; } routes = ID0socket(PF_ROUTE, SOCK_RAW, AF_INET); @@ -193,7 +193,8 @@ arp_SetProxy(struct bundle *bundle, struct in_addr addr, int s) ((struct sockaddr_in *)&arpreq.arp_pa)->sin_addr.s_addr = addr.s_addr; arpreq.arp_flags = ATF_PERM | ATF_PUBL; if (ID0ioctl(s, SIOCSARP, (caddr_t) & arpreq) < 0) { - log_Printf(LogERROR, "arp_SetProxy: ioctl(SIOCSARP): %s\n", strerror(errno)); + log_Printf(LogERROR, "arp_SetProxy: ioctl(SIOCSARP): %s\n", + strerror(errno)); return 0; } return 1; @@ -211,7 +212,8 @@ arp_ClearProxy(struct bundle *bundle, struct in_addr addr, int s) SET_SA_FAMILY(arpreq.arp_pa, AF_INET); ((struct sockaddr_in *)&arpreq.arp_pa)->sin_addr.s_addr = addr.s_addr; if (ID0ioctl(s, SIOCDARP, (caddr_t) & arpreq) < 0) { - log_Printf(LogERROR, "arp_ClearProxy: ioctl(SIOCDARP): %s\n", strerror(errno)); + log_Printf(LogERROR, "arp_ClearProxy: ioctl(SIOCDARP): %s\n", + strerror(errno)); return 0; } return 1; diff --git a/usr.sbin/ppp/async.c b/usr.sbin/ppp/async.c index 0692f2d9c118..ef59427cb156 100644 --- a/usr.sbin/ppp/async.c +++ b/usr.sbin/ppp/async.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: async.c,v 1.15.2.14 1998/05/01 19:23:51 brian Exp $ + * $Id: async.c,v 1.16 1998/05/21 21:43:55 brian Exp $ * */ #include @@ -144,7 +144,8 @@ async_Decode(struct async *async, u_char c) default: if (async->length >= HDLCSIZE) { /* packet is too large, discard it */ - log_Printf(LogERROR, "Packet too large (%d), discarding.\n", async->length); + log_Printf(LogWARN, "Packet too large (%d), discarding.\n", + async->length); async->length = 0; async->mode = MODE_HUNT; break; diff --git a/usr.sbin/ppp/bundle.c b/usr.sbin/ppp/bundle.c index bf55eda1bd75..5f7e88a282b1 100644 --- a/usr.sbin/ppp/bundle.c +++ b/usr.sbin/ppp/bundle.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: bundle.c,v 1.17 1998/06/15 19:06:01 brian Exp $ + * $Id: bundle.c,v 1.18 1998/06/16 19:40:24 brian Exp $ */ #include @@ -165,8 +165,7 @@ bundle_CleanInterface(const struct bundle *bundle) ifra.ifra_addr = ifrq.ifr_addr; if (ID0ioctl(s, SIOCGIFDSTADDR, &ifrq) < 0) { if (ifra.ifra_addr.sa_family == AF_INET) - log_Printf(LogERROR, - "bundle_CleanInterface: Can't get dst for %s on %s !\n", + log_Printf(LogERROR, "Can't get dst for %s on %s !\n", inet_ntoa(((struct sockaddr_in *)&ifra.ifra_addr)->sin_addr), bundle->ifp.Name); close(s); @@ -175,8 +174,7 @@ bundle_CleanInterface(const struct bundle *bundle) ifra.ifra_broadaddr = ifrq.ifr_dstaddr; if (ID0ioctl(s, SIOCDIFADDR, &ifra) < 0) { if (ifra.ifra_addr.sa_family == AF_INET) - log_Printf(LogERROR, - "bundle_CleanInterface: Can't delete %s address on %s !\n", + log_Printf(LogERROR, "Can't delete %s address on %s !\n", inet_ntoa(((struct sockaddr_in *)&ifra.ifra_addr)->sin_addr), bundle->ifp.Name); close(s); @@ -406,7 +404,7 @@ bundle_LayerDown(void *v, struct fsm *fp) if (lost) mp_LinkLost(&bundle->ncp.mp, lost); else - log_Printf(LogERROR, "Oops, lost an unrecognised datalink (%s) !\n", + log_Printf(LogALERT, "Oops, lost an unrecognised datalink (%s) !\n", fp->link->name); } } @@ -616,12 +614,12 @@ bundle_DescriptorRead(struct descriptor *d, struct bundle *bundle, /* something to read from tun */ n = read(bundle->dev.fd, &tun, sizeof tun); if (n < 0) { - log_Printf(LogERROR, "read from %s: %s\n", TUN_NAME, strerror(errno)); + log_Printf(LogWARN, "read from %s: %s\n", TUN_NAME, strerror(errno)); return; } n -= sizeof tun - sizeof tun.data; if (n <= 0) { - log_Printf(LogERROR, "read from %s: Only %d bytes read\n", TUN_NAME, n); + log_Printf(LogERROR, "read from %s: Only %d bytes read ?\n", TUN_NAME, n); return; } if (!tun_check_header(tun, AF_INET)) @@ -738,7 +736,7 @@ bundle_Create(const char *prefix, int type, const char **argv) static struct bundle bundle; /* there can be only one */ if (bundle.ifp.Name != NULL) { /* Already allocated ! */ - log_Printf(LogERROR, "bundle_Create: There's only one BUNDLE !\n"); + log_Printf(LogALERT, "bundle_Create: There's only one BUNDLE !\n"); return NULL; } @@ -789,7 +787,7 @@ bundle_Create(const char *prefix, int type, const char **argv) strncpy(ifrq.ifr_name, bundle.ifp.Name, sizeof ifrq.ifr_name - 1); ifrq.ifr_name[sizeof ifrq.ifr_name - 1] = '\0'; if (ID0ioctl(s, SIOCGIFFLAGS, &ifrq) < 0) { - log_Printf(LogERROR, "OpenTunnel: ioctl(SIOCGIFFLAGS): %s\n", + log_Printf(LogERROR, "bundle_Create: ioctl(SIOCGIFFLAGS): %s\n", strerror(errno)); close(s); close(bundle.dev.fd); @@ -798,7 +796,7 @@ bundle_Create(const char *prefix, int type, const char **argv) } ifrq.ifr_flags |= IFF_UP; if (ID0ioctl(s, SIOCSIFFLAGS, &ifrq) < 0) { - log_Printf(LogERROR, "OpenTunnel: ioctl(SIOCSIFFLAGS): %s\n", + log_Printf(LogERROR, "bundle_Create: ioctl(SIOCSIFFLAGS): %s\n", strerror(errno)); close(s); close(bundle.dev.fd); @@ -809,7 +807,7 @@ bundle_Create(const char *prefix, int type, const char **argv) close(s); if ((bundle.ifp.Index = GetIfIndex(bundle.ifp.Name)) < 0) { - log_Printf(LogERROR, "OpenTunnel: Can't find interface index.\n"); + log_Printf(LogERROR, "Can't find interface index.\n"); close(bundle.dev.fd); bundle.ifp.Name = NULL; return NULL; @@ -844,7 +842,7 @@ bundle_Create(const char *prefix, int type, const char **argv) bundle.links = datalink_Create("deflink", &bundle, type); if (bundle.links == NULL) { - log_Printf(LogERROR, "Cannot create data link: %s\n", strerror(errno)); + log_Printf(LogALERT, "Cannot create data link: %s\n", strerror(errno)); close(bundle.dev.fd); bundle.ifp.Name = NULL; return NULL; @@ -1633,7 +1631,7 @@ bundle_setsid(struct bundle *bundle, int holdsession) } switch ((pid = fork())) { case -1: - log_Printf(LogERROR, "fork: %s\n", strerror(errno)); + log_Printf(LogERROR, "fork(2): %s\n", strerror(errno)); close(fds[0]); close(fds[1]); return; diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c index 53a9ba5950cd..ba820ed8a3df 100644 --- a/usr.sbin/ppp/command.c +++ b/usr.sbin/ppp/command.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: command.c,v 1.144 1998/06/15 19:06:04 brian Exp $ + * $Id: command.c,v 1.145 1998/06/16 19:40:26 brian Exp $ * */ #include @@ -124,7 +124,7 @@ #define NEG_DNS 50 const char Version[] = "2.0-beta"; -const char VersionDate[] = "$Date: 1998/06/15 19:06:04 $"; +const char VersionDate[] = "$Date: 1998/06/16 19:40:26 $"; static int ShowCommand(struct cmdargs const *); static int TerminalCommand(struct cmdargs const *); @@ -267,7 +267,7 @@ LoadCommand(struct cmdargs const *arg) name = "default"; if (!system_IsValid(name, arg->prompt, arg->bundle->phys_type.all)) { - log_Printf(LogERROR, "%s: Label not allowed\n", name); + log_Printf(LogWARN, "%s: Label not allowed\n", name); return 1; } else { /* diff --git a/usr.sbin/ppp/deflate.c b/usr.sbin/ppp/deflate.c index 4bc8bce4fceb..c0d83cf19ce8 100644 --- a/usr.sbin/ppp/deflate.c +++ b/usr.sbin/ppp/deflate.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: deflate.c,v 1.8 1998/05/21 21:45:00 brian Exp $ + * $Id: deflate.c,v 1.9 1998/06/15 19:06:39 brian Exp $ */ #include @@ -113,7 +113,7 @@ DeflateOutput(void *v, struct ccp *ccp, struct link *l, int pri, u_short proto, if ((res = deflate(&state->cx, flush)) != Z_OK) { if (res == Z_STREAM_END) break; /* Done */ - log_Printf(LogERROR, "DeflateOutput: deflate returned %d (%s)\n", + log_Printf(LogWARN, "DeflateOutput: deflate returned %d (%s)\n", res, state->cx.msg ? state->cx.msg : ""); mbuf_Free(mo_head); mbuf_FreeSeg(mi_head); @@ -221,7 +221,7 @@ DeflateInput(void *v, struct ccp *ccp, u_short *proto, struct mbuf *mi) */ state->seqno = seq; else { - log_Printf(LogERROR, "DeflateInput: Seq error: Got %d, expected %d\n", + log_Printf(LogWARN, "DeflateInput: Seq error: Got %d, expected %d\n", seq, state->seqno); mbuf_Free(mi_head); ccp_SendResetReq(&ccp->fsm); @@ -257,7 +257,7 @@ DeflateInput(void *v, struct ccp *ccp, u_short *proto, struct mbuf *mi) if ((res = inflate(&state->cx, flush)) != Z_OK) { if (res == Z_STREAM_END) break; /* Done */ - log_Printf(LogERROR, "DeflateInput: inflate returned %d (%s)\n", + log_Printf(LogWARN, "DeflateInput: inflate returned %d (%s)\n", res, state->cx.msg ? state->cx.msg : ""); mbuf_Free(mo_head); mbuf_Free(mi); @@ -301,7 +301,7 @@ DeflateInput(void *v, struct ccp *ccp, u_short *proto, struct mbuf *mi) mbuf_Free(mi); if (first) { - log_Printf(LogERROR, "DeflateInput: Length error\n"); + log_Printf(LogWARN, "DeflateInput: Length error\n"); mbuf_Free(mo_head); ccp_SendResetReq(&ccp->fsm); return NULL; diff --git a/usr.sbin/ppp/fsm.c b/usr.sbin/ppp/fsm.c index 3a3b1f48fa2a..a25caf1852ad 100644 --- a/usr.sbin/ppp/fsm.c +++ b/usr.sbin/ppp/fsm.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: fsm.c,v 1.28 1998/05/21 21:45:20 brian Exp $ + * $Id: fsm.c,v 1.29 1998/06/15 19:06:42 brian Exp $ * * TODO: */ @@ -435,7 +435,7 @@ FsmRecvConfigReq(struct fsm *fp, struct fsmheader *lhp, struct mbuf *bp) plen = mbuf_Length(bp); flen = ntohs(lhp->length) - sizeof *lhp; if (plen < flen) { - log_Printf(LogERROR, "%s: FsmRecvConfigReq: plen (%d) < flen (%d)\n", + log_Printf(LogWARN, "%s: FsmRecvConfigReq: plen (%d) < flen (%d)\n", fp->link->name, plen, flen); mbuf_Free(bp); return; diff --git a/usr.sbin/ppp/hdlc.c b/usr.sbin/ppp/hdlc.c index efdbfc673a52..7fae8bd09a93 100644 --- a/usr.sbin/ppp/hdlc.c +++ b/usr.sbin/ppp/hdlc.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: hdlc.c,v 1.31 1998/05/21 21:45:28 brian Exp $ + * $Id: hdlc.c,v 1.32 1998/06/15 19:06:09 brian Exp $ * * TODO: */ @@ -431,7 +431,7 @@ hdlc_DecodePacket(struct bundle *bundle, u_short proto, struct mbuf * bp, if (p) mp_Input(&bundle->ncp.mp, bp, p); else { - log_Printf(LogERROR, "DecodePacket: MP inside MP ?!\n"); + log_Printf(LogWARN, "DecodePacket: Can't do MP inside MP !\n"); mbuf_Free(bp); } break; diff --git a/usr.sbin/ppp/ip.c b/usr.sbin/ppp/ip.c index 3bb75aaea81e..318342f0fd52 100644 --- a/usr.sbin/ppp/ip.c +++ b/usr.sbin/ppp/ip.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: ip.c,v 1.42 1998/06/14 01:21:24 brian Exp $ + * $Id: ip.c,v 1.43 1998/06/15 19:06:45 brian Exp $ * * TODO: * o Return ICMP message for filterd packet @@ -388,7 +388,7 @@ ip_Input(struct bundle *bundle, struct mbuf * bp) nb = 0; for (wp = bp; wp; wp = wp->next) { /* Copy to contiguous region */ if (sizeof tun.data - (cp - tun.data) < wp->cnt) { - log_Printf(LogERROR, "ip_Input: Packet too large (%d) - dropped\n", + log_Printf(LogWARN, "ip_Input: Packet too large (%d) - dropped\n", mbuf_Length(bp)); mbuf_Free(bp); return; @@ -409,7 +409,7 @@ ip_Input(struct bundle *bundle, struct mbuf * bp) nb = ntohs(((struct ip *) tun.data)->ip_len); if (nb > MAX_MRU) { - log_Printf(LogERROR, "ip_Input: Problem with IP header length\n"); + log_Printf(LogWARN, "ip_Input: Problem with IP header length\n"); mbuf_Free(bp); return; } diff --git a/usr.sbin/ppp/ipcp.c b/usr.sbin/ppp/ipcp.c index 03e6dc069167..da7b6cfa8ec8 100644 --- a/usr.sbin/ppp/ipcp.c +++ b/usr.sbin/ppp/ipcp.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: ipcp.c,v 1.55 1998/06/15 19:05:44 brian Exp $ + * $Id: ipcp.c,v 1.56 1998/06/15 19:06:12 brian Exp $ * * TODO: * o More RFC1772 backwoard compatibility @@ -459,7 +459,7 @@ ipcp_SetIPaddress(struct bundle *bundle, struct in_addr myaddr, s = ID0socket(AF_INET, SOCK_DGRAM, 0); if (s < 0) { - log_Printf(LogERROR, "SetIpDevice: socket(): %s\n", strerror(errno)); + log_Printf(LogERROR, "SetIPaddress: socket(): %s\n", strerror(errno)); return (-1); } @@ -499,7 +499,7 @@ ipcp_SetIPaddress(struct bundle *bundle, struct in_addr myaddr, if (ID0ioctl(s, SIOCAIFADDR, &ifra) < 0) { if (!silent) - log_Printf(LogERROR, "SetIpDevice: ioctl(SIOCAIFADDR): %s\n", + log_Printf(LogERROR, "SetIPaddress: ioctl(SIOCAIFADDR): %s\n", strerror(errno)); close(s); return (-1); @@ -693,7 +693,7 @@ int ipcp_InterfaceUp(struct ipcp *ipcp) { if (ipcp_SetIPaddress(ipcp->fsm.bundle, ipcp->my_ip, ipcp->peer_ip, 0) < 0) { - log_Printf(LogERROR, "IpcpLayerUp: unable to set ip address\n"); + log_Printf(LogERROR, "ipcp_InterfaceUp: unable to set ip address\n"); return 0; } diff --git a/usr.sbin/ppp/loadalias.c b/usr.sbin/ppp/loadalias.c index 455a540f9b98..e10f22a2b4cc 100644 --- a/usr.sbin/ppp/loadalias.c +++ b/usr.sbin/ppp/loadalias.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: loadalias.c,v 1.17 1998/06/07 03:54:41 brian Exp $ + * $Id: loadalias.c,v 1.18 1998/06/12 15:37:23 peter Exp $ */ #include @@ -92,7 +92,7 @@ alias_Load() if (ID0realuid() == 0) path = env; else - log_Printf(LogALERT, "Ignoring environment _PATH_ALIAS_PREFIX" + log_Printf(LogWARN, "Ignoring environment _PATH_ALIAS_PREFIX" " value (%s)\n", env); } diff --git a/usr.sbin/ppp/lqr.c b/usr.sbin/ppp/lqr.c index f69ef40e45f0..10b9f600d85f 100644 --- a/usr.sbin/ppp/lqr.c +++ b/usr.sbin/ppp/lqr.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: lqr.c,v 1.25 1998/05/21 21:46:33 brian Exp $ + * $Id: lqr.c,v 1.26 1998/06/15 19:05:20 brian Exp $ * * o LQR based on RFC1333 * @@ -92,10 +92,10 @@ lqr_RecvEcho(struct fsm *fp, struct mbuf * bp) seq > hdlc->lqm.echo.seq_recv)) hdlc->lqm.echo.seq_recv = seq; } else - log_Printf(LogERROR, "lqr_RecvEcho: Got sig 0x%08x, expecting 0x%08x !\n", + log_Printf(LogWARN, "lqr_RecvEcho: Got sig 0x%08x, expecting 0x%08x !\n", (unsigned)ntohl(lqr->signature), (unsigned)SIGNATURE); } else - log_Printf(LogERROR, "lqr_RecvEcho: Got packet size %d, expecting %d !\n", + log_Printf(LogWARN, "lqr_RecvEcho: Got packet size %d, expecting %d !\n", mbuf_Length(bp), sizeof(struct echolqr)); } @@ -166,7 +166,7 @@ lqr_Input(struct physical *physical, struct mbuf *bp) len = mbuf_Length(bp); if (len != sizeof(struct lqrdata)) - log_Printf(LogERROR, "lqr_Input: Got packet size %d, expecting %d !\n", + log_Printf(LogWARN, "lqr_Input: Got packet size %d, expecting %d !\n", len, sizeof(struct lqrdata)); else if (!IsAccepted(physical->link.lcp.cfg.lqr) && !(physical->hdlc.lqm.method & LQM_LQR)) { @@ -181,7 +181,7 @@ lqr_Input(struct physical *physical, struct mbuf *bp) lqr = (struct lqrdata *)MBUF_CTOP(bp); lcp = physical->hdlc.lqm.owner; if (ntohl(lqr->MagicNumber) != physical->hdlc.lqm.owner->his_magic) - log_Printf(LogERROR, "lqr_Input: magic %x != expecting %x\n", + log_Printf(LogWARN, "lqr_Input: magic 0x%x is wrong, expecting 0x%x\n", (unsigned)ntohl(lqr->MagicNumber), physical->hdlc.lqm.owner->his_magic); else { diff --git a/usr.sbin/ppp/main.c b/usr.sbin/ppp/main.c index 2096e61add57..ab0be066ff22 100644 --- a/usr.sbin/ppp/main.c +++ b/usr.sbin/ppp/main.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: main.c,v 1.133 1998/06/15 19:06:50 brian Exp $ + * $Id: main.c,v 1.134 1998/06/16 19:40:27 brian Exp $ * * TODO: */ @@ -294,7 +294,8 @@ main(int argc, char **argv) snprintf(conf, sizeof conf, "%s/%s", _PATH_PPP, CONFFILE); do { if (!access(conf, W_OK)) { - log_Printf(LogALERT, "ppp: Access violation: Please protect %s\n", conf); + log_Printf(LogALERT, "ppp: Access violation: Please protect %s\n", + conf); return -1; } ptr = conf + strlen(conf)-2; @@ -506,7 +507,7 @@ DoLoop(struct bundle *bundle) for (i = 0; i <= nfds; i++) if (FD_ISSET(i, &efds)) { - log_Printf(LogALERT, "Exception detected on descriptor %d\n", i); + log_Printf(LogERROR, "Exception detected on descriptor %d\n", i); break; } diff --git a/usr.sbin/ppp/modem.c b/usr.sbin/ppp/modem.c index 69122fe47c66..e96567cd6d44 100644 --- a/usr.sbin/ppp/modem.c +++ b/usr.sbin/ppp/modem.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: modem.c,v 1.89 1998/06/15 19:05:25 brian Exp $ + * $Id: modem.c,v 1.90 1998/06/15 19:06:21 brian Exp $ * * TODO: */ @@ -597,11 +597,11 @@ modem_Open(struct physical *modem, struct bundle *bundle) } } else { *cp = ':'; /* Don't destroy name.full */ - log_Printf(LogERROR, "%s: Invalid host:port: \"%s\"\n", + log_Printf(LogWARN, "%s: Invalid host:port: \"%s\"\n", modem->link.name, modem->name.full); } } else { - log_Printf(LogERROR, "%s: Device (%s) must begin with a '/'," + log_Printf(LogWARN, "%s: Device (%s) must begin with a '/'," " a '!' or be a host:port pair\n", modem->link.name, modem->name.full); } @@ -651,7 +651,7 @@ modem_Open(struct physical *modem, struct bundle *bundle) if (ioctl(modem->fd, TIOCMGET, &modem->mbits) == -1) { if (modem->type != PHYS_DIRECT) { - log_Printf(LogERROR, "%s: Open: Cannot get modem status: %s\n", + log_Printf(LogWARN, "%s: Open: Cannot get modem status: %s\n", modem->link.name, strerror(errno)); modem_LogicalClose(modem); return (-1); @@ -663,7 +663,7 @@ modem_Open(struct physical *modem, struct bundle *bundle) oldflag = fcntl(modem->fd, F_GETFL, 0); if (oldflag < 0) { - log_Printf(LogERROR, "%s: Open: Cannot get modem flags: %s\n", + log_Printf(LogWARN, "%s: Open: Cannot get modem flags: %s\n", modem->link.name, strerror(errno)); modem_LogicalClose(modem); return (-1); @@ -1070,7 +1070,7 @@ modem2iov(struct physical *p, struct iovec *iov, int *niov, int maxiov, } if (*niov >= maxiov) { - log_Printf(LogERROR, "ToBinary: No room for physical !\n"); + log_Printf(LogERROR, "modem2iov: No room for physical !\n"); if (p) free(p); return -1; diff --git a/usr.sbin/ppp/mp.c b/usr.sbin/ppp/mp.c index bdedb63daeca..b1539ac5a285 100644 --- a/usr.sbin/ppp/mp.c +++ b/usr.sbin/ppp/mp.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: mp.c,v 1.7 1998/06/15 19:06:22 brian Exp $ + * $Id: mp.c,v 1.8 1998/06/15 19:06:53 brian Exp $ */ #include @@ -906,7 +906,7 @@ static void mpserver_Write(struct descriptor *d, struct bundle *bundle, const fd_set *fdset) { /* We never want to write here ! */ - log_Printf(LogERROR, "mpserver_Write: Internal error: Bad call !\n"); + log_Printf(LogALERT, "mpserver_Write: Internal error: Bad call !\n"); } void @@ -929,7 +929,7 @@ mpserver_Open(struct mpserver *s, struct peerid *peer) mode_t mask; if (s->fd != -1) { - log_Printf(LogERROR, "Internal error ! mpserver already open\n"); + log_Printf(LogALERT, "Internal error ! mpserver already open\n"); mpserver_Close(s); } diff --git a/usr.sbin/ppp/prompt.c b/usr.sbin/ppp/prompt.c index 6b1351163af8..7b7f17d35be0 100644 --- a/usr.sbin/ppp/prompt.c +++ b/usr.sbin/ppp/prompt.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: prompt.c,v 1.5 1998/06/15 19:06:53 brian Exp $ + * $Id: prompt.c,v 1.6 1998/06/16 07:15:11 brian Exp $ */ #include @@ -225,7 +225,7 @@ prompt_Read(struct descriptor *d, struct bundle *bundle, const fd_set *fdset) p->readtilde = 1; else if (physical_Write(p->TermMode->physical, &ch, n) < 0) { - log_Printf(LogERROR, "error writing to modem: %s\n", strerror(errno)); + log_Printf(LogWARN, "error writing to modem: %s\n", strerror(errno)); prompt_TtyCommandMode(p); } break; @@ -265,7 +265,7 @@ prompt_Read(struct descriptor *d, struct bundle *bundle, const fd_set *fdset) break; default: if (physical_Write(p->TermMode->physical, &ch, n) < 0) { - log_Printf(LogERROR, "error writing to modem: %s\n", strerror(errno)); + log_Printf(LogWARN, "error writing to modem: %s\n", strerror(errno)); prompt_TtyCommandMode(p); } break; @@ -280,7 +280,7 @@ static void prompt_Write(struct descriptor *d, struct bundle *bundle, const fd_set *fdset) { /* We never want to write here ! */ - log_Printf(LogERROR, "prompt_Write: Internal error: Bad call !\n"); + log_Printf(LogALERT, "prompt_Write: Internal error: Bad call !\n"); } struct prompt * diff --git a/usr.sbin/ppp/route.c b/usr.sbin/ppp/route.c index 328c0479fb21..7fd047592fda 100644 --- a/usr.sbin/ppp/route.c +++ b/usr.sbin/ppp/route.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: route.c,v 1.47 1998/06/15 19:06:23 brian Exp $ + * $Id: route.c,v 1.48 1998/06/15 19:06:55 brian Exp $ * */ @@ -218,7 +218,8 @@ Index2Nam(int idx) mib[5] = 0; if (sysctl(mib, 6, NULL, &needed, NULL, 0) < 0) { - log_Printf(LogERROR, "Index2Nam: sysctl: estimate: %s\n", strerror(errno)); + log_Printf(LogERROR, "Index2Nam: sysctl: estimate: %s\n", + strerror(errno)); return "???"; } if ((buf = malloc(needed)) == NULL) diff --git a/usr.sbin/ppp/server.c b/usr.sbin/ppp/server.c index f401674b1ece..a78031996b42 100644 --- a/usr.sbin/ppp/server.c +++ b/usr.sbin/ppp/server.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: server.c,v 1.18 1998/05/21 21:48:15 brian Exp $ + * $Id: server.c,v 1.19 1998/05/23 22:24:50 brian Exp $ */ #include @@ -179,7 +179,7 @@ static void server_Write(struct descriptor *d, struct bundle *bundle, const fd_set *fdset) { /* We never want to write here ! */ - log_Printf(LogERROR, "server_Write: Internal error: Bad call !\n"); + log_Printf(LogALERT, "server_Write: Internal error: Bad call !\n"); } struct server server = { diff --git a/usr.sbin/ppp/vjcomp.c b/usr.sbin/ppp/vjcomp.c index 6fd0d59cae6f..c60b4341e8ef 100644 --- a/usr.sbin/ppp/vjcomp.c +++ b/usr.sbin/ppp/vjcomp.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: vjcomp.c,v 1.18 1998/06/14 00:56:13 brian Exp $ + * $Id: vjcomp.c,v 1.19 1998/06/15 19:06:58 brian Exp $ * * TODO: */ @@ -79,7 +79,7 @@ vj_SendFrame(struct link *l, struct mbuf * bp, struct bundle *bundle) proto = PROTO_VJCOMP; break; default: - log_Printf(LogERROR, "Unknown frame type %x\n", type); + log_Printf(LogALERT, "Unknown frame type %x\n", type); mbuf_Free(bp); return; } @@ -155,7 +155,7 @@ vj_Input(struct ipcp *ipcp, struct mbuf *bp, int proto) type = TYPE_UNCOMPRESSED_TCP; break; default: - log_Printf(LogERROR, "vj_Input...???\n"); + log_Printf(LogWARN, "vj_Input...???\n"); return (bp); } bp = VjUncompressTcp(ipcp, bp, type);