To seek NATO advise?
To give NATO advise on how to curb terrorism inside Afghanistan so Pakistan can successfully counter the extremist elements along the border who regularly cross over from Afghanistan. Since NATO and Coalition forces are notorious for "friendly fire", it is the Pakistani forces that pay the price.
So, that is what he was there for. I ofcourse don't know that for sure. Do you?