version 1.1, 2012/02/21 23:32:47
|
version 1.1.1.2, 2013/07/22 08:44:29
|
Line 22
|
Line 22
|
#include <pdel/util/ghash.h> |
#include <pdel/util/ghash.h> |
#endif |
#endif |
|
|
|
#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 851 L2tpPeerMacAddr(Link l, void *buf, size_t buf_len)
|
Line 852 L2tpPeerMacAddr(Link l, void *buf, size_t buf_len)
|
L2tpInfo const l2tp = (L2tpInfo) l->info; |
L2tpInfo const l2tp = (L2tpInfo) l->info; |
|
|
if (l2tp->tun && l2tp->tun->peer_iface[0]) { |
if (l2tp->tun && l2tp->tun->peer_iface[0]) { |
snprintf(buf, buf_len, "%02x:%02x:%02x:%02x:%02x:%02x", | ether_ntoa_r((struct ether_addr *)l2tp->tun->peer_mac_addr, buf); |
l2tp->tun->peer_mac_addr[0], l2tp->tun->peer_mac_addr[1], | |
l2tp->tun->peer_mac_addr[2], l2tp->tun->peer_mac_addr[3], | |
l2tp->tun->peer_mac_addr[4], l2tp->tun->peer_mac_addr[5]); | |
return (0); |
return (0); |
} |
} |
((char*)buf)[0]=0; |
((char*)buf)[0]=0; |
Line 931 L2tpStat(Context ctx)
|
Line 929 L2tpStat(Context ctx)
|
L2tpPeerName(ctx->lnk, buf, sizeof(buf)); |
L2tpPeerName(ctx->lnk, buf, sizeof(buf)); |
Printf(" (%s)\r\n", buf); |
Printf(" (%s)\r\n", buf); |
if (l2tp->tun->peer_iface[0]) { |
if (l2tp->tun->peer_iface[0]) { |
Printf("\tCurrent peer : %02x:%02x:%02x:%02x:%02x:%02x at %s\r\n", | ether_ntoa_r((struct ether_addr *)l2tp->tun->peer_mac_addr, buf); |
l2tp->tun->peer_mac_addr[0], l2tp->tun->peer_mac_addr[1], | Printf("\tCurrent peer : %s at %s\r\n", buf, |
l2tp->tun->peer_mac_addr[2], l2tp->tun->peer_mac_addr[3], | |
l2tp->tun->peer_mac_addr[4], l2tp->tun->peer_mac_addr[5], | |
l2tp->tun->peer_iface); |
l2tp->tun->peer_iface); |
} |
} |
|
|
Printf("\tFraming : %s\r\n", (l2tp->sync?"Sync":"Async")); |
Printf("\tFraming : %s\r\n", (l2tp->sync?"Sync":"Async")); |
} |
} |
Printf("\tCalling number: %s\r\n", l2tp->callingnum); |
Printf("\tCalling number: %s\r\n", l2tp->callingnum); |