Taking nodei38-1 as XmppClient(It is a ToR agent)
From the stats(Session stats and ifmap stats), it is clear that config is not set to XmppClient. The Subscribe message is rxed from the client.(It is visible in the trace and also in stats)
(gdb) p *(TcpSession *)0x1623060
$21 = (XmppSession) {
stats_ = std::vector of length 5, capacity 5 = {{
first = 0,
second = 0
}, {
first = 1,
second = 173
}, {
first = 0,
second = 0
}, {
first = 2,
second = 566
}, {
first = 392,
second = 782
}},
..
}
Taking nodei38-1 as XmppClient(It is a ToR agent)
From the stats(Session stats and ifmap stats), it is clear that config is not set to XmppClient. The Subscribe message is rxed from the client.(It is visible in the trace and also in stats)
gdb) p *(IFMapClient *) 0x7f9557eacde0 el::IFMapSender ) { IFMapClient = 0xae3cd0 <vtable for IFMapXmppChanne l::IFMapSender+ 16>, is_blocked_ = false, 192.168. 1.6" l::IFMapSender: global- system- config: nodei38- 1" nel*) 0x7f94416ac9f0 IFMapXmppChanne l = 0xae3d30 <vtable for IFMapXmppChanne l+16>, channel_ manager_ = 0x7fff291591a0, 192.168. 1.6"
$17 = (IFMapXmppChann
<IFMapClient> = {
_vptr.
static kIndexInvalid = -1,
index_ = 4,
exporter_ = 0x1449f30,
msgs_sent_ = 0,
msgs_blocked_ = 0,
bytes_sent_ = 0,
nodes_sent_ = 0,
links_sent_ = 0,
send_
vm_map_ = std::map with 0 elements,
name_ = "nodei36:
},
members of IFMapXmppChanne
parent_ = 0x7f94416ac9f0,
hostname_ = "nodei38-1",
identifier_ = "default-
}
(gdb) p *(IFMapXmppChan
$18 = (IFMapXmppChannel) {
_vptr.
peer_id_ = xmps::CONFIG,
channel_ = 0x1f2df10,
ifmap_server_ = 0x7fff29159400,
ifmap_
ifmap_client_ = 0x7f9557eacde0,
client_added_ = true,
channel_name_ = "nodei36:
}
(gdb) p *(XmppChannel *) 0x1f2df10 XmppChannel = 0xb6d9f0 <vtable for XmppChannelMux+16> boost:: function2< void, XmppStanza: :XmppMessage const*, xmps::PeerState>> = {
<boost: :function_ base> = { function2< void, XmppStanza: :XmppMessage const*, xmps::PeerState >::assign_ to<boost: :_bi::bind_ t<void, boost:: _mfi::mf1< void, IFMapXmppChannel, XmppStanza: :XmppMessage const*>, boost:: _bi::list2< boost:: _bi::value< IFMapXmppChanne l*>, boost::arg<1> > > >(boost: :_bi::bind_ t<void, boost:: _mfi::mf1< void, IFMapXmppChannel, XmppStanza: :XmppMessage const*>, boost:: _bi::list2< boost:: _bi::value< IFMapXmppChanne l*>, boost::arg<1> > >)::stored_ vtable+ 1>,
const_qualified = false,
volatile_ qualified = false
func_ ptr = 0x11,
bound_ memfunc_ ptr = {
memfunc_ ptr = &virtual table offset 16,
obj_ptr = 0x7f94416ac9f0
obj_ptr = 0x11,
is_const_ qualified = false,
is_volatile_ qualified = false
<std:: binary_ function< XmppStanza: :XmppMessage const*, xmps::PeerState, void>> = {<No data fields>}, function2< void, XmppStanza: :XmppMessage const*, xmps::PeerState>: boost:: function2< void, XmppStanza: :XmppMessage const*, xmps::PeerState>> = {
<boost: :function_ base> = { function2< void, XmppStanza: :XmppMessage const*, xmps::PeerState >::assign_ to<boost: :_bi::bind_ t<void, boost:: _mfi::mf1< void, BgpXmppChannel, XmppStanza: :XmppMessage const*>, boost:: _bi::list2< boost:: _bi::value< BgpXmppChannel* >, boost::arg<1> > > >(boost: :_bi::bind_ t<void, boost:: _mfi::mf1< void, BgpXmppChannel, XmppStanza: :XmppMessage const*>, boost:: _bi::list2< boost:: _bi::value< BgpXmppChannel* >, boost::arg<1> > >)::stored_ vtable+ 1>,
const_qualified = false,
volatile_ qualified = false
func_ ptr = 0x19,
bound_ memfunc_ ptr = {
memfunc_ ptr = &virtual table offset 24,
obj_ptr = 0x7f9441272530
obj_ptr = 0x19,
is_const_ qualified = false,
is_volatile_ qualified = false
<std:: binary_ function< XmppStanza: :XmppMessage const*, xmps::PeerState, void>> = {<No data fields>}, function2< void, XmppStanza: :XmppMessage const*, xmps::PeerState>: :function1< void, boost:: system: :error_ code const&>> = { boost:: function_ base> = {
const_ qualified = 49,
volatile_ qualified = 48
bound_ memfunc_ ptr = {
memfunc_ ptr = &virtual table offset 140282221821950, this adjustment 361588493243004 9329,
is_ const_qualified = 49,
is_ volatile_ qualified = 48 std::unary_ function< boost:: system: :error_ code const&, void>> = {<No data fields>}, function1< void, boost:: system: :error_ code const&>: ection) { XmppConnection = 0xb59650 <vtable for XmppServerConne ction+16> ,
sa_ family = 2, 300\250\ 001\006\ 000\000\ 000\000\ 000\000\ 000"
sin_ family = 2,
sin_ port = 20635,
sin_ addr = {
s_addr = 100772032
sin_ zero = "\000\000\ 000\000\ 000\000\ 000"
sin6_ family = 2,
sin6_ port = 20635,
sin6_ flowinfo = 100772032,
sin6_ addr = {
__in6_u = {
__u6_ addr8 = '\000' <repeats 15 times>,
__u6_ addr16 = {0, 0, 0, 0, 0, 0, 0, 0},
__u6_ addr32 = {0, 0, 0, 0}
sin6_ scope_id = 0
sa_ family = 2, 300\250\ 001\004\ 000\000\ 000\000\ 000\000\ 000"
sin_ family = 2,
sin_ port = 38164,
sin_ addr = {
s_addr = 67217600
sin_ zero = "\000\000\ 000\000\ 000\000\ 000"
sin6_ family = 2,
sin6_ port = 38164,
sin6_ flowinfo = 67217600,
sin6_ addr = {
__in6_u = {
__u6_ addr8 = '\000' <repeats 15 times>,
__u6_ addr16 = {0, 0, 0, 0, 0, 0, 0, 0},
__u6_ addr32 = {0, 0, 0, 0}
sin6_ scope_id = 0 timer_ = 0x52870b0, :scoped_ ptr<XmppStateMa chine>) 0x6659a00, :scoped_ ptr<XmppChannel Mux>) 0x1f2df10, feature_ fail = 0, _fail = 0 ction: :scoped_ ptr<XmppServerC onnection: :DeleteActor> ) 0x1622ce0, delete_ ref_ = { fBase> = { vptr.LifetimeRe fBase = 0xb59490 <vtable for LifetimeRef< XmppServerConne ction>+ 16>, :intrusive_ hook> next = 0x192e770 prev = 0x665a080, XmppServerConne ction>:
$19 = (XmppChannelMux) {
<XmppChannel> = {
_vptr.
},
members of XmppChannelMux:
map_ = std::map with 0 elements,
rxmap_ = std::map with 2 elements = {
[xmps::CONFIG] = {
<
vtable = 0xae3331 <void boost::
functor = {
obj_ptr = 0x11,
type = {
type = 0x11,
},
},
obj_ref = {
},
data = 17 '\021'
}
},
members of boost::
static args = <optimized out>,
static arity = <optimized out>
}, <No data fields>},
[xmps::BGP] = {
<
vtable = 0xb239d1 <void boost::
functor = {
obj_ptr = 0x19,
type = {
type = 0x19,
},
},
obj_ref = {
},
data = 25 '\031'
}
},
members of boost::
static args = <optimized out>,
static arity = <optimized out>
}, <No data fields>}
},
cb_ = {
<boost:
<
vtable = 0x0,
functor = {
obj_ptr = 0x7f95ffffffff,
type = {
type = 0x7f95ffffffff,
},
func_ptr = 0x7f95ffffffff,
obj_ptr = 0x313a3834312e3731
},
obj_ref = {
obj_ptr = 0x7f95ffffffff,
},
data = -1 '\377'
}
},
<
members of boost::
static args = <optimized out>,
static arity = <optimized out>
}, <No data fields>},
connection_ = 0x5286f90,
mutex_ = {
static is_rw_mutex = false,
static is_recursive_mutex = false,
static is_fair_mutex = false,
impl = {
__data = {
__lock = 0,
__count = 0,
__owner = 0,
__nusers = 0,
__kind = 0,
__spins = 0,
__elision = 0,
__list = {
__prev = 0x0,
__next = 0x0
}
},
__size = '\000' <repeats 39 times>,
__align = 0
}
}
}
(gdb) p *(XmppConnection *) 0x5286f90
$20 = (XmppServerConn
<XmppConnection> = {
_vptr.
static kAuthTypeNil = 0xb1deec "NIL",
static kAuthTypeTls = 0xb589a4 "TLS",
server_ = 0x14752a0,
session_ = 0x1623060,
endpoint_ = {
impl_ = {
data_ = {
base = {
sa_data = "\233P\
},
v4 = {
},
},
v6 = {
}
},
}
}
}
},
local_endpoint_ = {
impl_ = {
data_ = {
base = {
sa_data = "\024\225\
},
v4 = {
},
},
v6 = {
}
},
}
}
}
},
config_ = 0x0,
spin_mutex_ = {
flag = 0 '\000',
static is_rw_mutex = false,
static is_recursive_mutex = false,
static is_fair_mutex = false
},
keepalive_
log_uve_ = true,
admin_down_ = false,
disable_read_ = false,
from_ = "nodei36",
to_ = "nodei38-1",
auth_enabled_ = false,
state_machine_ = (boost:
mux_ = (boost:
last_msg_ = {
_M_ptr = 0x0
},
stats_ = {{
open = 1,
close = 0,
keepalive = 392,
update = 2
}, {
open = 1,
close = 0,
keepalive = 389,
update = 0
}},
error_stats_ = {
connect_error = 0,
session_close = 0,
open_fail = 0,
stream_
handshake
}
},
members of XmppServerConne
duplicate_ = false,
on_work_queue_ = false,
conn_endpoint_ = 0x7f95a4001c50,
deleter_ = (boost:
server_
<LifetimeRe
_
ref_ = {
node_ = <boost:
self_ = 0x5287078,
ptr_ = 0x14767e0
}
},
members of LifetimeRef<
ptr_ = 0x5286f90
}
}
(gdb) p *(TcpSession *)0x1623060
$21 = (XmppSession) {
stats_ = std::vector of length 5, capacity 5 = {{
first = 0,
second = 0
}, {
first = 1,
second = 173
}, {
first = 0,
second = 0
}, {
first = 2,
second = 566
}, {
first = 392,
second = 782
}},
..
}