Network Traffic Analysis Using Stochastic Grammars