Honorary consuls, Ambassadors at-Large and governement advisors, Special envoys all perform various functions for the states wich they represent. Each country legal system deals with the individual guidelines pertaining to such officers. However the general provisions related to diplomatic missions, immunity, inviolability and diplomatic privileges are signed by 187 countries and in know as the Vienna Convention on Consular Relation. The document clearly states, "Each state is free to decide whether it will appoint or receive Honorary Consuls".
Extract from ~Vienna Convention~ Consular Relations,done at 24 April 1963.