version 1.1.1.1, 2012/02/21 23:32:47
|
version 1.1.1.2, 2013/07/22 08:44:29
|
Line 16
|
Line 16
|
#include "log.h" |
#include "log.h" |
#include "util.h" |
#include "util.h" |
|
|
|
#include <net/ethernet.h> |
#include <netgraph/ng_message.h> |
#include <netgraph/ng_message.h> |
#include <netgraph/ng_socket.h> |
#include <netgraph/ng_socket.h> |
#include <netgraph/ng_ksocket.h> |
#include <netgraph/ng_ksocket.h> |
Line 591 PptpPeerMacAddr(Link l, void *buf, size_t buf_len)
|
Line 592 PptpPeerMacAddr(Link l, void *buf, size_t buf_len)
|
PptpInfo const pptp = (PptpInfo) l->info; |
PptpInfo const pptp = (PptpInfo) l->info; |
|
|
if (pptp->peer_iface[0]) { |
if (pptp->peer_iface[0]) { |
snprintf(buf, buf_len, "%02x:%02x:%02x:%02x:%02x:%02x", | ether_ntoa_r((struct ether_addr *)pptp->peer_mac_addr, buf); |
pptp->peer_mac_addr[0], pptp->peer_mac_addr[1], | |
pptp->peer_mac_addr[2], pptp->peer_mac_addr[3], | |
pptp->peer_mac_addr[4], pptp->peer_mac_addr[5]); | |
return (0); |
return (0); |
} |
} |
((char*)buf)[0]=0; |
((char*)buf)[0]=0; |
Line 670 PptpStat(Context ctx)
|
Line 668 PptpStat(Context ctx)
|
PptpPeerName(ctx->lnk, buf, sizeof(buf)); |
PptpPeerName(ctx->lnk, buf, sizeof(buf)); |
Printf(" (%s)\r\n", buf); |
Printf(" (%s)\r\n", buf); |
if (pptp->peer_iface[0]) { |
if (pptp->peer_iface[0]) { |
Printf("\tCurrent peer : %02x:%02x:%02x:%02x:%02x:%02x at %s\r\n", | ether_ntoa_r((struct ether_addr *)pptp->peer_mac_addr, buf); |
pptp->peer_mac_addr[0], pptp->peer_mac_addr[1], | Printf("\tCurrent peer : %s at %s\r\n", buf, pptp->peer_iface); |
pptp->peer_mac_addr[2], pptp->peer_mac_addr[3], | |
pptp->peer_mac_addr[4], pptp->peer_mac_addr[5], | |
pptp->peer_iface); | |
} |
} |
Printf("\tFraming : %s\r\n", (pptp->sync?"Sync":"Async")); |
Printf("\tFraming : %s\r\n", (pptp->sync?"Sync":"Async")); |
Printf("\tCalling number: %s\r\n", pptp->callingnum); |
Printf("\tCalling number: %s\r\n", pptp->callingnum); |