Aristotle's idea of friendship is a central idea of his Nichomachean Ethics. One supposes that its importance lies in the central need of friendships that Aristotle desires in political affairs: the citizens must be friends, based on an equality of virtue and power, if they are to govern their polis successfully: "Friendship seems too to hold states together". We have seen in the United States recently how much that mistrust and the erosion of political friendships "across the aisle" have cost the nation. When partisans only desire to score points on the opposition, the national interest gets thrown under the bus.
Aristotle perceives three kinds of friendship. There are those who love for the sake of utility: the use the other person has for them. There are those who love for the sake of pleasure. But Aristotle is not much interested in that sort of friendship, for such friendships are focused on what is good for oneself, not for the other person.
"Perfect friendship is the friendship of men who are good, and alike in virtue; for these wish well alike to each other qua good, and they are good in themselves." That is the kind of friendship that Aristotle believes in. As for the other kinds? They are included anyway in the perfect friendship of good equals, because good friends are naturally useful to each other and pleasant too.
One may, however, be friendly to other people without being friends. Aristotle praises friendliness as a mean of doing the right thing in the right way at the right time that lies between the extremes of obsequiousness and churlishness. Although "no name has been assigned to it" it most resembles friendship. But it is not actually friendship because "it implies no passion or affection."
It seems obvious that "in gatherings of men, in social life and the interchange of words" that a proper friendliness is appropriate. Aristotle notes that this friendliness would adapt itself according to the situation. Proper friendliness would differ: for intimates one style is appropriate, for strangers another. And Aristotle recognizes, by his extremes, that proper friendliness avoids both rudeness and fawning while recognizing that normal intercourse must involve some level of disagreement and conflict.
The template that Aristotle proposes, as a mean to avoid both giving unnecessary harm and receiving it, it the behavior that a friend might use with a friend, the natural and sensitive behavior of the good man who wishes good for the other person as they would desire it. Only, of course, in mere friendliness his virtuous man does not presume to love or hate the other.
However, Aristotle's perfect friendship is necessarily the love between equals, and the virtuous mean of friendliness applies to interactions also between unequals. Friendliness will mean different behavior from superior to inferior than from inferior to superior. In all cases, the mean of friendliness presumes behavior that is "befitting," a mean peculiar to each social situation that avoids the excess of churlishness or the defect of obsequiousness.