Re: Re: [mpls-linux-general] I need some help to read the codes related with MPLS patches
Status: Beta
Brought to you by:
jleu
From: <jj...@dr...> - 2001-11-19 18:08:22
|
Thanks for your comment, first. And thanks for you and other peoples that=20 make the great job about the MPLS-Linux. Before I ask some questions, I must apology about my lack of English. Actually I read the RFCs related=20 with MPLS and LDP. But when I looked at the code, MPLS-Linux,=20 I can't figure out the implementation of LIB tables such like ILM, NHLFE, FTN as descirbed in RFC 3031. I think that the problem I've been had is not just for my case. Ofcourse I read the codes.=20 Anyway, I wonder the meaning of the res->proto_data[AUX_PROTO_DATA_MPLS]=20 in route.c as I posted the prevoius mail. It is hard to follow the code with this because the location of set the information of code is hard to find. Is there anybody explain me about that?=20 ------------------------------------------------------- Ki Young Jung (jj...@ic...) Information and Communications University(ICU) Broadband Network Laboratory(http://bnlab.icu.ac.kr) 58-4 Hwaam-dong, Yusong-gu, Taejon, 305-732, KOREA Tel)+82-42-866-6182, 016-370-1751 Fax)+82-42-866-6110=20 ------------------------------------------------------- ----- Original Message -----=20 From: James R. Leu=20 To: Á=A2=B4=A1=BEâ=A2=AFµ=20 Cc: mpl...@li...=20 Sent: Tuesday, November 20, 2001 1:21 AM Subject: Re: [mpls-linux-general] I need some help to read the codes rela= ted with MPLS patches You're already using the best document there is, the code. Keep digging through it, you'll figure it out. If you run into a road block, and have specific questions feel free to e-mail that list with it. I or someone else will answer. Jim On Mon, Nov 19, 2001 at 11:58:51PM +0900, Á=A2=B4=A1=BEâ=A2=AF= µ wrote: > I've looked at the code, and i think that the binding point of mpls_out= put() is in route.c >=20 > After patching mpls codes, in ./net/ipv4/route.c >=20 > void rt_set_nexthop(struct rtable *rt, struct fib_result *res, u32 itag= ) > { > struct fib_info *fi =3D res->fi; > =20 > =A2=AE¦ > =20 > #ifdef CONFIG_MPLS > /* JLEU: we need to do this here because both > * ip_route_output_slow() and ip_route_output_slow() > * us this to finish the next hop calculations > */ > if(res->proto_data[AUX_PROTO_DATA_MPLS]) { > struct mpls_out_info *moi; > int i; > =20 > MPLS_DEBUG(("rt_set_nexthop: adding label to dst\n")); > MPLS_DEBUG(("rt_set_nexthop: before - mtu =3D %d\n", > rt->u.dst.pmtu)); > rt->u.dst.output =3D mpls_output; /* HERE */ > rt->u.dst.dst_proto_data[AUX_PROTO_DATA_MPLS] =3D=20 > res->proto_data[AUX_PROTO_DATA_MPLS]; > moi =3D res->proto_data[AUX_PROTO_DATA_MPLS]; > mpls_again: > for(i=3D0;i<moi->moi_instruction_length;i++) { > switch(moi->moi_instruction[i].mi_opcode) { > case MPLS_OP_FWD: > moi =3D (struct mpls_out_info*) > moi->moi_instruction[i].mi_data; > goto mpls_again; > break; > case MPLS_OP_PUSH: > rt->u.dst.pmtu -=3D 4; > break; > } > } > MPLS_DEBUG(("rt_set_nexthop: after - mtu =3D %d\n", > rt->u.dst.pmtu)); > } > =20 > =A2=AE¦ > =20 > } > =20 > If res->proto_data[AUX_PROTO_DATA_MPLS] have a value (not zero) > then the output related function is binded with mpls_output() > so the function is invoked. > =20 > But I still try to find work that describes the structures or methods o= f MPLS in Linux .=20 > Is there anyone who know this? I hope to learn from him or her. > =20 > Especially, I want to know the semantics of proto_data[AUX_PROTO_DATA_M= PLS]. > =20 > Thanks, in advance. > =20 > B.E. > =20 > Kiyoung Jung > ------------------------------------------------------- > Ki Young Jung (jj...@ic...) > Information and Communications University(ICU) > Broadband Network Laboratory(http://bnlab.icu.ac.kr) > 58-4 Hwaam-dong, Yusong-gu, Taejon, 305-732, KOREA > Tel)+82-42-866-6182, 016-370-1751 Fax)+82-42-866-6110=20 > ------------------------------------------------------- > ------------------------------------------------- > DreamWiz Free Mail @ http://www.dreamwiz.com/ > DreamSearch Click the world!!! http://search.dreamwiz.com/ >=20 --=20 James R. Leu ------------------------------------------------- DreamWiz Free Mail @ http://www.dreamwiz.com/ DreamSearch Click the world!!! http://search.dreamwiz.com/ |