using System;
using System.Collections.Generic;
using System.Collections;
using System.Collections.Specialized;
using System.Linq;
using System.Text;
using System.IO;
using System.Reflection;
using static System.Math;
using System.Numerics;
static class Program{
	const int mod=(int)1e9+7;
	static List<int>[] li;
	static bool[] b;
	static int[] h;
	static void Main(){
		Sc sc=new Sc();
		var s=sc.Ia;
		int n=s[0],m=n-1;
		li=new List<int>[n+1];
		b=new bool[n+1];
		h=new int[n+1];
		for(int i=1;i<=n;i++){li[i]=new List<int>();}
		for(int i=0;i<m;i++){
			var e=sc.Ia;
			li[e[0]+1].Add(e[1]+1);
			li[e[1]+1].Add(e[0]+1);
		}
		Hld hl=new Hld(li,1,false);
		StringBuilder sb=new StringBuilder();
		for(int i = 0;i<s[1];i++) {
			var e=sc.Ia;
			if(e[0]==1){hl.Ur(e[1]+1,e[2]);}
			else{sb.Append(hl.Get(e[1]+1,e[2]+1)+"\n");}
		}
		Console.Write(sb);
	}
	static void Fu(int a,int g){
		b[a]=true;
		for(int i=0;i<li[a].Count;i++){
			if(!b[li[a][i]]){Fu(li[a][i],g);}
		}
	}
}
public class Hld{
	private List<int>[] li;
	private List<int> lir;
	private List<List<int>> lia=new List<List<int>>(),lib=new List<List<int>>();
	private int[] da,ea,fa,ia,va;
	private St[] st;
	private Std stt;
	private int n,m=0,o,r,f=0,hc=0;
	public Hld(List<int>[] li,int o,bool bo){
		if(!bo){hc=1;}
		this.li=li;
		n=li.Length;
		this.o=o;
		fa=new int[n];
		da=new int[n];
		ea=new int[n];
		va=new int[n];
		lir=new List<int>();
		Fu1(o);
		r=da[o];
		fa=new int[m];
		st=new St[m];
		ia=new int[m];
		stt=new Std(m);
		for(int i = 0;i<m;i++) {
			st[i]=new St(lia[i].Count);
		}
		Fu2(r,0);
	}
	public void Ur(int a,long d){
		if(ea[a]-hc>=0){st[da[a]].Ud2(0,ea[a]-hc,d);}
		if(va[a]!=-1){stt.Ud2(ia[da[a]]+1,va[a],d);}
	}
	public void Ud(int a,long d){
		st[da[a]].Ud(ea[a],d);
	}
	public long Get(int a,int b){
		long p=0;
		int af=fa[da[a]],bf=fa[da[b]];
		while(af>bf){
			p=Fg(p,da[a],ea[a],lia[da[a]].Count-1);
			p=Fgt(p,ia[da[a]],lia[da[a]].Count-ea[a]);
			a=lir[da[a]];
			af--;
		}
		while(af<bf){
			p=Fg(p,da[b],ea[b],lia[da[b]].Count-1);
			p=Fgt(p,ia[da[b]],lia[da[b]].Count-ea[b]);
			b=lir[da[b]];
			bf--;
		}
		while(da[a]!=da[b]){
			p=Fg(p,da[a],ea[a],lia[da[a]].Count-1);
			p=Fg(p,da[b],ea[b],lia[da[b]].Count-1);
			p=Fgt(p,ia[da[a]],lia[da[a]].Count-ea[a]);
			p=Fgt(p,ia[da[b]],lia[da[b]].Count-ea[b]);
			a=lir[da[a]];
			b=lir[da[b]];
		}
		if(ea[a]<ea[b]){
			p=Fg(p,da[a],ea[a],ea[b]-hc);
			p=Fgt(p,ia[da[a]],ea[b]-ea[a]+1-hc);
		}
		else{
			p=Fg(p,da[a],ea[b],ea[a]-hc);
			p=Fgt(p,ia[da[a]],ea[a]-ea[b]+1-hc);
		}
		return p;
	}
	private long Fg(long p,int x,int a,int b){
		return p+st[x].Get(a,b);
	}
	private long Fgt(long p,int a,int c){
		return p+stt.Get(a)*c;
	}
	public void Ud2(int a,int b,long d){
		int af=fa[da[a]],bf=fa[da[b]];
		while(af>bf){
			st[da[a]].Ud2(ea[a],lia[da[a]].Count-1,d);
			a=lir[da[a]];
			af--;
		}
		while(af<bf){
			st[da[b]].Ud2(ea[b],lia[da[b]].Count-1,d);
			b=lir[da[b]];
			bf--;
		}
		while(da[a]!=da[b]){
			st[da[a]].Ud2(ea[a],lia[da[a]].Count-1,d);
			st[da[b]].Ud2(ea[b],lia[da[b]].Count-1,d);
			a=lir[da[a]];
			b=lir[da[b]];
		}
		if(ea[a]<ea[b]){st[da[a]].Ud2(ea[a],ea[b],d);}
		else{st[da[a]].Ud2(ea[b],ea[a],d);}
	}
	private void Fu2(int a,int g){
		fa[a]=g;
		ia[a]=f;
		f++;
		int j=0,p=-1;
		for(int i=0;i<lib[a].Count;i++){
			Fu2(lib[a][i],g+1);
			while(lia[a][j]!=lir[lib[a][i]]){va[lia[a][j]]=p;j++;}
			p=f-1;
			va[lia[a][j]]=p;
		}
		while(j<lia[a].Count){va[lia[a][j]]=p;j++;}
	}
	private void Fu1(int a){
		fa[a]=1;
		da[a]=-1;
		int p=0;
		for(int i=0;i<li[a].Count;i++){
			if(fa[li[a][i]]==0){
				Fu1(li[a][i]);
				if(fa[p]<fa[li[a][i]]){p=li[a][i];}
				fa[a]+=fa[li[a][i]];
			}
		}
		if(fa[a]==1){
			lia.Add(new List<int>());
			lib.Add(new List<int>());
			lir.Add(0);
			lia[m].Add(a);
			da[a]=m;
			m++;
		}
		else{
			ea[a]=lia[da[p]].Count;
			lia[da[p]].Add(a);
			da[a]=da[p];
			if(li[a].Count>2||o==a){
				for(int i=0;i<li[a].Count;i++){
					if(da[li[a][i]]!=-1&&p!=li[a][i]){
						lir[da[li[a][i]]]=a;
						lib[da[a]].Add(da[li[a][i]]);
					}
				}
			}
		}
	}
}
public class St{
	private long[] dat,dat2;
	private int m=1,cnt=0;
	public St(int n){
		while(m<n){m<<=1;}
		cnt=m+n-1;
		dat=new long[cnt];
		dat2=new long[cnt+1];
	}
	public void Ud(int q,long b){
		q+=m-1;
		dat[q]+=b;
		while(q>0){dat[(q-1)>>1]=dat[(q-1)>>1]+b;q=(q-1)>>1;}
	}
	private long Fdg(int a,int b,int k,int l,int r){
		if(dat2[k]!=0){
			dat[k]+=dat2[k];
			if(2*k+1<cnt){dat2[2*k+1]+=dat2[k]>>1;}
			if(2*k+2<cnt){dat2[2*k+2]+=dat2[k]>>1;}
			dat2[k]=0;
		}
		if(r<a||b<l){return 0;}
		if(a<=l&&r<=b){return dat[k];}
		else{return Fdg(a,b,k*2+1,l,(l+r)>>1)+Fdg(a,b,k*2+2,(l+r+1)>>1,r);}
	}
	public long Get(int a,int b){return Fdg(a,b,0,0,m-1);}
	public void Ud2(int a,int b,long d){Hn(a,b,0,0,m-1,d*m);}
	private long Hn(int a,int b,int k,int l,int r,long d){
		if(a<=l&&r<=b){dat2[k]+=d;return d;}
		else if(r>=a&&b>=l){
			long q=Hn(a,b,k*2+1,l,(l+r)>>1,d>>1)+Hn(a,b,k*2+2,(l+r+1)>>1,r,d>>1);
			dat[k]+=q;
			return q;
		}
		return 0;
	}
}
public class Std{
	private long[] dat;
	private int m=1,cnt=0;
	public Std(int n){
		while(m<n){m<<=1;}
		cnt=m+n-1;
		dat=new long[cnt];
	}
	public void Ud(int q,long b){dat[q+m-1]+=b;}
	public long Get(int q){
		long p=0;
		q+=m-1;
		while(q>=0){p+=dat[q];q=(q-1)>>1;}
		return p;
	}
	public void Ud2(int a,int b,long d){Hn(a,b,0,0,m-1,d);}
	private void Hn(int a,int b,int k,int l,int r,long d){
		if(a<=l&&r<=b){dat[k]+=d;}
		else if(l<=b&&a<=r){
			Hn(a,b,k*2+1,l,(l+r)>>1,d);
			Hn(a,b,k*2+2,(l+r+1)>>1,r,d);
		}
	}
}
public class Sc{
	public int I{get{return int.Parse(Console.ReadLine());}}
	public long L{get{return long.Parse(Console.ReadLine());}}
	public double D{get{return double.Parse(Console.ReadLine());}}
	public string S{get{return Console.ReadLine();}}
	public int[] Ia{get{return Array.ConvertAll(Console.ReadLine().Split(),int.Parse);}}
	public long[] La{get{return Array.ConvertAll(Console.ReadLine().Split(),long.Parse);}}
	public double[] Da{get{return Array.ConvertAll(Console.ReadLine().Split(),double.Parse);}}
	public string[] Sa{get{return Console.ReadLine().Split();}}
	public object[] Oa{get{return Console.ReadLine().Split();}}
	public int[] Ia2{get{return Array.ConvertAll(("0 "+Console.ReadLine()+" 0").Split(),int.Parse);}}
	public int[] Ia3(int a){return Array.ConvertAll((a.ToString()+" "+Console.ReadLine()).Split(),int.Parse);}
	public int[] Ia3(bool a,int b,bool c,int d){return Array.ConvertAll(((a?b.ToString()+" ":"")+Console.ReadLine()+(c?" "+d.ToString():"")).Split(),int.Parse);}
	public long[] La2{get{return Array.ConvertAll(("0 "+Console.ReadLine()+" 0").Split(),long.Parse);}}
	public long[] La3(int a){return Array.ConvertAll((a.ToString()+" "+Console.ReadLine()).Split(),long.Parse);}
	public long[] La3(bool a,int b,bool c,int d){return Array.ConvertAll(((a?b.ToString()+" ":"")+Console.ReadLine()+(c?" "+d.ToString():"")).Split(),long.Parse);}
	public double[] Da2{get{return Array.ConvertAll(("0 "+Console.ReadLine()+" 0").Split(),double.Parse);}}
	public double[] Da3(int a){return Array.ConvertAll((a.ToString()+" "+Console.ReadLine()).Split(),double.Parse);}
	public double[] Da3(bool a,int b,bool c,int d){return Array.ConvertAll(((a?b.ToString()+" ":"")+Console.ReadLine()+(c?" "+d.ToString():"")).Split(),double.Parse);}
	public T[] Arr<T>(int n,Func<T> f){var a=new T[n];for(int i=0;i<n;i++){a[i]=f();}return a;}
	public T[] Arr<T>(int n,Func<int,T> f){var a=new T[n];for(int i=0;i<n;i++){a[i]=f(i);}return a;}
	public T[] Arr<T>(int n,Func<string[],T> f){var a=new T[n];for(int i=0;i<n;i++){a[i]=f(Console.ReadLine().Split());}return a;}
	public T[] Arr<T>(int n,Func<int,string[],T> f){var a=new T[n];for(int i=0;i<n;i++){a[i]=f(i,Console.ReadLine().Split());}return a;}
}


Measured memory_bytes: 89976