Actually there is a protocol involved with salutes in the form of gunfire. Here's the breakdown for a full military honor funeral at Arlington National Cemetery.

21 Guns
President of the United States

19 Guns
Secretary of Defense
Chairman of the Joint Chiefs of Staff
Any other military officer given command over multiple branches of the armed services

17 Guns
Four Star General aka just plain General

15 Guns
Three Star General aka Lieutenant General

13 Guns
Two Star General aka Major General

11 Guns
One Star General aka Brigadier General