Attilio Anthony John Wagstaffe
Simple headlock and as you say school boy prank, but not if it is applied as kubi jime and with real intention as I think the original poster really meant......
Shades of Gene Labelle and a certain Steven whatsis name?
I was just being a nit picker. A head lock is a arm wrapped around your skull that is squeezing it. This is annoying at best, mildly painful at best.
What you are talking about is what bjj players would call a standing guillotine choke or as you pointed out it could be called kubi jime. Honestly, if I had someone in that position and they started reaching for my boys, i would either a) pull guard and finish the choke then play river dance on their face, or b) start kneeing them in the chest repeatedly until they stopped trying to grab my boys.
At least in the two instances where this happened those were the approaches I took (minus the riverdance).
The best way to approach t his would be to defend the choke first, then escape. So you need to break the posture of the person choking you (assuming you already failed at stopping him from securing the choke with something like a sankyu, strike, throw or kotageshi). the easiest way to do this is to reach over his back pull him down while pushing on his knee with your other hand. Now that you are safe from the choke (and your hand is on his knee to help stop you from being kneed into unconsciousness, you can now start to worry about how to escape. But that is a different project altogether.
The attack to the groin might work, or it might just tick off the person choking you into oblivion...and THAT is a bad bad thing to do. It's much better to defend the problem, then escape. It's even better to defend before the problem even exists and never get put in the choke in the first place...but you can't always control what happens :-)