A man is undergoing surgery after being bitten by a white shark near Port Macquarie on the New South Wales mid north coast.