X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fstp.c;h=c5aec57d2149552839623a066c1c92757a3d78a7;hb=0d1cee123a84ef8885834c0d086c4a3d5d48355f;hp=afe77d0824c0757e06ac183b8f2f8fe05b384521;hpb=cc7a9de0a5b52ae2b8161e5d8c9d51c61f849102;p=sliver-openvswitch.git diff --git a/lib/stp.c b/lib/stp.c index afe77d082..c5aec57d2 100644 --- a/lib/stp.c +++ b/lib/stp.c @@ -684,6 +684,15 @@ stp_learn_in_state(enum stp_state state) return (state & (STP_DISABLED | STP_LEARNING | STP_FORWARDING)) != 0; } +/* Returns true if 'state' is one in which rx&tx bpdu should be done on + * on a port, false otherwise. */ +bool +stp_listen_in_state(enum stp_state state) +{ + return (state & + (STP_LISTENING | STP_LEARNING | STP_FORWARDING)) != 0; +} + /* Returns the name for the given 'role' (for use in debugging and log * messages). */ const char *