Re: [mpls-linux-general] Question about ldp_range (ldp_range.c)
Status: Beta
Brought to you by:
jleu
|
From: James R. L. <jl...@mi...> - 2002-09-12 19:02:19
|
The label allocation is controlled via the mpls porting layer
(in the zebra-ldp case it is in impl_mpls.)
Jim
On Thu, Sep 12, 2002 at 12:04:55PM +0800, Kenny wrote:
>
> Could you please tell me now who control the label range and where it
> is in the code? Thanks.
>
> On Wed, 11 Sep 2002 23:16:50 -0500
> "James R. Leu" <jl...@mi...> wrote:
>
> You caugth me. In fact the label range isn't even used any where in the
> code. I'm thinking of getting rid of it. I'm thinking that the label
> range should be controlled by the label manager. From ldp-portable's
> perspective the label manager is an outside entity and ldp-portable
> should know nothing of it.
>
> Anyone care to comment?
>
> Jim
>
> On Thu, Sep 12, 2002 at 10:14:45AM +0800, Kenny wrote:
> > Hi Jim,
> >
> > When I was tracing ldp-portable, I found something strange.
> > Why the both min_gen and max_gen of ldp_range are assigned to
> > LDP_RANGE_DEF_GEN_MIN?
> >
> > Please see the "case LDP_GENERIC:" in the following code.
> >
> > Best Regards,
> > Kenny
> >
> > ---------------------ldp_range.c------------------------------------------------------------------
> > ldp_range *ldp_range_create(int32_t label_space, ldp_label_range_type
> > type)
> > {
> > ldp_range *r = (ldp_range *) ldp_malloc(sizeof(ldp_range));
> >
> > if (r) {
> > LDP_LIST_INIT(&r->peer_root, ldp_peer);
> > LDP_LIST_INIT(&r->if_root, ldp_if);
> > LDP_REFCNT_INIT(r, 0);
> >
> > r->label_space = label_space;
> > r->type = type;
> > switch (type) {
> > case LDP_GENERIC:
> > r->min.gen = LDP_RANGE_DEF_GEN_MIN;
> > r->max.gen = LDP_RANGE_DEF_GEN_MIN;
> > break;
> > case LDP_ATM_VP:
> > r->min.atm.vpi = LDP_RANGE_DEF_ATM_VPI_MIN;
> > r->max.atm.vpi = LDP_RANGE_DEF_ATM_VPI_MAX;
> > break;
> > case LDP_ATM_VC:
> > r->min.atm.vci = LDP_RANGE_DEF_ATM_VCI_MIN;
> > r->max.atm.vci = LDP_RANGE_DEF_ATM_VCI_MAX;
> > break;
> > case LDP_ATM_VP_VC:
> > r->min.atm.vpi = LDP_RANGE_DEF_ATM_VPI_MIN;
> > r->max.atm.vpi = LDP_RANGE_DEF_ATM_VPI_MAX;
> > r->min.atm.vci = LDP_RANGE_DEF_ATM_VCI_MIN;
> > r->max.atm.vci = LDP_RANGE_DEF_ATM_VCI_MAX;
> > break;
> > case LDP_FR_10:
> > r->min.fr = LDP_RANGE_DEF_FR_MIN;
> > r->max.fr = LDP_RANGE_DEF_FR_10_MAX;
> > break;
> > case LDP_FR_24:
> > r->min.fr = LDP_RANGE_DEF_FR_MIN;
> > r->max.fr = LDP_RANGE_DEF_FR_24_MAX;
> > break;
> > default:
> > ldp_free(r);
> > return NULL;
> > }
> > }
> > return r;
> > }
> >
> >
> >
> > -------------------------------------------------------
> > In remembrance
> > www.osdn.com/911/
> > _______________________________________________
> > mpls-linux-general mailing list
> > mpl...@li...
> > https://lists.sourceforge.net/lists/listinfo/mpls-linux-general
>
> --
> James R. Leu
>
>
> -------------------------------------------------------
> In remembrance
> www.osdn.com/911/
> _______________________________________________
> mpls-linux-general mailing list
> mpl...@li...
> https://lists.sourceforge.net/lists/listinfo/mpls-linux-general
--
James R. Leu
|