The first one.
testip(PeerIP);
is the right way to do it, as an array name will decay to a pointer to the first element of the array, which matches the expected type for the called function parameter.
To elaborate, in your code, testip() expects an argument of type char * and by calling it like testip(PeerIP); you are passing a char *, so no issues.
In case you use the &PeerIP, the type will be [char (*) [4]] pointer to array, not pointer to the first element of the array [char *] and they are different type.
Quoting C11, chapter §6.3.2.1, Lvalues, arrays, and function designators, (emphasis mine)
Except when it is the operand of the sizeof operator, the _Alignof operator, or the
unary & operator, or is a string literal used to initialize an array, an expression that has
type ‘‘array of type’’ is converted to an expression with type ‘‘pointer to type’’ that points
to the initial element of the array object and is not an lvalue. [...]
testip()before you call it. If you do that, the compiler will be able to tell you that thetestip(&PeerIP);call is passing the wrong type to the function — it's anint (*)[4]and not anint *that is being passed. Find out how to make your compiler insist on functions being defined or declared before being used, with strict prototypes, and then use it.