-/* $OpenBSD: ipsec_util.c,v 1.8 2015/12/17 08:01:55 tb Exp $ */
+/* $OpenBSD: ipsec_util.c,v 1.9 2021/03/29 03:54:39 yasuoka Exp $ */
/*-
* Copyright (c) 2007, 2009 Internet Initiative Japan Inc.
* All rights reserved.
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-/* $Id: ipsec_util.c,v 1.8 2015/12/17 08:01:55 tb Exp $ */
+/* $Id: ipsec_util.c,v 1.9 2021/03/29 03:54:39 yasuoka Exp $ */
/*@file IPsec related utility functions */
/*
* RFC 2367 PF_KEY Key Management API, Version 2
/*
* for sadb_msg_seq. As RFC 2367, it must be used to uniquely
- * identify request to a proccess.
+ * identify request to a process.
*/
while (++ipsec_util_seq == 0)
/* empty */;
-/* $OpenBSD: radish.c,v 1.6 2018/01/05 08:13:31 mpi Exp $ */
+/* $OpenBSD: radish.c,v 1.7 2021/03/29 03:54:39 yasuoka Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
* All rights reserved.
* masklen < cur->rd_masklen
*/
- /* See if route matches with dest, be carefull!
+ /* See if route matches with dest, be careful!
* dest == (route & dest_mask)
*/
rp = (u_char *)cur->rd_route + off;
return 0;
next:
- /* seach corresponding subtree */
+ /* search corresponding subtree */
if (cur->rd_btest & *(dp + cur->rd_masklim)) {
if (cur->rd_r) {
cur = cur->rd_r;
-/* $OpenBSD: slist.c,v 1.7 2015/12/17 07:56:01 tb Exp $ */
+/* $OpenBSD: slist.c,v 1.8 2021/03/29 03:54:39 yasuoka Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
* All rights reserved.
list->list = list0;
}
-/* Swap items. This doesn't check boudary. */
+/* Swap items. This doesn't check boundary. */
static __inline void
slist_swap0(slist *list, int m, int n)
{
-/* $OpenBSD: l2tp.h,v 1.13 2020/06/09 02:39:27 yasuoka Exp $ */
+/* $OpenBSD: l2tp.h,v 1.14 2021/03/29 03:54:39 yasuoka Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
/*@file
* header file for the L2TP module
*/
-/* $Id: l2tp.h,v 1.13 2020/06/09 02:39:27 yasuoka Exp $ */
+/* $Id: l2tp.h,v 1.14 2021/03/29 03:54:39 yasuoka Exp $ */
/************************************************************************
* Protocol Constants
#define L2TP_HEADER_FLAG_VERSION_MASK 0x000f
#define L2TP_HEADER_VERSION_RFC2661 0x02
-/* AVP Atrribute Types */
+/* AVP Attribute Types */
/* RFC 2661 */
#define L2TP_AVP_TYPE_MESSAGE_TYPE 0
-/* $OpenBSD: l2tp_call.c,v 1.19 2015/12/05 16:10:31 yasuoka Exp $ */
+/* $OpenBSD: l2tp_call.c,v 1.20 2021/03/29 03:54:39 yasuoka Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-/* $Id: l2tp_call.c,v 1.19 2015/12/05 16:10:31 yasuoka Exp $ */
+/* $Id: l2tp_call.c,v 1.20 2021/03/29 03:54:39 yasuoka Exp $ */
/**@file L2TP LNS call */
#include <sys/types.h>
#include <sys/socket.h>
/*
* disconnect l2tp connection
- * @param result_code disconect without CDN, specify zero
+ * @param result_code disconnect without CDN, specify zero
*/
static void
l2tp_call_disconnect(l2tp_call *_this, int result_code, int error_code,
return 1;
}
/*
- * receieve ICRQ
+ * receive ICRQ
* @return return 0 if the ICRQ is acceptable.
* other values means fail to receive, and
* CDN was sent and status was updated.
if (error_code > 0) {
l2tp_call_log(_this, LOG_INFO,
- "SendCDN result=%s/%d error=%s/%d messsage=%s",
+ "SendCDN result=%s/%d error=%s/%d message=%s",
l2tp_cdn_rcode_string(result_code), result_code,
l2tp_ecode_string(error_code), error_code,
(errmes == NULL)? "none" : errmes);
-/* $OpenBSD: l2tp_ctrl.c,v 1.24 2020/06/09 02:39:27 yasuoka Exp $ */
+/* $OpenBSD: l2tp_ctrl.c,v 1.25 2021/03/29 03:54:39 yasuoka Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
* SUCH DAMAGE.
*/
/**@file Control connection processing functions for L2TP LNS */
-/* $Id: l2tp_ctrl.c,v 1.24 2020/06/09 02:39:27 yasuoka Exp $ */
+/* $Id: l2tp_ctrl.c,v 1.25 2021/03/29 03:54:39 yasuoka Exp $ */
#include <sys/types.h>
#include <sys/time.h>
#include <sys/socket.h>
* <p>
* When the return value of this function is zero, the _this
* is already released. The lt2p_ctrl process that was bound to it
- * could not contine.
+ * could not continue.
* When the return value of this function is one, the timer
* is reset.</p>
*
SIN(&sock)->sin_port = ipsec_sa_cookie->local_port;
#if 1
/*
- * XXX: As RFC 2367, protocol sould be specified if the port
+ * XXX: As RFC 2367, protocol should be specified if the port
* XXX: number is non-zero.
*/
proto = 0;
/*
* Memo:
* This state may be happen in following state.
- * - lots of connect/disconect by long-running
+ * - lots of connect/disconnect by long-running
* windows2000, sometimes it fall to this state.
* Once it fall to here, connection will fail till
* the windows rebooted
-/* $OpenBSD: l2tpd.c,v 1.21 2019/02/22 07:04:20 jmc Exp $ */
+/* $OpenBSD: l2tpd.c,v 1.22 2021/03/29 03:54:39 yasuoka Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
* SUCH DAMAGE.
*/
/**@file L2TP(Layer Two Tunneling Protocol "L2TP") / RFC2661 */
-/* $Id: l2tpd.c,v 1.21 2019/02/22 07:04:20 jmc Exp $ */
+/* $Id: l2tpd.c,v 1.22 2021/03/29 03:54:39 yasuoka Exp $ */
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/time.h>
slist_add(&_this->free_session_id_list, (void *)(uintptr_t)call->id);
}
-/* start l2tpd listner */
+/* start l2tpd listener */
static int
l2tpd_listener_start(l2tpd_listener *_this)
{
-/* $OpenBSD: chap.c,v 1.16 2019/02/27 04:52:19 denis Exp $ */
+/* $OpenBSD: chap.c,v 1.17 2021/03/29 03:54:39 yasuoka Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
* </ul></p>
*/
/* RFC 1994, 2433 */
-/* $Id: chap.c,v 1.16 2019/02/27 04:52:19 denis Exp $ */
+/* $Id: chap.c,v 1.17 2021/03/29 03:54:39 yasuoka Exp $ */
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/time.h>
return -1;
}
- /* copy the authenticaiton properties */
+ /* copy the authentication properties */
CHAP_ASSERT(_this->ppp->proxy_authen_resp == NULL);
if ((_this->ppp->proxy_authen_resp = malloc(dpi->lauth_resp)) ==
NULL) {
goto auth_failed;
}
/*
- * Authetication OK
+ * Authentication OK
*/
switch (_this->type) {
case PPP_AUTH_CHAP_MD5:
-/* $OpenBSD: chap_ms.c,v 1.7 2014/11/20 03:48:12 tedu Exp $ */
+/* $OpenBSD: chap_ms.c,v 1.8 2021/03/29 03:54:39 yasuoka Exp $ */
/*
* Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org>
}
void
-mschap_radiuskey(u_int8_t *plain, const u_int8_t *crypted,
+mschap_radiuskey(u_int8_t *plain, const u_int8_t *encrypted,
const u_int8_t *authenticator, const u_int8_t *secret)
{
EVP_MD_CTX ctx;
EVP_DigestInit(&ctx, EVP_md5());
EVP_DigestUpdate(&ctx, secret, strlen(secret));
EVP_DigestUpdate(&ctx, authenticator, 16);
- EVP_DigestUpdate(&ctx, crypted, 2);
+ EVP_DigestUpdate(&ctx, encrypted, 2);
EVP_DigestFinal(&ctx, b, &mdlen);
for (i = 0; i < mdlen; i++) {
- p[i] = b[i] ^ crypted[i+2];
+ p[i] = b[i] ^ encrypted[i+2];
}
EVP_DigestInit(&ctx, EVP_md5());
EVP_DigestUpdate(&ctx, secret, strlen(secret));
- EVP_DigestUpdate(&ctx, crypted + 2, mdlen);
+ EVP_DigestUpdate(&ctx, encrypted + 2, mdlen);
EVP_DigestFinal(&ctx, b, &mdlen);
for (i = 0; i < mdlen; i++) {
- p[i+16] = b[i] ^ crypted[i+18];
+ p[i+16] = b[i] ^ encrypted[i+18];
}
memcpy(plain, p+1, 16);
-/* $OpenBSD: npppd.c,v 1.50 2019/05/10 01:29:31 guenther Exp $ */
+/* $OpenBSD: npppd.c,v 1.51 2021/03/29 03:54:39 yasuoka Exp $ */
/*-
* Copyright (c) 2005-2008,2009 Internet Initiative Japan Inc.
* Next pppd(nppd). This file provides a npppd daemon process and operations
* for npppd instance.
* @author Yasuoka Masahiko
- * $Id: npppd.c,v 1.50 2019/05/10 01:29:31 guenther Exp $
+ * $Id: npppd.c,v 1.51 2021/03/29 03:54:39 yasuoka Exp $
*/
#include "version.h"
#include <sys/param.h> /* ALIGNED_POINTER */
* This function finds {@link npppd_ppp} instances that are authenticated
* as the specified username and returns them as a {@link slist} list.
* @param username PPP Username.
- * @return {@link slist} that contans the {@link npppd_ppp} instances.
+ * @return {@link slist} that contains the {@link npppd_ppp} instances.
* NULL may be returned if no instance has been found.
*/
static slist *
struct ether_header *eh;
pppoe = (pppoe_session *)ppp->phy_context;
- /* PPPoE specific informations */
+ /* PPPoE specific information */
req.pr_protocol = PIPEX_PROTO_PPPOE;
req.pr_session_id = pppoe->session_id;
req.pr_peer_session_id = 0;
case NPPPD_TUNNEL_PPTP:
call = (pptp_call *)ppp->phy_context;
- /* PPTP specific informations */
+ /* PPTP specific information */
req.pr_session_id = call->id;
req.pr_protocol = PIPEX_PROTO_PPTP;
case NPPPD_TUNNEL_PPPOE:
pppoe = (pppoe_session *)ppp->phy_context;
- /* PPPoE specific informations */
+ /* PPPoE specific information */
req.pcr_protocol = PIPEX_PROTO_PPPOE;
req.pcr_session_id = pppoe->session_id;
break;
case NPPPD_TUNNEL_PPTP:
call = (pptp_call *)ppp->phy_context;
- /* PPTP specific informations */
+ /* PPTP specific information */
req.pcr_session_id = call->id;
req.pcr_protocol = PIPEX_PROTO_PPTP;
break;
case NPPPD_TUNNEL_PPPOE:
pppoe = (pppoe_session *)ppp->phy_context;
- /* PPPoE specific informations */
+ /* PPPoE specific information */
req.pcr_protocol = PIPEX_PROTO_PPPOE;
req.pcr_session_id = pppoe->session_id;
break;
case NPPPD_TUNNEL_PPTP:
call = (pptp_call *)ppp->phy_context;
- /* PPTP specific informations */
+ /* PPTP specific information */
req.pcr_session_id = call->id;
req.pcr_protocol = PIPEX_PROTO_PPTP;
break;
continue;
}
ppp_log(ppp, LOG_INFO, "Stop requested by the kernel");
- /* TODO: PIPEX doesn't return the disconect reason */
+ /* TODO: PIPEX doesn't return the disconnect reason */
#ifdef USE_NPPPD_RADIUS
ppp_set_radius_terminate_cause(ppp,
RADIUS_TERMNATE_CAUSE_IDLE_TIMEOUT);
/* Don't delete the route of active PPP session */
slist_itr_remove(&rtlist0);
- /* clear informations about old pool configuration */
+ /* clear information about old pool configuration */
snp->snp_next = NULL;
delppp0 = 0;
if (wait4(wpid, &status, WNOHANG, NULL) == wpid) {
if (WIFSIGNALED(status))
log_printf(LOG_WARNING,
- "privileged process exits abnormaly. signal=%d",
+ "privileged process exits abnormally. signal=%d",
WTERMSIG(status));
else
log_printf(LOG_WARNING,
- "privileged process exits abnormaly. status=%d",
+ "privileged process exits abnormally. status=%d",
WEXITSTATUS(status));
_this->stop_by_error = 1;
npppd_stop(_this);
if (ipcpstat == NULL) {
ppp_log(ppp, LOG_WARNING, "Unknown IPCP %s",
ppp_ipcp(ppp)->name);
- ppp->ifidx = -1; /* unbind inteface */
+ ppp->ifidx = -1; /* unbind interface */
return 1;
}
if (ppp_ipcp(ppp)->max_session > 0 &&
ppp_log(ppp, LOG_WARNING,
"Number of sessions per IPCP reaches out of the limit=%d",
ppp_ipcp(ppp)->max_session);
- ppp->ifidx = -1; /* unbind inteface */
+ ppp->ifidx = -1; /* unbind interface */
return 1;
}
ppp_log(ppp, LOG_WARNING,
"Number of sessions reaches out of the limit=%d",
_this->conf.max_session);
- ppp->ifidx = -1; /* unbind inteface */
+ ppp->ifidx = -1; /* unbind interface */
return 1;
}
_this->nsession++;
-/* $OpenBSD: npppd_auth.c,v 1.21 2019/02/27 04:52:19 denis Exp $ */
+/* $OpenBSD: npppd_auth.c,v 1.22 2021/03/29 03:54:39 yasuoka Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
* SUCH DAMAGE.
*/
/**@file authentication realm */
-/* $Id: npppd_auth.c,v 1.21 2019/02/27 04:52:19 denis Exp $ */
+/* $Id: npppd_auth.c,v 1.22 2021/03/29 03:54:39 yasuoka Exp $ */
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/socket.h>
/**
* Call this function to make the object unusable.
* <p>
- * {@link ::npppd_auth_base} objects is refered by the {@link ::npppd_ppp}
- * object. After this funcation is called, npppd will disconnect the PPP
+ * {@link ::npppd_auth_base} objects is referred by the {@link ::npppd_ppp}
+ * object. After this function is called, npppd will disconnect the PPP
* links that refers the object, it will call {@link ::npppd_auth_destroy()}
* when all the references to the object are released.</p>
*/
-/* $OpenBSD: npppd_subr.c,v 1.20 2019/05/10 01:29:31 guenther Exp $ */
+/* $OpenBSD: npppd_subr.c,v 1.21 2021/03/29 03:54:39 yasuoka Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
}
-/* GETSHORT is also defined in #inlude <arpa/nameser_compat.h>. */
+/* GETSHORT is also defined in #include <arpa/nameser_compat.h>. */
#undef GETCHAR
#undef GETSHORT
#undef PUTSHORT
-/* $OpenBSD: pap.c,v 1.11 2019/02/27 04:52:19 denis Exp $ */
+/* $OpenBSD: pap.c,v 1.12 2021/03/29 03:54:39 yasuoka Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-/* $Id: pap.c,v 1.11 2019/02/27 04:52:19 denis Exp $ */
+/* $Id: pap.c,v 1.12 2021/03/29 03:54:39 yasuoka Exp $ */
/**@file
* This file provides Password Authentication Protocol (PAP) handlers.
* @author Yasuoka Masahiko
return -1;
}
- /* copy the authenticaiton properties */
+ /* copy the authentication properties */
PAP_ASSERT(_this->ppp->proxy_authen_resp == NULL);
if ((_this->ppp->proxy_authen_resp = malloc(dpi->lauth_resp + 1)) ==
NULL) {
reason="bad_authenticator";
goto auth_failed;
}
- /* Autentication succeeded */
+ /* Authentication succeeded */
pap_response(_this, 1, DEFAULT_SUCCESS_MESSAGE);
ppp_process_radius_framed_ip(_this->ppp, pkt);
return;
auth_failed:
- /* Autentication failure */
+ /* Authentication failure */
pap_log(_this, LOG_WARNING, "Radius authentication request failed: %s",
reason);
/* log reply messages from radius server */
-/* $OpenBSD: ppp.c,v 1.29 2020/04/01 08:33:52 mpi Exp $ */
+/* $OpenBSD: ppp.c,v 1.30 2021/03/29 03:54:39 yasuoka Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-/* $Id: ppp.c,v 1.29 2020/04/01 08:33:52 mpi Exp $ */
+/* $Id: ppp.c,v 1.30 2021/03/29 03:54:39 yasuoka Exp $ */
/**@file
* This file provides PPP(Point-to-Point Protocol, RFC 1661) and
* {@link :: _npppd_ppp PPP instance} related functions.
} else {
ppp_log(_this, LOG_INFO, "mppe is rejected by peer");
if (_this->mppe.required)
- ppp_stop(_this, "MPPE is requred");
+ ppp_stop(_this, "MPPE is required");
}
#endif
#ifdef USE_NPPPD_PIPEX
* call ppp_stop() here, Windows on the packet
* loss condition etc cannot not connect us.
* So we don't call ppp_stop() here.
- * (*1) At least Microsof Windows 2000
+ * (*1) At least Microsoft Windows 2000
* Professional SP4 does.
*/
/*ppp_stop(_this, "Encryption is required.");*/
-/* $OpenBSD: ppp.h,v 1.22 2021/03/10 10:51:10 yasuoka Exp $ */
+/* $OpenBSD: ppp.h,v 1.23 2021/03/29 03:54:39 yasuoka Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
u_char chall[MAX_CHALLENGE_LENGTH];
int lchall; /* length of challenge */
u_char pktid; /* PPP Packet Id */
- u_char challid; /* Id of challange */
+ u_char challid; /* Id of challenge */
int type; /* chap type */
int ntry;
u_char authenticator[16];
int flags
);
-/** Flag indicates the orignal packet was encrypted by MPPE */
+/** Flag indicates the original packet was encrypted by MPPE */
#define PPP_IO_FLAGS_MPPE_ENCRYPTED 0x0001
-/** Flag indicates the orignal packet was delayed */
+/** Flag indicates the original packet was delayed */
#define PPP_IO_FLAGS_DELAYED 0x0002
typedef void (*npppd_voidfunc) (
uint8_t mppe_started;
mppe mppe;
#endif
- /** Assiging/Assigned IP Address */
+ /** Assigning/Assigned IP Address */
struct sockaddr_npppd snp;
#define ppp_framed_ip_address snp.snp_addr
#define ppp_framed_ip_netmask snp.snp_mask
logged_rcvd:5;
/*
- * Statistical informations
+ * Statistical information
*/
/** Start time */
time_t start_time;
/** Number of output packet bytes */
uint64_t obytes;
- /** RADIUS Accouting (RFC2866) Terminate Cause */
+ /** RADIUS Accounting (RFC2866) Terminate Cause */
int terminate_cause;
/*
-/* $OpenBSD: radius_chap_const.h,v 1.4 2012/05/08 13:15:12 yasuoka Exp $ */
+/* $OpenBSD: radius_chap_const.h,v 1.5 2021/03/29 03:54:39 yasuoka Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
char key[253];
/*
* XXX: Having maximum size for RADIUS attribute is required to prevent
- * XXX: oveflow by radius_get_vs_raw_attr().
+ * XXX: overflow by radius_get_vs_raw_attr().
*/
};
-/* $OpenBSD: pppoe.h,v 1.7 2015/12/05 16:10:31 yasuoka Exp $ */
+/* $OpenBSD: pppoe.h,v 1.8 2021/03/29 03:54:39 yasuoka Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
struct event ev_disposing;
} pppoe_session;
-#define PPPOE_SESSION_STATE_INIT 0 /** Inital */
+#define PPPOE_SESSION_STATE_INIT 0 /** Initial */
#define PPPOE_SESSION_STATE_RUNNING 1 /** Running */
#define PPPOE_SESSION_STATE_DISPOSING 2 /** Disposing */
-/* $OpenBSD: pppoe_session.c,v 1.11 2015/12/05 16:10:31 yasuoka Exp $ */
+/* $OpenBSD: pppoe_session.c,v 1.12 2021/03/29 03:54:40 yasuoka Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
/**@file
* Session management of PPPoE protocol
- * $Id: pppoe_session.c,v 1.11 2015/12/05 16:10:31 yasuoka Exp $
+ * $Id: pppoe_session.c,v 1.12 2021/03/29 03:54:40 yasuoka Exp $
*/
#include <sys/types.h>
* Quit this function before statistics counter
* is processed when the packet will be processed by
* PIPEX. Because current NPPPD PPPOE implementation
- * is recieving all packet from BPF even though the
+ * is receiving all packet from BPF even though the
* PIPEX will process it.
*/
} else if (rval != 0) {
-/* $OpenBSD: pppoed.c,v 1.24 2020/12/30 19:04:56 benno Exp $ */
+/* $OpenBSD: pppoed.c,v 1.25 2021/03/29 03:54:40 yasuoka Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
*/
/**@file
* This file provides the PPPoE(RFC2516) server(access concentrator)
- * implementaion.
- * $Id: pppoed.c,v 1.24 2020/12/30 19:04:56 benno Exp $
+ * implementation.
+ * $Id: pppoed.c,v 1.25 2021/03/29 03:54:40 yasuoka Exp $
*/
#include <sys/param.h> /* ALIGN */
#include <sys/types.h>
listener->index = PPPOED_LISTENER_INVALID_INDEX;
}
-/* reload listner */
+/* reload listener */
int
pppoed_reload_listeners(pppoed *_this)
{
-/* $OpenBSD: pptp.h,v 1.10 2014/03/22 04:32:39 yasuoka Exp $ */
+/* $OpenBSD: pptp.h,v 1.11 2021/03/29 03:54:40 yasuoka Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
#define PPTP_CALL_DEFAULT_MAXWINSZ 64
#endif
-/* Connection speed that nofified by OCRP */
+/* Connection speed that notified by OCRP */
/* XXX: currently we use fixed value */
#ifndef PPTP_CALL_CONNECT_SPEED
#define PPTP_CALL_CONNECT_SPEED 10000000
#endif
-/* Initial packet processing delay that nofified by OCRP */
+/* Initial packet processing delay that notified by OCRP */
#ifndef PPTP_CALL_INITIAL_PPD
#define PPTP_CALL_INITIAL_PPD 0
#endif
slist call_list;
time_t last_snd_ctrl; /* timestamp of latest ctrl message sent */
- time_t last_rcv_ctrl; /* timestamp of latest ctrl message receieved */
+ time_t last_rcv_ctrl; /* timestamp of latest ctrl message received */
uint32_t echo_seq; /* identifier of Echo Request */
int16_t /* flags : processing I/O events */
-/* $OpenBSD: pptp_call.c,v 1.11 2021/03/10 10:29:26 patrick Exp $ */
+/* $OpenBSD: pptp_call.c,v 1.12 2021/03/29 03:54:40 yasuoka Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-/* $Id: pptp_call.c,v 1.11 2021/03/10 10:29:26 patrick Exp $ */
+/* $Id: pptp_call.c,v 1.12 2021/03/29 03:54:40 yasuoka Exp $ */
/**@file PPTP Call */
/* currently it supports PAC mode only */
#include <sys/types.h>
if (SEQ_SUB(seq, _this->rcv_acked) > RUPDIV(_this->winsz, 2)) {
/*
* Multi-packet acknowledgement.
- * send ack when it reachs to half of window size
+ * send ack when it reaches to half of window size
*/
PPTP_CALL_DBG((_this, LOG_DEBUG,
"rcv window size=%u %u %u\n",
-/* $OpenBSD: pptp_ctrl.c,v 1.12 2021/03/05 08:41:26 yasuoka Exp $ */
+/* $OpenBSD: pptp_ctrl.c,v 1.13 2021/03/29 03:54:40 yasuoka Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
* PPTP(RFC 2637) control connection implementation.
* currently it only support PAC part
*/
-/* $Id: pptp_ctrl.c,v 1.12 2021/03/05 08:41:26 yasuoka Exp $ */
+/* $Id: pptp_ctrl.c,v 1.13 2021/03/29 03:54:40 yasuoka Exp $ */
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
switch (_this->state) {
case PPTP_CTRL_STATE_WAIT_STOP_REPLY:
- /* waiting responce. */
+ /* waiting response. */
/* this state will timeout by pptp_ctrl_timeout */
break;
case PPTP_CTRL_STATE_ESTABLISHED:
val = "";
strlcpy(scc->host_name, val, sizeof(scc->host_name));
- /* vender name */
+ /* vendor name */
if (PPTP_CTRL_CONF(_this)->vendor_name == NULL)
val = PPTPD_DEFAULT_VENDOR_NAME;
strlcpy(scc->vendor_string, val, sizeof(scc->vendor_string));
-/* $OpenBSD: pptp_local.h,v 1.4 2012/05/08 13:15:12 yasuoka Exp $ */
+/* $OpenBSD: pptp_local.h,v 1.5 2021/03/29 03:54:40 yasuoka Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
} __attribute__((__packed__));
-/* Commont part of the PPTP control packet */
+/* Common part of the PPTP control packet */
struct pptp_ctrl_header {
uint16_t length;
uint16_t pptp_message_type;
-/* $OpenBSD: pptpd.c,v 1.32 2019/05/10 01:29:31 guenther Exp $ */
+/* $OpenBSD: pptpd.c,v 1.33 2021/03/29 03:54:40 yasuoka Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-/* $Id: pptpd.c,v 1.32 2019/05/10 01:29:31 guenther Exp $ */
+/* $Id: pptpd.c,v 1.33 2021/03/29 03:54:40 yasuoka Exp $ */
/**@file
* This file provides a implementation of PPTP daemon. Currently it
* provides functions for PAC (PPTP Access Concentrator) only.
- * $Id: pptpd.c,v 1.32 2019/05/10 01:29:31 guenther Exp $
+ * $Id: pptpd.c,v 1.33 2021/03/29 03:54:40 yasuoka Exp $
*/
#include <sys/types.h>
#include <sys/socket.h>
return 0;
}
-/* add a listner to pptpd daemon context */
+/* add a listener to pptpd daemon context */
int
pptpd_add_listener(pptpd *_this, int idx, struct pptp_conf *conf,
struct sockaddr *addr)
PPTPD_ASSERT(_this != NULL);
if ((evmask & EV_READ) != 0) {
- for (;;) { /* accept till EAGAIN occured */
+ for (;;) { /* accept till EAGAIN occurred */
peerlen = sizeof(peer);
if ((newsock = accept(listener->sock,
(struct sockaddr *)&peer, &peerlen)) < 0) {
}
}
-/* I/O event handeler of GRE */
+/* I/O event handler of GRE */
static void
pptpd_gre_io_event(int fd, short evmask, void *ctx)
{