Make spice mix using all the ingredients under "to marinate"..
Marinate chicken legs with this for minimum of 30 minutes. in refrigerator.
Heat the oil in a kadhai and sparkle the mustard seeds.
Let it splutter and add the curry leaves, onions and green chillies.
Saute on high heat till the onions soften.
Grind together the coconut, garlic, ginger, pearl onions and fennel seeds with a little water to form a fine paste.
Add this coconut paste to the kadhai with the onions. Saute till the raw smell of garlic and pearl onions are gone.
Add turmeric, coriande rpowder and garam masala and cook for a couple more minutes.
Add the marinated chicken pieces and toss them around so it is covered well with the coconut paste and everything else in pan.
Add the pureed tomatoes to this along with some salt and about 1/2 cup water and mix well.
Cover and cook on high heat for about 10 mins. Check and add more water (1/2 cup more) if it is too dry and sticking to the bottom of the pan. By this time the chicken should start releasing some moisture too.
Garnish with fresh curry leaves and serve with rice, rotis or naan.