you discribed it, it sends messages tru linked prims (as one object)
sender
default
{
touch_start(integer total_number)
{
llMessageLinked(0,0,llDetectedName(0), llDetectedKey(0));
}
}
llMessageLinked(integer linknum, integer num, string str, key id)
integer linknum , in multi prim objects you can assign messages to go directly to a pirm in a linkset or you can use these constants
LINK_ROOT 1 root prim in linked set (but not in a single prim, which is 0)
LINK_SET -1 all prims in object
LINK_ALL_OTHERS -2 all other prims in object besides prim function is in
LINK_ALL_CHILDREN -3 all child prims in object
LINK_THIS -4 prim script is in
integer num, any valid whole number you can also use this as a filter (sorta like radio channels)
string str, any valid string
str may be blank, (""

or as long as desired. str and id are only limited by the amount of available memory. (i wouldnt push it tho)
key id, any valid UUID , with typecasting on the receiver end you can use this as a extra 36 charater string feild, may be blank or NULL_KEY
receiver
its an event, like state entry or listen
default
{
link_message(integer sender_num, integer num, string str, key id)
{
llOwnerSay(llGetScriptName() + " output " + str +" UUID =" + (string)id);
}
}
integer sender_num, which prim sent the message
integer num, the number you sent
string str, the string you sent
key id, the UUID you sent