So, guys, the first episode that we were going to implement is the following API that is is Interface
L3 Bidirectional right.
This API must either true or false, depending on the state of the link which connects this interface
and its neighbor.
So, for example, in this diagram, you have two devices are one or two.
So the input to this API is a pointer to the interface, not zero of the node R1.
Right.
And this API must return true only when this particular link is bidirectional link.
Now, a link URL is set to be bidirectional link only when it's satisfied these four properties.
Right.
That is the interface on either side of the link must be in upstate and both the interface must be configured
with IP addresses and both the IP addresses must be in the same subnet.
Right.
So you can see that 10.1 dot one, dot one slash 24 and 10.1 dot one two is less for all the IP addresses
in the same subnet.
If the IP address of the interface one change is through 10.1 door to door to 24, then these IP addresses
are normal in the same subnet.
Right?
So mere presence of the IP address is not a sufficient condition.
They also have to be in the same subnet.
And of course, none of the interfaces must be operating in an ultimate either and access or in trunk
mode.
So if both the interfaces of the links satisfy these four properties, then the link URL is set to be
bidirectional link and this API must return.
True.
In that case, the input to this API is a pointer to one of the interface of the link.
Right?
So needless to say, this API must always return false if you are testing it on the interface Internet
zero such that on the other side of this link and to switch is present.
Right, because this interface would not have any IP address configured.
And moreover, this particular and will will be operating in an alpha mode either in access or trunk.
So this particular link is not an L3 bidirectional link.
Then the next episode, which we need to implement, is to flush the next corpse from the next stop
at a past as an argument, right.
So the argument to this API is an eddy, which is draws the pointer to the next top data structure.
Therefore, the argument to this API is a double pointer because this is the best address of the edit,
which in turn installs the pointer to the next data structures.
So let us suppose that this at straws next to and each one with the reference count.
Well, you say three and and it's true with the reference convoluted two.
And this is null.
That is nothing is present here.
And suppose this is course the next top three, which has a reference count of one and all other and
all of the elements in this area are not right.
So when you invoke espere flush natural function over this eddy, this array must remove all the next
Taub's from this addae that is all the member elements must be null.
But you need to take care of that before removing the next rule from this addae, you need to decrement
the reference count of these next Tobes.
So the reference count of the next 12 and it's one would become to the reference count of the next openers,
two would become one and the reference count of the next two and three would become zero.
The moment the reference count of the next top becomes zero, it simply means that you need to free
the next.
All right.
If the reference count of the next pope after DiClemente do not become zero, then you need to remove
that next pope from this area, but you are not supposed to free it, right.
It simply means that there exists some real structure deal which still holds a pointer to this next.
All right.
So this is the example regarding how this API would be invoked, we passed the best pointer of the next
topiary as an argument to this API as a flush next hopes.