They may be happy to see each other. They may not care very much at all. Strangers greet each other differently than people who know each other well. You wouldn't greet a new kid at school the same way you'd greet your best friend. You wouldn't say hello to your mother the same way you'd say hello to the president of the United States.
Most greetings are friendly or polite.
Some greetings show respect for a person's rank. Most probably don't. The same is true of animals. Their greetings are as many and varied as the species themselves. You know how people greet each other.