Estimating Logarithmic and Exponential Functions to Track Network Traffic Entropy in P4