Hi,all,

I am studying the example pyswitch.py.I am a new learner and  I understand
most of them, but few lines are not clear to me.

The following lines:

dst = inst.st[dpid][srcaddr]
 if dst[0] != inport:
 log.msg('MAC has moved from '+str(dst)+'to'+str(inport), system='pyswitch')

I am confused that why using str(dst) not str(dst[0]), does dst[0]
represent an old inport?

Does dst[0] ,dst[1], dst[2] represent the inport, time and packet?
Additionally,should I assign the new inport to the inst.st[dpid][srcaddr]?
Just use inst.st[dpid][srcaddr][0]=inport ?

Thanks very much

Weiyang

Reply via email to